Repository navigation
Security: fail-closed label parsing, explicit reviewer decision, CI secret scan - #22
Open
bunytwirls wants to merge 2 commits into
Open
bunytwirls wants to merge 2 commits into
bunytwirls wants to merge 2 commits into
Conversation
…nd read-only permissions
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
Security & verification fixes for two decision-integrity bugs, plus documentation and CI hardening.
Bugs fixed
1. Parser could invert the model's meaning
The non-JSON fallback searched the whole response for a label word, so
"The evidence does not show the claim is SUPPORTED."was recorded as SUPPORTED.JSON with an invalid label (e.g.
{"label": "APPROVED", "rationale": "...UNSUPPORTED..."}) also fell through to word matching.Fix: plain-text output is only accepted when the label stands on its own line (
UNSUPPORTED,Label: SUPPORTED). A label word inside prose, conflicting labels, or an invalid JSON label now fail closed toUNPARSEABLE(parse_status=invalid_labelfor the JSON case).2. Reviewer could record a decision without making one
The "Final decision" radio defaulted to SUPPORTED, so an untouched form saved a SUPPORTED decision.
Fix: no default selection (
index=None), andreviewer_submission_errorsrejects a missing or invalid decision with "Choose a final decision."Tests
test_parser.py,test_review_state.py,test_ui_security.py)results/predictions.csvandresults/security_probes.csvhasparse_status=jsonDocumentation
docs/SECURITY.md: parser and decision-log controls updated; coverage list includes prose/invalid labels and missing final decisiondocs/SECURITY_TEST_MATRIX.md: acceptance cases 11–12 added; A03 row notes CI permissions and secret scanningCI / build hardening
ci.yml:permissions: contents: read(read-only CI token)ci.yml: newsecret-scanjob runs gitleaks v8.21.2 (checksum-verified) over the full Git history on every push and PR.dockerignore: excludes.env.*andlocal_decisions.csvfrom the container imageScan results (2026-11-13)
Not verified
Live Google Cloud IAM bindings and the final Cloud Run redeploy were not checked (no project access). Configuration was reviewed from
scripts/deploy_cloud_run.shanddocs/GCP_DEPLOYMENT.mdonly.How to verify
Verified with tests and scans.