Add fixed trusted weekly workflow identity foundation - #32
Conversation
Co-Authored-By: Codex <noreply@openai.com>
🤖 Codex PR Review🚫 Merge blocked: active blocking history requires independent source-of-truth clearance ⚖️ Codex Review Arbitration🚫 block: The prior security finding is not demonstrably fixed. ℹ️ Other Findings1. 🟡 [MEDIUM] Reliability in
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 827598fde6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| class TrustedWorkflowIdentity: | ||
| """Immutable fixed identity; construction is intentionally not public.""" | ||
|
|
||
| __slots__ = ("_repository", "_workflow_path", "_workflow_ref") |
There was a problem hiding this comment.
Make the fixed identity object immutable
When any caller receives the singleton from trusted_workflow_identity(), the slots declared here are still writable (for example, identity._workflow_ref = "..."), and because the same singleton is returned for all callers, later code deriving repository/path/ref from that typed identity can see a caller-supplied trust root despite the zero-override contract. Add a rejecting __setattr__ after _create or otherwise freeze the singleton before this becomes the trust boundary.
Useful? React with 👍 / 👎.
| @dataclass(frozen=True, slots=True) | ||
| class TrustedWorkflowEvidence: |
There was a problem hiding this comment.
Hide the evidence constructor behind validation
If the later integration has a SHA from a miswired or untrusted workflow, it can still call TrustedWorkflowEvidence(trusted_workflow_identity(), sha) and serialize a canonical trusted wire object without ever comparing the runtime github.workflow_ref. Because this public dataclass generates an accepting constructor, it bypasses the only API that validates the workflow ref; keep construction internal or gate it with a private factory token so callers must use validate_trusted_workflow_identity().
Useful? React with 👍 / 👎.
Co-Authored-By: Codex <noreply@openai.com>
|
Concentrated closure applied at
Pure PR-A0 scope remains unchanged: no bundle, workflow, permissions, Actions, artifact, producer, QAR, Pages, legacy, or migration integration. |
|
PERMANENT_FREEZE/HUMAN_REQUIRED per stop rule. Preserve branch/worktree/commits/comments/threads/checks/tests; no further code action. |
Scope
Pure PR-A0 foundation for the trusted weekly period-lock harness.
Explicit non-scope
No period-bundle integration, workflow, permissions, Actions/artifact access,
producer, QAR, Pages, publisher, legacy, migration, or rerun behavior.
PR #31 remains closed/frozen evidence and is not reused.
Verification
python3 -m pytest -q: 110 passeduv sync --locked --extra test: passeduv run --locked pytest -q: 110 passedA1 bundle integration is blocked until this PR is merged and post-merge main CI succeeds.