Repository navigation
Fix SEC-005 repository authorization conformance for Claim adapters - #67132
Merged
Merged
Conversation
1 of 10 tasks
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix allowlist verification for cross-repo target-repo handlers
Fix SEC-005 repository authorization conformance for Claim adapters
Oct 9, 2026
pelikhan
marked this pull request as ready for review
October 9, 2026 07:14
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The recognized targetRepo alias bypasses the new E004 allowlist check and is absent from its regression test.
1 open finding
What changed in this PR
Updates SEC-005 conformance for work-queue Claim adapters and repository authorization.
Changes:
- Excludes
_checks.cjstest fixtures while retaining unsafe-handler detection. - Documents and annotates Claim adapter authorization paths.
- Adds E004 enforcement and regression coverage for repository aliases.
| File | Description |
|---|---|
scripts/check-safe-outputs-conformance.sh |
Excludes _checks.cjs fixtures. |
scripts/check-safe-outputs-conformance_test.sh |
Tests SEC-005 fixture handling. |
docs/src/content/docs/specs/safe-outputs-specification.md |
Documents Claim authorization. |
actions/setup/js/work_queue_upload_assets.cjs |
Adds SEC-005 exemption rationale. |
actions/setup/js/work_queue_rest_adapter.cjs |
Adds REST adapter rationale. |
actions/setup/js/work_queue_prepare_claim_adapter.cjs |
Documents preparation authorization. |
actions/setup/js/work_queue_graphql_adapter.cjs |
Adds GraphQL adapter rationale. |
actions/setup/js/work_queue_git_tree_adapter.cjs |
Adds Git adapter rationale. |
actions/setup/js/work_queue_delivery.cjs |
Documents readback authorization. |
actions/setup/js/work_queue_code_scanning.cjs |
Adds SARIF authorization rationale. |
actions/setup/js/work_queue_claim_adapters.cjs |
Documents fixed-repository enforcement. |
actions/setup/js/finish_work_queue_claim.test.cjs |
Tests E004 repository denials. |
actions/setup/js/finish_work_queue_claim.cjs |
Implements singleton allowlist checks. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| @@ -109,7 +110,8 @@ async function authorizeWorkerClaim(options = {}) { | |||
| const native = validateNativeRun(trustedContext.native_run, { ...expected, run_id: trustedContext.run_id }); | |||
| if (!dispatch.run || dispatch.state !== "bound" || canonical(dispatch.run) !== canonical(bindingForRun(native, expected))) throw new Error("work_queue_binding_not_durable"); | |||
| const targets = [normalized.repository, normalized.repo, normalized.target_repo, normalized["target-repo"]].filter(value => value !== undefined); | |||
Contributor
|
🎉 This pull request is included in a new release. Release: |
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.

SEC-005 flagged five test fixtures and nine production Claim modules whose repository authorization was not recognized by the checker. Declared adapters use fixed destinations; native adapter fallbacks are constrained by the authenticated worker profile.
_checks.cjsfixtures consistently while retaining checks for unsafe production handlers.profile.effect_scopesingleton allowlist explicit for message and resolved-resource repositories. AttachE004to denials without changingwork_queue_effect_scope_denied.