Repository navigation
Add safe outputs for security advisory drafts and comments - #76711
Conversation
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
|
✅ PR Specification Reviewer completed successfully! Caution agentic threat detected DetailsPotential security threats were detected in the agent output. Detected threat types: prompt injection. Review the workflow run logs for details.
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
This comment has been minimized.
This comment has been minimized.
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
Found one blocking API-contract issue: the advisory creation handler sends start_private_fork, but the REST endpoint expects private_fork. This can reject requests and fails to enforce the documented no-private-fork behavior. I did not run tests per the static-review instructions.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~5 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
There was a problem hiding this comment.
Caution
agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.
Details
Potential security threats were detected in the agent output. Detected threat types: prompt injection.
Review the workflow run logs for details.
Reviewed PR head ae185f8f3b063a585f7913ead1e1dc6d8c443474 against the applicable Safe Outputs MCP Gateway Specification v1.29.22, §5.2 GP2 (staged mode), and the security-architecture safe-output isolation requirements.
Blocking finding: both advisory handlers intentionally produce content-omitting staged previews (content omitted), while GP2 requires complete operation details and prohibits omitting critical operation details. The changed reference documentation also records this behavior. This is a normative contract violation; please implement a compliant detailed/redacted preview or obtain and land an approved security-preserving specification change.
No specification synchronization was applied: the PR does not update the formal contract, and weakening its mandatory staged-preview requirements requires maintainer approval and explicit conformance coverage. Review was limited to the captured open, non-draft head and the prefetched PR diff; tests were not run per static-review policy.
Generated by PR Specification Reviewer for #76711 · copilot · gpt50 · ~4 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review-specs to run again
🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic (>100 new lines in business-logic directories) but does not have a linked Architecture Decision Record (ADR). 📄 Draft ADR committed:
Decision captured in the draft: add 📋 What to do next
Once an ADR is linked in the PR body, this gate re-runs and verifies that the implementation matches the decision. ❓ Why ADRs MatterADRs create a searchable, permanent record of why the codebase looks the way it does. Future contributors will thank you. 📋 Michael Nygard ADR Format ReferenceAn ADR must contain these four sections to be complete:
All ADRs are stored in
|
There was a problem hiding this comment.
🟡 Changes recommended
Explicit advisory permission restrictions are ignored, advisory descriptions omit required detection notices, and advisory-only workflows can skip execution entirely.
7 open issues
Advisory descriptions omit required notices and provenance · New Explicit none does not override inferred advisory write permission · New Advisory-only workflows omit the processing step · New String-valued unlimited max skips advisory creation · New Advisory result URLs are dropped from safe-output outcomes · New Large advisory inputs are replaced by file placeholders · New Advisory tools are missing from the safe-output prompt · New
What changed in this PR
Extends gh-aw’s safe-output pipeline with security-advisory drafts and comments, keeping advisory writes in the trusted execution job.
Changes:
- Add advisory tools across schemas, compiler configuration, and runtime handlers.
- Add external-token/App authentication, advisory permissions, limits, and staged previews.
- Add regression tests, documentation, a minor changeset, and regenerated validation-catalog content.
| File | Description |
|---|---|
schemas/agent-output.json |
Define advisory output payloads. |
pkg/workflow/safe_outputs_validation_config.go |
Add advisory field-validation rules. |
pkg/workflow/safe_outputs_tools_computation.go |
Enable configured advisory tools. |
pkg/workflow/safe_outputs_state.go |
Recognize enabled advisory outputs. |
pkg/workflow/safe_outputs_max_validation.go |
Validate advisory operation limits. |
pkg/workflow/safe_outputs_handler_registry_workflow.go |
Build draft-advisory handler configuration. |
pkg/workflow/safe_outputs_handler_registry_test.go |
Update expected handler registrations. |
pkg/workflow/safe_outputs_handler_registry_comments.go |
Build advisory-comment handler configuration. |
pkg/workflow/safe_outputs_config_types.go |
Add advisory configuration fields. |
pkg/workflow/safe_outputs_config_extraction.go |
Extract advisory configurations. |
pkg/workflow/safe_outputs_app_config.go |
Map advisory permissions to App-token inputs. |
pkg/workflow/safe_outputs_advisory_auth.go |
Resolve and validate advisory credentials. |
pkg/workflow/safe_output_handlers.go |
Register advisory handlers and permissions. |
pkg/workflow/permissions.go |
Add the advisory App permission scope. |
pkg/workflow/js/safe_outputs_tools.json |
Define compiler-side advisory tool schemas. |
pkg/workflow/create_security_advisory.go |
Parse and validate draft-advisory configuration. |
pkg/workflow/create_security_advisory_test.go |
Test draft authentication and compilation. |
pkg/workflow/compiler_validators.go |
Invoke advisory authentication validators. |
pkg/workflow/add_security_advisory_comment.go |
Parse and validate advisory-comment configuration. |
pkg/workflow/add_security_advisory_comment_test.go |
Test comment configuration and compilation. |
pkg/parser/schemas/main_workflow_schema.json |
Define workflow options and advisory permissions. |
docs/src/content/docs/reference/safe-outputs.md |
Document advisory usage and confidentiality limits. |
actions/setup/js/types/safe-outputs.d.ts |
Add advisory payload types. |
actions/setup/js/types/safe-outputs-config.d.ts |
Add advisory handler configuration types. |
actions/setup/js/safe_outputs_tools.json |
Define runtime advisory tool schemas. |
actions/setup/js/safe_outputs_mcp_schema_validation.test.cjs |
Test advisory tool input schemas. |
actions/setup/js/safe_output_handler_manager.cjs |
Register runtime handlers and warning-mode classifications. |
actions/setup/js/create_security_advisory.test.cjs |
Test draft creation, validation, and error handling. |
actions/setup/js/create_security_advisory.cjs |
Implement draft-advisory creation. |
actions/setup/js/add_security_advisory_comment.test.cjs |
Test comments, attribution, limits, and failures. |
actions/setup/js/add_security_advisory_comment.cjs |
Implement attributed advisory comments. |
.github/workflows/pr-sous-chef.lock.yml |
Refresh generated validation-catalog entries. |
.github/aw/safe-outputs-automation.md |
Add advisory automation reference entries. |
.changeset/create-security-advisory.md |
Record the minor feature release. |
Review effort: Max (auto)
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs, /tdd, and /codebase-design. Requesting changes on one runtime-correctness issue. The rest is minor.
📋 Key Themes & Highlights
Key Themes
- App-token advisory scope:
permission-repository-advisoriesis not an input of the pinnedactions/create-github-app-token(SHA64ab729a, v3.3.0). The App path may mint a token without advisory write access. - Comment handler budget: the
maxcheck runs after report rendering, and failed POSTs do not count towardmax. Both need explicit tests. - Schema vs handler: the handler supports
max: -1, but the schema allows only 1 to 10.
Positive Highlights
- ✅ GHSA ID validation, body limits, and status-only error reporting avoid leaking confidential payloads.
- ✅
GITHUB_TOKENis rejected for advisory operations, with a clear compile-time error. - ✅ Targeted Go tests for the new compile and auth paths pass.
Limits of this review
- Vitest could not run because the npm registry is unreachable from this sandbox, so the JS suites were reviewed by reading only.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "8e3310d6cc6bc82ad69bf5cb7ec390366f2f2a8a",
"kind": "requested",
"schema_version": "1",
"state": "8b97aebff64538deee47b1264b22d089ff71dddd3e216bb9948f97051e9636d2",
"work": [
"6c014cee1a112333f89c6276d81229c687dec5a2b70d2e443e2a03c3362dd6c6",
"6c9a328b95501dc66ab070f25fddb9ede254d8bf8ecf1bbf23e1790fc49b79c1",
"7963ffe6d14ac5bdc62c511baf9e27acc3af26e1db937395407b33c37b27ba23",
"9942d6dd679991d2ec4de62de7050c07ded43928e32b1fa4cb6322fb8a90b980",
"ca38ba1c83aae8b29c2de02046de7560da4847b738e7719ef74c72db1cc6368e"
],
"workflow": "pr-sous-chef"
}
|
…isory-drafts Co-authored-by: gh-aw-bot <[email protected]>
Co-authored-by: gh-aw-bot <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Preserve the concurrent budget-validation and capped-rendering regressions while retaining verified GitHub App support, start_private_fork, redacted previews, and expression-based unlimited budgets. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: gh-aw-bot <[email protected]>
…s' into pelikhan/security-advisory-drafts # Conflicts: # pkg/workflow/safe_outputs_advisory_auth.go Co-authored-by: gh-aw-bot <[email protected]>
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "2ef84c4051af0df705d3b48b99aa91ff10a63d5f",
"kind": "requested",
"schema_version": "1",
"state": "034c24d4a1be42a487947f63c586e9e274632c825d810503de37abbf6f249dd2",
"work": [
"4ce4dd407e604d374ecd66edfd2afc18c54e2d0b3733dbac37ac8e9c8834fdba"
],
"workflow": "pr-sous-chef"
}
|
…isory-drafts Co-authored-by: gh-aw-bot <[email protected]>
|
@copilot ensure temporary ids resolution |
Co-authored-by: gh-aw-bot <[email protected]>
Merged latest main ( |
The existing temporary-ID mapping resolves issue numbers created by |
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "02e32b2228b28318e3cb2a7703e8beaa566f275d",
"kind": "requested",
"schema_version": "1",
"state": "b2d54fa847ca37c384da85ef03810961ff70dafcbabecd9ddddf7c7437d9290a",
"work": [
"42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac",
"e9d7501fc834b70ac771af5e7694ba7f29ea683b65e0f01f096571f99da4b76f"
],
"workflow": "pr-sous-chef"
}
|
Co-authored-by: gh-aw-bot <[email protected]>
Merged current |
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
|
🎉 This pull request is included in a new release. Release: |


