Registry Mirror
Skip to content

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Updates scripts/check-safe-outputs-conformance.sh for Safe Outputs spec 1.31.0. The last script update (#78256, 2026-11-16) came before 11 spec commits from the past 7 days. The new checks cover the new fail-closed invocation authorization section (v1.30.0–1.31.0) and the new CRC/SPR/RRC pull request review target authorization requirements. Both new checks pass on main, and the overall script result is still PASS (exit 0).

Key results

  • 2 new checks added: SEC-014 and IMP-006
  • 0 checks changed or removed. The spec didn't drop or weaken any requirement in this window.
  • Script header versions updated: Spec 1.29.26 → 1.31.0, Script → 1.31.0 (2026-11-23)

Specification Changes Reviewed

Script updates and testing details

New Checks Added

  • SEC-014: Fail-Closed Safe-Output Invocation Authorization (§5.2, v1.30.0–1.31.0). It verifies the following:
    • The compiler only accepts HTTPS endpoints with no credentials or fragment.
    • Conflicting global, local or imported authorities fail compilation.
    • Builtin diagnostics are classified builtin-exempt.
    • Staged mode short-circuits as skipped_staged in both the client and the gate.
    • The limits in the spec are present: 64 KiB request, 8 KiB response, 10 s per HTTP request, 20 s total, validity of at most 30 s with at least 2 s remaining.
    • Redirects are handled manually and block execution.
    • job_id is top-level and outside request_digest.
    • traceparent is only sent for a valid trace context.
    • The cicd.pipeline.task.name baggage value is sanitized with encodeURIComponent.
    • The companion TypeSpec file exists.
    • Severity: CRITICAL for security-boundary failures, HIGH or MEDIUM for the rest.
  • IMP-006: Pull Request Review Target Authorization (§7.3, CRC/SPR/RRC-001–004). The existing IMP-005 requires -001 through -005, but these three types only define four requirements, so they get their own check. It verifies that each spec section has its Target Authorization block and all four IDs. It also checks that each handler treats an omitted target as "triggering", and only accepts an agent-supplied pull_request_number when target is "*". For submit_pull_request_review, it checks that the handler uses resolveTarget.

Not added as automated checks

These are hard to check reliably with grep, so they are left to code review and the existing regression tests:

  • Persisting evidence before execution
  • No retries after a consuming request
  • Redaction of OTel spans
  • Deep-frozen snapshot semantics

Testing

$ bash -n scripts/check-safe-outputs-conformance.sh   # OK
$ bash scripts/check-safe-outputs-conformance.sh
[PASS] SEC-014: Safe-output invocation authorization is HTTPS-only, conflict-checked, staged-isolated, bounded, redirect-blocking, and carries diagnostic-only job correlation
[PASS] IMP-006: Pull request review handlers specify and enforce CRC/SPR/RRC target authorization
Critical Failures: 0 / High Failures: 0 / Medium Failures: 0 / Low Failures: 1
PASS: All checks passed   (exit 0)

The one LOW finding was already there before this change: USE-003, notify_comment_error.cjs is missing the 🎭 emoji.

Negative tests, with the changes reverted afterwards:

  • Changing MAX_RESPONSE_BYTES to 9000 makes SEC-014 report HIGH.
  • Removing the "triggering" default in reply_to_pr_review_comment.cjs makes IMP-006 report HIGH (RRC-001).

Next actions

  • Review the new check IDs and their severity levels.
  • If the spec adds stable markers later, consider automated checks for the evidence-persistence and no-retry requirements.

Related Files

  • Specification: docs/src/content/docs/specs/safe-outputs-specification.md
  • Conformance Script: scripts/check-safe-outputs-conformance.sh

Generated by 🔒 Weekly Safe Outputs Specification Review · pi · opus55 · ~83 AIC · ⌖ ~54 AIC · ⊞ 1.5K · ◷

  • expires on Nov 29, 2026, 8:32 PM UTC-08:00

@github-actions github-actions Bot added automation documentation Improvements or additions to documentation safe-outputs labels Nov 23, 2026
Copilot AI adaptive review requested due to automatic review settings November 23, 2026 04:32

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

A missing companion TypeSpec file can bypass all compiler/runtime authorization checks, allowing the conformance script to exit successfully even with a broken HTTPS guard.

6 open issues
What changed in this PR

Updates gh-aw’s Safe Outputs conformance checker for specification 1.31.0, extending coverage of invocation authorization and pull request review target rules.

Changes:

  • Adds SEC-014 source checks for authorization configuration, staged isolation, protocol limits, redirects, and job/trace correlation.
  • Adds IMP-006 checks for CRC/SPR/RRC specification requirements and handler target-selection patterns.
  • Updates specification and script version metadata to 1.31.0.
File Description
scripts/​check-safe-outputs-conformance.sh Adds two conformance checks and refreshes version headers.

Review effort: Max (adaptive)

log_medium "SEC-014: Companion TypeSpec definition for the authorization decision endpoint missing: $typespec"
failed=1
fi
if [ $failed -ne 0 ]; then

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.

Fixed in cc4a40f: missing spec or TypeSpec now records its finding without skipping compiler/runtime checks. A negative fixture confirms a broken HTTPS guard still produces a CRITICAL finding when TypeSpec is absent.

fi

# Runtime client: staged isolation, fixed bounds, manual redirects (redirects block)
if ! grep -qF 'state: "skipped_staged"' "$client" || ! grep -qF 'state: "skipped_staged"' "$gate"; then

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.

Fixed in cc4a40f: SEC-014 now checks that the client staged return precedes configuration, correlation headers, and credential acquisition, and that the gate return precedes invocation and Claim loading. Negative fixtures move both guards past those operations.

fi
local bound
for bound in 'MAX_REQUEST_BYTES = 65536' 'MAX_RESPONSE_BYTES = 8192' 'HTTP_TIMEOUT_MS = 10000' 'TOTAL_TIMEOUT_MS = 20000' 'MIN_VALIDITY_MS = 2000' 'MAX_VALIDITY_MS = 30000'; do
if ! grep -qF "$bound" "$client"; then

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.

Fixed in cc4a40f: each protocol bound is matched as a complete anchored constant assignment. Negative fixtures enlarge each value and confirm SEC-014 reports the weakened limit.

failed=1
fi
if [ "$prefix" = "SPR" ]; then
if ! grep -qF 'resolveTarget' "$handler"; then

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.

Fixed in cc4a40f: IMP-006 requires actual resolveTarget calls in both submit-review registry and legacy paths, checks configured-target propagation, and verifies the resolved PR number is used downstream. Negative fixtures remove the calls or alter target propagation.

log_high "IMP-006: $handler does not resolve review targets via resolveTarget (SPR-002-004)"
failed=1
fi
elif ! grep -qE "${target_var} === \"\\*\"" "$handler" || ! grep -qF 'pull_request_number' "$handler"; then

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.

Fixed in cc4a40f: IMP-006 checks that CRC/RRC triggering branches use the triggering PR, fixed branches use their configured target, and wildcard branches reject missing pull_request_number. Submit-review checks also reject a wildcard substituted for configured target. Negative fixtures cover each case.

@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot run pr-finisher skill

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Copilot AI requested a review from pelikhan November 23, 2026 06:27
@pelikhan
pelikhan merged commit 0722d1e into main Nov 23, 2026
105 of 106 checks passed
@pelikhan
pelikhan deleted the spec-review/safe-outputs-conformance-1-31-0-3af878bfff4f5195 branch November 23, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation documentation Improvements or additions to documentation safe-outputs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants