Repository navigation
Classify Copilot tool denials and align workflow allowlists - #75986
Conversation
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
|
❌ PR Specification Reviewer failed to deliver outputs. Please review the logs for details. Caution agentic threat detected DetailsPotential security threats were detected in the agent output. Detected threat types: malicious patch. Review the workflow run logs for details.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ 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.
|
|
✅ 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.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: 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.
|
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.
I found one actionable issue: the new wildcarded grep allowlist can permit model-supplied options or extra file operands, potentially reading outside the intended scan directory. Please constrain those command shapes before merge. I also reviewed the denial-classification changes and workflow guidance; no additional blocking issues were identified from the capped diff. Static review only; tests were not run per review instructions.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~2 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: malicious patch.
Review the workflow run logs for details.
Reviewed PR head 142f43a9a36845c4999926fe22617839a39d0fc5 against Copilot SDK Driver Specification v1.0.2 and security architecture requirements.
Blocking finding
- Prompt-injectable denial classification (
actions/setup/js/permission_denied_helpers.cjs:78, also recorded by the existing inline review comment):hasWorkflowToolPermissionDenial()trusts a forgeable line-shaped[sdk-driver] permission denied by workflow tool permissions:marker in untrusted combined model/driver output. An agent can emit that text and forcepermission_denied, suppress retries, and trigger missing-tool guidance despite no actual SDK denial. The added negative test only rejects non-line-leading text; it does not establish provenance. Fix by classifying only a trusted structured SDK event/channel or by authenticating/separating driver stderr from model output; do not broaden the regex to accept textual markers. This is required to preserve fail-secure/auditable security behavior.
Specification synchronization
Queued commit f08ac02 via safe output updates docs/src/content/docs/specs/copilot-sdk-driver-specification.md from v1.0.2 to v1.0.3. It documents the anchored marker contract, retry termination, non-escalation guidance, and adds T-CSD-112/113. This documentation update does not resolve the provenance flaw above.
Coverage limit: static review only; no PR code, tests, or conformance scripts were executed, per review policy.
Generated by PR Specification Reviewer for #75986 · copilot · gpt50 · ~5 AIC · ⌖ ~3 AIC · ⊞ 1.7K
Comment /review-specs to run again
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the workflow tool-denial handling changes.
No open issues 🎉
What changed in this PR
This PR updates gh-aw’s Copilot failure handling to distinguish workflow tool denials from generic CLI failures, addressing #75853 and avoiding futile retries.
Changes:
- Recognize SDK-marked tool denials, stop retries, and provide workflow-permission guidance without suggesting credential escalation.
- Clarify command boundaries in four workflow prompts, update scan and verifier allowlists, and regenerate five workflow locks.
- Add denial-classification regression coverage and an index-search reference to the workflow skill.
| File | Description |
|---|---|
actions/setup/js/safeoutputs_cli.cjs |
Updates the permission-denial suppression comment. |
actions/setup/js/permission_denied_helpers.test.cjs |
Tests marker matching and denial-specific reporting. |
actions/setup/js/permission_denied_helpers.cjs |
Requires the SDK marker and tailors missing-tool guidance. |
actions/setup/js/harness_failure_handling.test.cjs |
Updates expected permission-failure log messages. |
actions/setup/js/harness_failure_handling.cjs |
Generalizes log wording beyond repeated denials. |
actions/setup/js/copilot_harness.test.cjs |
Tests explicit denial classification and retry suppression. |
actions/setup/js/copilot_harness.cjs |
Integrates explicit denials into classification and stop handling. |
.github/workflows/pr-specification-reviewer.md |
Adds standalone-command and blocked-operation guidance. |
.github/workflows/pr-specification-reviewer.lock.yml |
Refreshes hashes for the revised prompt. |
.github/workflows/daily-squid-image-scan.md |
Sets issue-only GitHub tools and adds scan-log commands. |
.github/workflows/daily-squid-image-scan.lock.yml |
Regenerates tool configuration and workflow hashes. |
.github/workflows/daily-spdd-spec-planner.md |
Adds standalone-command and blocked-operation guidance. |
.github/workflows/daily-spdd-spec-planner.lock.yml |
Refreshes hashes for the revised prompt. |
.github/workflows/daily-formal-spec-verifier.md |
Allows the TLA+ installer test and clarifies shell boundaries. |
.github/workflows/daily-formal-spec-verifier.lock.yml |
Regenerates verifier permissions and workflow hashes. |
.github/workflows/daily-community-attribution.md |
Adds standalone-command and blocked-operation guidance. |
.github/workflows/daily-community-attribution.lock.yml |
Refreshes prompt, admission, and harness hashes. |
.github/skills/agentic-workflows/SKILL.md |
Adds the index-search documentation reference. |
Review effort: Balanced (auto)
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs and /tdd. Requesting changes: the workflow-denial detector can be spoofed from agent output, and the prompt guidance is not in the compiled locks.
📋 Key Themes & Highlights
Key Themes
- Spoofable signal:
hasWorkflowToolPermissionDenialmatches a line-start[sdk-driver]line, and the harness classifies assistant-influenced output. An echoed line forcespermission_deniedand suppresses retries (verified). - Test gap: the negative test covers only a mid-line phrase, so the spoof path is untested.
- Allowlist breadth: unquoted
grep -nE */grep -oE *and a full pipeline entry in the squid job widen the command surface. - Lock drift: the new prompt guidance is absent from the four affected
.lock.ymlfiles at HEAD. Runmake recompile.
Positive Highlights
- ✅ The
permission deniedclassification is now separated from generic CLI failures, with a clear reason and retry behaviour. - ✅ The rename from "numerous permission-denied" to a precise workflow-denial reason makes logs easier to act on.
- ✅ Explicit test assertions updated alongside the behaviour change.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~11 AIC · ⌖ ~2 AIC · ⊞ 6.3K
Comment /matt to run again
|
Copilot assignment requested for the following outstanding work:
Once you start work, post this work summary as a PR comment without the leading Copilot mention, including the Sous-chef head, work, and state lines below, to record that the assignment is running. Apply the necessary fixes on this PR's existing branch, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved; stop when only human review or CI remains. Do not merge or trigger CI. Sous-chef requested-head: 142f43a
|
Sous-chef requested-head: 142f43a Work is underway: I’m merging the latest main, narrowing the scan-log command allowlist, replacing denial detection based on agent-visible text with a trusted structured signal, verifying the TLA+ installer script boundary, recompiling workflow locks, and investigating the cited failing checks. I’ll validate changes and respond to the actionable review threads. |
…-tool-allowlist-denials Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Separate workflow-denial exit status from model verification, reject assistant-shaped control signals, and pin pre-agent workflow permission boundaries. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Validate compiled indexing before the shell-disabled agent, preserve exact per-tag severity counts, and cover missing-log failures without restoring agent shell access. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Disable editing in workflow source, regenerate the lock, and verify both SDK permission channels preserve only read and reporting access. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep repeated permission-denial text diagnostic only across retry, classification, and missing-tool decisions, with SDK and CLI spoofing regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Workflow allowlist denials could surface as generic CLI failures, triggering futile retries and aborting scans. Several affected workflows also needed clearer tool-boundary guidance or explicit permissions for required operations.
Denial handling
permission_denied, stop retries, and report missing-tool guidance without suggesting credential escalation.Workflow alignment