Add hash-bound SEC cell patch preview - #117
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d23117ec2
ℹ️ 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".
| ifndef EXPECTED_CANONICAL_SHA256 | ||
| $(error EXPECTED_CANONICAL_SHA256 is required) | ||
| endif | ||
| @PYTHONDONTWRITEBYTECODE=1 python3 -m src.sec_fundamentals_patch_preview --sec-preview-path "$(SEC_PREVIEW)" --canonical-path "$(or $(CANONICAL_PATH),data/fundamentals.csv)" --expected-sec-preview-sha256 "$(EXPECTED_SEC_PREVIEW_SHA256)" --expected-canonical-sha256 "$(EXPECTED_CANONICAL_SHA256)" --repository-head "$(shell git rev-parse HEAD)" |
There was a problem hiding this comment.
Require the reviewed repository hash
When the checkout has moved since the SEC packet was reviewed, this launcher substitutes the new git rev-parse HEAD value and the Python code only validates its format, so the command succeeds and records the drifted commit as if it were a satisfied precondition. This defeats the advertised hash-bound, fail-closed behavior and could let an owner approve cells projected by unreviewed code; require an externally supplied expected repository hash and compare it with the actual HEAD instead.
Useful? React with 👍 / 👎.
Summary
Verification
Boundaries