repair(codeql): restore exact endpoint-set membership - #2351
seonghobae wants to merge 1 commit into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Protected-main Python Security and this CodeQL repair form a foundation check-cycle with canonical AnyIO owner #2278. Draft integration successor #2352 exact Keep #2351 open while #2352 is unmerged. The integration PR is only the convergence/landing vehicle; this one-file source repair remains the semantic owner, and PR-0 is not satisfied until a verified successor normally reaches protected main with complete delta and fresh acceptance evidence. |
Repair finding
Protected
main@e6334e229581a918e2f22de18733b76fa65d7e71currently fails the canonical Python CodeQL producer onpy/incomplete-url-substring-sanitizationintests/test_organization_commercial_readiness_loop_receipt_contract.py. Fresh producer run35754606100for.github#2040@bd039185ddf8df88480971cdd3b69c38f4558609completed Python analysis and preserved SARIF; the Medium+ gate failed on the literalresults-receiver.actions.githubusercontent.com:443membership assertion.This is not a URL sanitizer in product code.
_harden_runner_allowed_endpoints()already parses the harden-runner block into aset[str], so the contract intends exact set membership. However, the three separateassert "..." in endpointsexpressions trigger the CodeQL substring-sanitization heuristic.Lost canonical delta
The same causal repair previously existed on the #2106 lineage at
298e6c14c9a56b51c61df2d2e35d7545f0f4f288: the three required endpoints were asserted as one set-subset relation. That valid delta did not survive #2106's later reconciliation/final protected merge; current protected main again carries the three individual membership expressions.This Draft restores only that semantic delta on current protected main. Exact head
657d10402d4d502249423a85faa1f953542cd719changes one test file: the three required endpoint strings are required together withset.issubset(endpoints). The helper, workflow, allowlist, permissions, endpoint values, security gate and runtime behavior are unchanged. The negative assertion remains unchanged.Evidence / acceptance
.github#2040producer35754606100, PythonCodeQL dispatch scan (python)job106870962325, Medium+ SARIF gate FAILURE; preserved artifactcodeql-dispatch-python-35754606100-1containspy/incomplete-url-substring-sanitizationat the endpoint assertion.settle exact required runjob106924536948succeeded and required run35706035119advanced to attempt 2. The Actions receiver now consumes an authenticated SUCCESS verdict, while Python correctly consumes the authenticated producer FAILURE. Do not classify this current state as the earlier publication/re-entry defect.657d10402d4d502249423a85faa1f953542cd719.Keep Draft until this exact head receives fresh terminal repository/security/CodeQL evidence and qualifying independent current-head review. After normal protected integration, #2040 and other affected branches must ordinary/non-force reconcile to the new protected main and reacquire their own exact-head evidence; predecessor failures/successes do not transfer.
No self-approval, force-push, destructive rebase, gate weakening, synthetic status, no-op wake commit, blind rerun, or broad CodeQL suppression.