Skip to content

[Safe Outputs Conformance] SEC-005: Cross-repository handlers lack allowlist validation #15803

@github-actions

Description

@github-actions

Conformance Check Failure

Check ID: SEC-005
Severity: HIGH
Category: Security
Date: 2026-02-14
Run ID: §22025666977

Problem Description

The conformance checker identified 7 handlers that support cross-repository operations (target-repo or targetRepo parameters) but do not implement allowlist validation. This violates the Safe Outputs specification requirement that cross-repository operations must validate target repositories against an allowlist to prevent unauthorized access.

Security Impact: Without allowlist validation, agents could potentially perform operations on unauthorized repositories, leading to:

  • Unauthorized data access
  • Privilege escalation across repositories
  • Potential for supply chain attacks

Affected Handlers

  • assign_to_agent.cjs
  • checkout_pr_branch.cjs
  • create_agent_session.cjs
  • get_repository_url.cjs
  • pr_review_buffer.cjs
  • push_repo_memory.cjs
  • temporary_id.cjs

Current Behavior

These handlers accept target-repo or targetRepo parameters but do not validate the target repository against an allowlist before performing operations. This allows cross-repository operations without proper authorization checks.

Expected Behavior

Per the Safe Outputs specification, all handlers that support cross-repository operations MUST:

  1. Validate target repositories against a configured allowlist
  2. Reject operations on non-allowlisted repositories with clear error messages
  3. Log allowlist validation attempts for security auditing

Remediation Steps

For each affected handler:

  1. Add allowlist validation function call before any cross-repository operation
  2. Use a centralized validateTargetRepo() or checkAllowedRepo() function
  3. Ensure the allowlist is configurable via workflow configuration
  4. Add appropriate error handling with E004 (validation error) code
  5. Include security logging for validation failures

Example pattern:

if (targetRepo && !validateTargetRepo(targetRepo, allowedRepos)) {
  throw new Error(`E004: Target repository ${targetRepo} not in allowlist`);
}

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

Generated by Daily Safe Outputs Conformance Checker

  • expires on Feb 15, 2026, 11:01 PM UTC

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions