Skip to content

Fix SEC-005 repository authorization conformance for Claim adapters - #67132

Merged
pelikhan merged 2 commits into
mainfrom
copilot/sec-005-fix-allowlist-verification
Oct 9, 2026
Merged

pelikhan merged 2 commits into
mainfrom
copilot/sec-005-fix-allowlist-verification

Conversation

Copilot AI commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • Checker: Exclude _checks.cjs fixtures consistently while retaining checks for unsafe production handlers.
  • Authorization: Make the profile.effect_scope singleton allowlist explicit for message and resolved-resource repositories. Attach E004 to denials without changing work_queue_effect_scope_denied.
  • Conformance: Add module-specific exemption annotations and clarify queue-specific authorization in the specification.
  • Regression coverage: Cover fixture exclusion, unsafe-handler detection, and E004 rejection across repository aliases.

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
Copilot AI requested a review from pelikhan October 9, 2026 06:14
@pelikhan
pelikhan marked this pull request as ready for review October 9, 2026 07:14
Copilot AI balanced review requested due to automatic review settings October 9, 2026 07:14
@pelikhan
pelikhan merged commit 9c97966 into main Oct 9, 2026
12 checks passed
@pelikhan
pelikhan deleted the copilot/sec-005-fix-allowlist-verification branch October 9, 2026 07:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.cjs test 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);
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.91.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Safe Outputs Conformance] SEC-005: Cross-repo target-repo handlers need allowlist verification (work-queue Claim adapters)

3 participants