Conversation
There was a problem hiding this comment.
🟡 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
Do not skip authorization checks when the TypeSpec file is missing · New Verify staged guards precede credential and authority work · New Match complete constant assignments to detect weakened limits · New Check redirect policy separately on both requests · New Require actual resolveTarget calls in each execution path · New Validate actual triggering and fixed targets in IMP-006 checks · New
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
|
@copilot run pr-finisher skill |
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>


Summary
Updates
scripts/check-safe-outputs-conformance.shfor 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 onmain, and the overall script result is still PASS (exit 0).Key results
Specification Changes Reviewed
0a94d0ad,1ff84cb7,d6922c2e([Safe Outputs Conformance] REQ-002: Complete spec sections for pull request review safe output types #78288, [Safe Outputs Conformance] REQ-002: Complete spec sections for issue/PR metadata safe output types #78649, [Safe Outputs Conformance] REQ-002: Complete required spec sections for 12 safe output types #78954): full MCP schemas, operational semantics and security requirements for many §7.3 types. This adds the target authorization requirements CRC-001–004 (create_pull_request_review_comment), SPR-001–004 (submit_pull_request_review) and RRC-001–004 (reply_to_pull_request_review_comment).52f1d43f(Add fail-closed authorization for safe outputs #79029): v1.30.0, the new §5.2 "Safe-output invocation authorization" sectionfaa32b1c(Add protected authorization baseline verification #79287): link to the guide for protecting an authorization baseline (informative only)32398b3f(fix: propagate trace context and job identity to backend services #79351): v1.31.0, addsjob_id,traceparentandbaggageto authorization requestsb24ad37a,e86a3a74(Bind executor temporary-ID resolutions to the authorized snapshot #79482, Defer supported temporary targets before authorization #79498): semantic-consistency binding and deferral of temporary-ID targets7c12b9a0,c7acbebe,965c96e2(Add opt-in specification styling to Astro docs #79835, Define service APIs in TypeSpec and build all specs in CI #79844, Add TLA+ models for workflow protocol specifications #79843):spec: truefrontmatter, a link to the TypeSpec companion and a link to the TLA+ model (informative only)Script updates and testing details
New Checks Added
builtin-exempt.skipped_stagedin both the client and the gate.job_idis top-level and outsiderequest_digest.traceparentis only sent for a valid trace context.cicd.pipeline.task.namebaggage value is sanitized withencodeURIComponent.-001through-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 omittedtargetas"triggering", and only accepts an agent-suppliedpull_request_numberwhentargetis"*". Forsubmit_pull_request_review, it checks that the handler usesresolveTarget.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:
Testing
The one LOW finding was already there before this change: USE-003,
notify_comment_error.cjsis missing the 🎭 emoji.Negative tests, with the changes reverted afterwards:
MAX_RESPONSE_BYTESto 9000 makes SEC-014 report HIGH."triggering"default inreply_to_pr_review_comment.cjsmakes IMP-006 report HIGH (RRC-001).Next actions
Related Files
docs/src/content/docs/specs/safe-outputs-specification.mdscripts/check-safe-outputs-conformance.sh