Summary
create-security-advisoryto create draft advisories in the workflow repository. The handler never publishes advisories, creates private forks, or accepts an agent-selected repository.add-security-advisory-commentto post comments usingghsa_idandbody, with standard attribution and execution provenance. It never falls back to public issue comments.GITHUB_TOKEN, keep credentials out of agent configuration, and scope App tokens to advisory writes.ADR: ADR-76711: Require an External Token for Security Advisory Safe Outputs. Proposed; maintainer approval remains pending.
Review follow-up
-1, count failed API attempts, and preserve canonical advisory/comment URLs in recorded outcomes.start_private_fork: falseand GitHub App authentication based on the current API schema and pinned action's environment-input conversion; regressions cover the disputed contracts.API availability and confidentiality
Advisory comments use
POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/comments. The current GitHub REST reference documents this endpoint and advisory-write authentication; availability must be verified for the target installation, particularly GitHub Enterprise Server versions. Comments follow advisory visibility. Workflow logs, artifacts, and staged previews can contain advisory content, so a private draft alone does not make the run confidential. Preview secrets are redacted; API errors expose status without echoing confidential request bodies, and there are no issue-comment fallbacks or automatic retries.Validation
make agent-report-progressgate. The App-token findings were reproduced against unchanged source using a Go source overlay; no new custom-lint findings were reported for the advisory implementations.No advisory was created, no live advisory comment was posted, and no workflow was dispatched during validation.