Repository navigation
[safe-output-integrator] test: cover safe-output authorization coverage - #79321
Conversation
Add authorization workflow fixture and compiler configuration coverage.\n\nCo-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
A moderate finding remains because the workflow-level OIDC permission grants id-token write to the agent job even though the configured noop output does not require OIDC.
1 open issue
What changed in this PR
Adds safe-output authorization coverage through compiler serialization tests and a Copilot workflow fixture.
Changes:
- Verifies serialization of the global
authorizationhandler-manager configuration. - Adds a Copilot workflow fixture with HTTPS authorization settings and a bounded
noopsafe output. - The fixture grants workflow-wide
id-token: writepermission, unnecessarily broadening OIDC access to the agent job.
| File | Description |
|---|---|
| pkg/workflow/compiler_safe_outputs_config_test.go | Adds a compiler test case covering serialization of the global safe-output authorization configuration. |
| pkg/cli/workflows/test-copilot-authorization.md | Adds a Copilot workflow fixture exercising global authorization settings with the noop safe output and workflow-wide OIDC permission. |
Review effort: Lite (adaptive)
| permissions: | ||
| id-token: write | ||
| engine: copilot | ||
| safe-outputs: |
There was a problem hiding this comment.
Removed the workflow-level OIDC grant in 74d49a2. The compiled agent job no longer receives id-token: write.
|
🍳 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": "bee5b2c3aed44c9ed8cc04d00bad870e3f4caeea",
"kind": "requested",
"schema_version": "1",
"state": "6b84c19eebb5fa04da228812f73400d540f0cf93025031f6d29bbe77b28f19ec",
"work": [
"33570404049fed4d9cd141a2c5665f4fe0a5581dc25ea2afe32893714cf2858e"
],
"workflow": "pr-sous-chef"
}
|
…rization-coverage-e660e3ef59454c3a Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
There was a problem hiding this comment.
💥 [THE END] — Illustrated by Smoke Claude · claude · sonnet46 · ~85 AIC · ⌖ ~6 AIC · ⊞ 1K
Comment /smoke-claude to run again
| max: 2 | ||
| --- | ||
|
|
||
| # Test Safe Output Authorization |
There was a problem hiding this comment.
✅ Smoke test review comment #1 (Run 44598742833): The workflow title is clear and descriptive. Consider adding a brief description of what authorization means in context for new contributors.
| expectedEnvironment string | ||
| checkRequireAgentSuccess bool | ||
| }{ | ||
| { |
There was a problem hiding this comment.
✅ Smoke test review comment #2 (Run 44598742833): Good test case naming convention. The authorization config test follows the existing pattern well. The expectedKeys check for "authorization" is a good regression guard.
There was a problem hiding this comment.
🔵 Needs a closer look
A critical workflow fixture grants top-level id-token: write even though it only uses the builtin noop output, unnecessarily propagating token access to the agent job and violating least privilege.
Review effort: Lite (adaptive)

Overview
Add the missing safe-output authorization coverage identified by the fixture and compiler-test audit.
Key metrics/issues
authorization)git diff --check: passedDetails
The fixture configures the global HTTPS authorization endpoint and audience with OIDC permission, and exercises the
noopsafe output. The compiler test verifies the serializedauthorizationhandler-manager key.Next actions
Run the targeted Go test in an environment with the required Go toolchain available.
✨ PR Review Safe Output Test - Run 44598742833