Conformance Check Failure
Check ID: SEC-005
Severity: HIGH
Category: Security
Problem Description
The Safe Outputs specification requires that any handler supporting cross-repository operations must validate the target repository against an allowlist. push_experiment_state.cjs constructs and uses a targetRepo value to build an authenticated repoUrl and push commits, but contains no allowedRepos, validateTargetRepo, or checkAllowedRepo guard. Without an allowlist check, the push destination is not constrained beyond whatever context.repo resolves to at runtime.
Affected Components
- File:
actions/setup/js/push_experiment_state.cjs
- Variable:
targetRepo (line ~62) — built from context.repo.owner/context.repo.repo
- Usage: Used to construct authenticated
repoUrl passed to checkoutOrCreateBranch and pushSignedCommits
🔍 Current vs Expected Behavior
Current Behavior
const targetRepo = `${context.repo.owner}/${context.repo.repo}`;
// ... used to build repoUrl and push without any allowlist guard
The handler has no check like:
const allowedRepos = ['github/gh-aw'];
if (!allowedRepos.includes(targetRepo)) { core.setFailed(...); return; }
Expected Behavior
Per SEC-005, handlers that resolve or use a target repository must verify it against an allowlist before performing any write operations. Even if targetRepo is currently always the current repository, the specification requires an explicit allowlist check to prevent future regressions if the handler is extended to accept external input.
Remediation Steps
This task can be assigned to a Copilot coding agent with the following steps:
- In
push_experiment_state.cjs, add an allowedRepos check immediately after targetRepo is computed (around line 62).
- Either hard-code the allowlist to the current repository (
[context.repo.owner + '/' + context.repo.repo]) or read from an environment variable GH_AW_ALLOWED_TARGET_REPOS.
- If
targetRepo is not in the allowlist, call core.setFailed(...) and return early.
- Name the guard function or variable so it matches one of
allowedRepos, validateTargetRepo, or checkAllowedRepo for the conformance checker to detect.
- Re-run
bash scripts/check-safe-outputs-conformance.sh to confirm SEC-005 passes.
Verification
After remediation, verify the fix by running:
bash scripts/check-safe-outputs-conformance.sh
The check SEC-005 should pass without errors.
References
- Safe Outputs Specification:
docs/src/content/docs/reference/safe-outputs-specification.md
- Conformance Checker:
scripts/check-safe-outputs-conformance.sh
- Run ID: §25420004862
- Date: 2026-05-06
Generated by Daily Safe Outputs Conformance Checker · ● 125.7K · ◷
Conformance Check Failure
Check ID: SEC-005
Severity: HIGH
Category: Security
Problem Description
The Safe Outputs specification requires that any handler supporting cross-repository operations must validate the target repository against an allowlist.
push_experiment_state.cjsconstructs and uses atargetRepovalue to build an authenticatedrepoUrland push commits, but contains noallowedRepos,validateTargetRepo, orcheckAllowedRepoguard. Without an allowlist check, the push destination is not constrained beyond whatevercontext.reporesolves to at runtime.Affected Components
actions/setup/js/push_experiment_state.cjstargetRepo(line ~62) — built fromcontext.repo.owner/context.repo.reporepoUrlpassed tocheckoutOrCreateBranchandpushSignedCommits🔍 Current vs Expected Behavior
Current Behavior
The handler has no check like:
Expected Behavior
Per SEC-005, handlers that resolve or use a target repository must verify it against an allowlist before performing any write operations. Even if
targetRepois currently always the current repository, the specification requires an explicit allowlist check to prevent future regressions if the handler is extended to accept external input.Remediation Steps
This task can be assigned to a Copilot coding agent with the following steps:
push_experiment_state.cjs, add anallowedReposcheck immediately aftertargetRepois computed (around line 62).[context.repo.owner + '/' + context.repo.repo]) or read from an environment variableGH_AW_ALLOWED_TARGET_REPOS.targetRepois not in the allowlist, callcore.setFailed(...)and return early.allowedRepos,validateTargetRepo, orcheckAllowedRepofor the conformance checker to detect.bash scripts/check-safe-outputs-conformance.shto confirm SEC-005 passes.Verification
After remediation, verify the fix by running:
The check
SEC-005should pass without errors.References
docs/src/content/docs/reference/safe-outputs-specification.mdscripts/check-safe-outputs-conformance.sh