Add governed repository security reviews with versioned context - #3028
Draft
rory-opanai wants to merge 1 commit into
Draft
Add governed repository security reviews with versioned context#3028rory-opanai wants to merge 1 commit into
rory-opanai wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add Govern repository security reviews with versioned context, a runnable
tutorial for a security-review control plane. It binds repository ownership
and exact revisions to versioned threat context, bounded work admission,
authenticated evidence and named human decisions.
Draft for technical and editorial review; not ready to merge. Confirmation
of implementation contribution rights/licensing, relevant-team review and
Developer Experience approval remain outstanding. The implementation-licence
notice and all third-party notices are retained unchanged; this PR does not
assert that those approvals have been granted.
Motivation
The tutorial shows how to decide whether a repository review may run, whether
previous evidence can be reused, and which changes require fresh human review.
Developers can inspect the complete workflow without credentials, a hosted
model request or access to a real repository.
Related examples already cover Codex SDK code review
and Codex CLI security fixes on GitLab.
This contribution focuses on revision-bound authority, inherited context with
repository-specific deltas, repeat-safe admission and authenticated review
evidence. It does not propose a new vulnerability-detection technique.
What changed
an operator guide under
examples/codex/governed_repository_security_reviews/.deltas and bespoke high-risk context acceptance.
evidence, changed-context revalidation and human disposition.
adversarial tests for refusal, failure, restart and evidence integrity.
remain inert plans; recorded version/help checks are not scanner execution.
entry credited to
rory-opanai.The separate automated-development tutorial is not included.
Observed verification
The independent ordinary-Jupyter check was separate and offline: all 12 cells
passed, with a retained non-fatal macOS sandbox shutdown warning. Its first
Docker command did not request Jupyter. The combined Docker/Jupyter results
above are separate runs. The independent walkthrough was AI-operated on the
same host and cached image, not an unfamiliar human or new customer machine.
An earlier candidate incorrectly asserted that four repository jobs must mean
exactly four attempts. The replacement accepts additional attempts only when
exact typed retry evidence and policy limits match; unexplained duplicates,
exhausted failures, worker crashes and incomplete isolation evidence still
fail. In an explicitly injected synthetic-timeout probe, recovery completed
four jobs in five attempts; exhausted clean and hostile fixtures failed their
intended contracts. The
original failed result is retained; its precise low-level transient was not
recorded and is not claimed to have been identified.
Interpreter repeats and overlapping test layers are not additional unique
coverage. The 2,000-record exercise is metadata-only: zero of those generated
records are scanned. Actual execution uses seven fictional fixture types.
How to test
Use Python 3.11+ on macOS or Linux. Native Windows is not supported by the POSIX
locking and private-file checks. The core example uses the standard library
and requires no API key or employee-only plugin.
cd examples/codex/governed_repository_security_reviews python3 -B scripts/run_security_review_cookbook.py --cycles 2 python3 -B scripts/evaluate_threat_context.py python3 -B scripts/execute_notebook.py governed_repository_security_reviews.ipynb python3 -B scripts/verify_cookbook_example.pyWithout Docker, real-container tests are explicitly skipped. Nominal first and
restart attempt counts are
[4, 0]; additional first-cycle attempts requirebounded retry evidence. Unchanged restarts must always produce zero new work.
isolation and run a fresh bounded soak:
docker image inspect python:3.12-alpine --format '{{.Id}}' python3 -B scripts/verify_cookbook_example.py --docker python3 -B scripts/run_security_stress_soak.py --cycles 2The example uses
--pull never; requested isolation cannot silently fall backto the host. Inspect attempts, proven starts, isolation receipts and cleanup
separately. Follow
local/README.mdto reproduce the two supervisor topologies.Jupyter kernel and validate the source diagrams:
Dependency installation contacts the configured Python package registry;
example execution remains offline.
the proposed registry entry against
.github/registry_schema.json:cd ../../.. /tmp/governed-cookbook-venv/bin/python -B .github/scripts/check_notebooks.py git diff --check git diff --cached --checkdocs-editorreview for changedMarkdown and notebook Markdown cells, resolving any remaining P0/P1 issues.
governed-repository-security-reviews. Website deployment is not claimed.Figures and source
The editable architecture
and threat-context hierarchy
include text alternatives and local Mermaid sources. Local notebook previews
were checked at desktop and narrow widths; no live website rendering is claimed.
Limits and review checklist
The scanner is a deterministic fixture adapter. The example makes zero live
product scans, hosted-model requests or provider writes, and does not access
customer repositories. It demonstrates governance and isolation controls, not
vulnerability precision/recall, entitlement, fleet throughput, cost savings or
production readiness. The separate public metadata planner does not inspect
repository contents.
Approval files use fictional identities, not enterprise authentication. Local
HMAC state does not protect against a malicious writer controlling the same
host account and key; power-loss durability is not established. Real repository
acquisition, scanner execution, provider writes, merge and deployment require
separate implementation, evaluation and human authority.
rory-opanai; no customauthors.yamlentry.application verified without changing the tested implementation.
retain the bundled Apache 2.0 notices and provenance.
acceptance remain outstanding.