You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Safe Outputs Conformance] SEC-005: unified_session_payload.cjs and unified_session_render.cjs reference targetRepo without allowlist validation #70802
Check ID: SEC-005 Severity: HIGH Category: Security
Problem Description
The conformance checker flagged two session-telemetry modules that reference a targetRepo identifier without an adjacent allowlist/validation check:
actions/setup/js/unified_session_payload.cjs (line 433) — normalizes a targetRepo/target_repo field alias into session payload metadata.
actions/setup/js/unified_session_render.cjs (line 276) — includes targetRepo in a list of fields rendered into human-readable session log lines.
Per the Safe Outputs Specification's SEC-005 rule (Cross-Repository Validation), any handler that supports a cross-repository target MUST validate the target against an allowlist (allowed-repos, validateTargetRepo, or checkAllowedRepo) before acting on it.
Workflows: N/A — shared session telemetry library, not a single workflow
Handlers: Session payload normalization / session log rendering, not a safe-output write handler
<b>🔍 Current vs Expected Behavior</b>
Current Behavior
Both files only read and display/normalize a pre-existing targetRepo value (for telemetry logging or structured payload emission). Neither file contains an octokit. call or other GitHub write path keyed on this field — the checker's SEC-005 rule matches on the bare identifier name, without distinguishing read/display code from a handler that performs a cross-repo write.
Expected Behavior
One of:
If these modules never use targetRepo to authorize or perform a write (they only echo an already-validated value for telemetry/logging), they should carry the documented exemption annotation @safe-outputs-exempt SEC-005 (supported by the checker at scripts/check-safe-outputs-conformance.sh line 181) with a short comment explaining why.
If any code path lets targetRepo from these modules influence which repository is written to, that path MUST validate the value against the workflow's configured repo allowlist before use.
Remediation Steps
This task can be assigned to a Copilot coding agent with the following steps:
Trace how targetRepo/target_repo flows out of unified_session_payload.cjs and unified_session_render.cjs — confirm whether either module performs, or feeds, a cross-repository GitHub write, or whether it is purely telemetry/log display.
If purely telemetry/display: add a @safe-outputs-exempt SEC-005 annotation comment above the targetRepo reference in each file, with a one-line justification.
If it does influence a write path: add an allowlist check (reuse validateTargetRepo/checkAllowedRepo from an existing cross-repo handler such as actions/setup/js/add_labels.cjs) before the value is used.
Re-run the conformance script and confirm SEC-005 passes.
Activity
github-actions commentedon Oct 22, 2026
This issue is being closed as outdated. A newer issue has been created: #71058
View newer issue
This action was performed automatically by the
Daily Safe Outputs Conformance Checkerworkflow.github-actions commentedon Oct 22, 2026
This issue is being closed as outdated. A newer issue has been created: #71059
View newer issue
This action was performed automatically by the
Daily Safe Outputs Conformance Checkerworkflow.