Skip to content

Include detection reporting permissions in conclusion App tokens - #74949

Merged
pelikhan merged 6 commits into
mainfrom
copilot/fix-conclusion-job-issues
Nov 5, 2026
Merged

pelikhan merged 6 commits into
mainfrom
copilot/fix-conclusion-job-issues

Conversation

Copilot AI commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Conclusion App tokens can lack issues: write even when detection reporting needs to create or update its tracking issue.

  • Permissions: Include issues: write when runnable detection has issue reporting enabled, including work-queue participants.
  • Scope: Preserve safe-output execution permissions; omit the detection grant when reporting is disabled or detection cannot run.
  • Coverage: Expand regression cases across conclusion reporters and reporting opt-outs.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix conclusion job failure detection issues in safe-outputs.github-app Include detection reporting permissions in conclusion App tokens Nov 4, 2026
Copilot AI requested a review from pelikhan November 4, 2026 19:48
@pelikhan
pelikhan marked this pull request as ready for review November 4, 2026 20:01
Copilot AI adaptive review requested due to automatic review settings November 4, 2026 20:01
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

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.

Generated from Test Quality Sentinel · routed: gpt56 max · ~1 AIC · ⌖ ~1 AIC · ⊞ 6.3K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Generated by Ponytail Reviewer for #74949

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

🏗️ Design Decision Gate — ADR Required

This PR makes significant changes to core business logic (>100 new lines) but does not have a linked Architecture Decision Record (ADR).

📄 Draft ADR committed: docs/adr/74949-derive-conclusion-app-token-issue-permissions.md — review and complete it before merging.

🔒 This PR cannot merge until an ADR is linked in the PR body.

🔎 Evidence used
📋 What to do next
  1. Review the draft ADR committed to your branch.

  2. Complete the missing sections — add context the AI could not infer, refine the decision rationale, and confirm the alternatives.

  3. Commit the finalized ADR to docs/adr/.

  4. Reference the ADR in this PR body by adding:

    ADR: ADR-74949: Derive Conclusion App Token Issue Permissions (link unavailable: invalid HTTPS URL)

Once the ADR is linked in the PR body, this gate will re-run and verify that the implementation matches the decision.

❓ Why ADRs Matter

ADRs create a searchable, permanent record of why the codebase looks the way it does, including the trade-offs future contributors need to understand.

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · pi · routed: gpt56 max · ~3 AIC · ⌖ ~2 AIC · ⊞ 7.7K · ◷
Comment /review to run again

@github-actions github-actions Bot 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.

Reviewed the changed permission logic and regression coverage. No actionable correctness, security, or performance issues found in the diff.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again

@github-actions github-actions Bot 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.

What this change does: It grants issues: write to the conclusion job when runnable threat detection reports to its tracking issue, including work-queue participants. It adds regression cases for normal and worker App-token paths.

Should fix:

  1. The App-token test matrix is broader than this change (pkg/workflow/notify_comment_test.go:L2177)

    • What this is: The table now carries seven independent config fields and repeats reporter cases already covered by TestConclusionJobIssuesWritePermissionDerivedFromConfig.
    • Problem: The failure, missing-tool, and default paths are unchanged here, so this detection-only regression now has a second matrix with roughly 50 extra maintenance lines.
    • Fix: Keep the baseline rows plus focused detection enabled, disabled, not-runnable, and worker rows; remove the unrelated reporter fields, rows, and exception assertion.
    • If we skip it: Each future conclusion reporter enlarges this table without protecting this change.

Verdict: fix 1 first.
Not checked: Targeted Go tests could not run because this checkout requires Go 1.27.3, the runner has Go 1.26.10, and the automatic toolchain download failed TLS validation.
Lean: -52 lines possible.

Generated by ✂️ Ponytail Reviewer for #74949 · codex · routed: gpt56 max · ~5 AIC · ⌖ ~1 AIC · ⊞ 118
Comment /ponytail to run again

name string
reportFailedJobs *TemplatableBool
reportFailureAsIssue *TemplatableBool
threatDetection *ThreatDetectionConfig

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.

What this is: This table now carries seven independent config fields and repeats the existing reporter cases. Problem: TestConclusionJobIssuesWritePermissionDerivedFromConfig already covers failure, missing-tool, and default paths; adding them here makes a detection-only regression require edits in a second matrix and adds roughly 50 lines for behavior this change does not touch. Fix: Keep the baseline rows plus focused detection enabled/disabled/not-runnable and worker rows; remove the unrelated reporter fields/rows and the exception assertion. If we skip it: Each future conclusion reporter enlarges this table without protecting this change.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 7ac4bc9. Kept the baseline and focused detection/worker cases, removed unrelated reporter fields and rows, and made the safe-output permission assertion unconditional. Added worker non-runnable coverage and checked that reporting-step emission matches the detection permission grant. Targeted tests and the final validation gate pass.

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

Default detection reporting now requires issues: write, risking reusable-workflow validation and App token creation failures without documentation of the permission requirement and opt-out.

1 open issue
What changed in this PR

Updates the workflow compiler so conclusion jobs and their GitHub App tokens have the permissions needed to report detection results as issues.

Changes:

  • Add issues: write for runnable detection with issue reporting enabled, including work-queue participants.
  • Preserve reporting opt-outs and safe-output execution permissions.
  • Expand regression coverage across conclusion reporters and detection settings.
File Description
pkg/​workflow/​notify_comment.go Include detection reporting in conclusion permission derivation.
pkg/​workflow/​notify_comment_test.go Cover reporter permissions, opt-outs, non-runnable detection, and work-queue cases.

Review effort: Max (auto)

Comment thread pkg/workflow/notify_comment.go Outdated
if conclusionMissingToolCreateIssueEnabled(data) {
return true
}
if IsDetectionJobEnabled(data.SafeOutputs) && data.SafeOutputs.ThreatDetection.IsReportAsIssueEnabled() {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 7ac4bc9. The threat-detection reference now documents issues: write requirements for reusable callers and GitHub Apps, plus the report-as-issue: false opt-out that preserves enforcement. ADR-54630's opt-out list now includes detection reporting.

@github-actions github-actions Bot 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.

Skills-Based Review 🧠

Applied /codebase-design and /tdd. The behaviour is correct; one refactor suggestion is posted inline.

📋 Key Themes & Highlights

Key Themes

  • Duplicated gate: the detection-reporting predicate appears in notify_comment.go at L185 and L276. Extracting a helper prevents drift.
  • Test coverage: TestConclusionGitHubAppTokenUsesConclusionPermissions covers the worker and general paths well. An observer/dispatcher case with detection reporting enabled would close the remaining gap, since that role takes the general path.

Positive Highlights

  • ✅ The grant uses the same condition as the detection-runs step (buildConclusionDetectionRunsStep), so permission and behaviour agree.
  • ✅ IsReportAsIssueEnabled is nil-safe and defaults to true, matching the documented behaviour.
  • ✅ The grant is additive and applied after ComputePermissionsForSafeOutputs, so safe-output permissions are unchanged.
  • ✅ gh aw compile produces no lock-file diffs.

Validation Notes

  • go test ./pkg/workflow -run TestConclusion passes. go vet and gofmt are clean.
  • Four unrelated full-suite failures (TestVerifyGitCredentials, TestCredentialFreePromptEnvironment, and others) look environmental. I could not confirm them against the base commit because the sandbox blocks git fetch.
  • Skill selection was done directly from the diff. The pr-triage step was not run.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~1 AIC · ⊞ 5.4K
Comment /matt to run again

Comment thread pkg/workflow/notify_comment.go Outdated
conclusionPerms.Set(PermissionContents, PermissionWrite)
conclusionPerms.Set(PermissionIssues, PermissionWrite)
}
if IsDetectionJobEnabled(data.SafeOutputs) && data.SafeOutputs.ThreatDetection.IsReportAsIssueEnabled() {

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.

[/codebase-design] The detection-reporting predicate IsDetectionJobEnabled(data.SafeOutputs) && data.SafeOutputs.ThreatDetection.IsReportAsIssueEnabled() is repeated here and at conclusionMayCreateIssue (L276). If only one site changes, the permission grant and the detection-runs step can drift apart. Extract a shared helper and call it from both places.

💡 Suggested helper
func conclusionDetectionMayCreateIssue(data *WorkflowData) bool {
	return IsDetectionJobEnabled(data.SafeOutputs) && data.SafeOutputs.ThreatDetection.IsReportAsIssueEnabled()
}

The && short-circuit keeps it nil-safe because IsDetectionJobEnabled returns false when SafeOutputs or ThreatDetection is nil.

@copilot please address this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 7ac4bc9. Added conclusionDetectionMayCreateIssue and reused it for both permission derivation paths and the detection-runs step, keeping the opt-out and runnable-detection checks aligned. Focused conclusion/detection tests and final validation pass.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (pkg/workflow/notify_comment_test.go:2177): What this is: This table now carries seven independent config fields and repeats the existing reporter cases. Problem: TestConclusionJobIssuesWritePermissionDerivedFromConfig already covers failure, missing-tool, and default paths; adding them here makes a detection-only regression require edits in a second matrix and adds roughly 50 lines for behavior this change does not touch. Fix: Keep the baseline rows plus focused detection enabled/disabled/not-runnable and worker rows; remove the unrelated reporter fields/rows and the exception assertion. If we skip it: Each future con... - Include detection reporting permissions in conclusion App tokens #74949 (comment)
  3. Review (pkg/workflow/notify_comment.go:276): Recompiling with default detection reporting now requests issues: write even when all other issue-writing paths are disabled. Reusable workflow callers without that scope can fail load-time validation, and Apps without Issues write can fail token creation. Document the permission requirement and safe-outputs.threat-detection.report-as-issue: false opt-out in docs/src/content/docs/reference/threat-detection.md, and update ADR-54630's opt-out list. - Include detection reporting permissions in conclusion App tokens #74949 (comment)
  4. Review (pkg/workflow/notify_comment.go:185): [/codebase-design] The detection-reporting predicate IsDetectionJobEnabled(data.SafeOutputs) && data.SafeOutputs.ThreatDetection.IsReportAsIssueEnabled() is repeated here and at conclusionMayCreateIssue (L276). If only one site changes, the permission grant and the detection-runs step can drift apart. Extract a shared helper and call it from both places. - Include detection reporting permissions in conclusion App tokens #74949 (comment)

Once you start work, post this work summary as a PR comment, 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: 29b854e
Sous-chef requested-work: 350ae21596cca6d722d67583f022bd7ef1674c917d2cf1b26617cda0bad3d980 f4fb56a9d6351864fb17bc114dd1f8f148d8f0e66870d4bf62149590680ce7f9 fad6020e62bb57e177c0b16936743ee4277a4d7859dec3c0492b4c449c7655b1
Sous-chef requested-state: e3e382c4f03e6936044610c44de60ea45b93d1fa0fc9c32db4da2f3c44f6c0f1

Generated by 👨🍳 PR Sous Chef · pi · haiku45 · ~9 AIC · ⌖ ~8 AIC · ⊞ 1.2K · ◷
Comment /souschef to run again

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (pkg/workflow/notify_comment_test.go:2177): What this is: This table now carries seven independent config fields and repeats the existing reporter cases. Problem: TestConclusionJobIssuesWritePermissionDerivedFromConfig already covers failure, missing-tool, and default paths; adding them here makes a detection-only regression require edits in a second matrix and adds roughly 50 lines for behavior this change does not touch. Fix: Keep the baseline rows plus focused detection enabled/disabled/not-runnable and worker rows; remove the unrelated reporter fields/rows and the exception assertion. If we skip it: Each future conclusion reporter enlarges this table without protecting this change. - Include detection reporting permissions in conclusion App tokens #74949 (comment)
  3. Review (pkg/workflow/notify_comment.go:276): Recompiling with default detection reporting now requests issues: write even when all other issue-writing paths are disabled. Reusable workflow callers without that scope can fail load-time validation, and Apps without Issues write can fail token creation. Document the permission requirement and safe-outputs.threat-detection.report-as-issue: false opt-out in docs/src/content/docs/reference/threat-detection.md, and update ADR-54630's opt-out list. - Include detection reporting permissions in conclusion App tokens #74949 (comment)
  4. Review (pkg/workflow/notify_comment.go:185): [/codebase-design] The detection-reporting predicate IsDetectionJobEnabled(data.SafeOutputs) && data.SafeOutputs.ThreatDetection.IsReportAsIssueEnabled() is repeated here and at conclusionMayCreateIssue (L276). If only one site changes, the permission grant and the detection-runs step can drift apart. Extract a shared helper and call it from both places. - Include detection reporting permissions in conclusion App tokens #74949 (comment)

Once you start work, post this work summary as a PR comment, 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: 29b854e
Sous-chef requested-work: 350ae21596cca6d722d67583f022bd7ef1674c917d2cf1b26617cda0bad3d980 f4fb56a9d6351864fb17bc114dd1f8f148d8f0e66870d4bf62149590680ce7f9 fad6020e62bb57e177c0b16936743ee4277a4d7859dec3c0492b4c449c7655b1
Sous-chef requested-state: e3e382c4f03e6936044610c44de60ea45b93d1fa0fc9c32db4da2f3c44f6c0f1

Generated by 👨🍳 PR Sous Chef · pi · haiku45 · ~16 AIC · ⌖ ~13 AIC · ⊞ 1.2K · ◷
Comment /souschef to run again

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (pkg/workflow/notify_comment_test.go:2177): What this is: This table now carries seven independent config fields and repeats the existing reporter cases. Problem: TestConclusionJobIssuesWritePermissionDerivedFromConfig already covers failure, missing-tool, and default paths; adding them here makes a detection-only regression require edits in a second matrix and adds roughly 50 lines for behavior this change does not touch. Fix: Keep the baseline rows plus focused detection enabled/disabled/not-runnable and worker rows; remove the unrelated reporter fields/rows and the exception assertion. If we skip it: Each future conclusion reporter enlarges this table without protecting this change. - Include detection reporting permissions in conclusion App tokens #74949 (comment)
  3. Review (pkg/workflow/notify_comment.go:276): Recompiling with default detection reporting now requests issues: write even when all other issue-writing paths are disabled. Reusable workflow callers without that scope can fail load-time validation, and Apps without Issues write can fail token creation. Document the permission requirement and safe-outputs.threat-detection.report-as-issue: false opt-out in docs/src/content/docs/reference/threat-detection.md, and update ADR-54630's opt-out list. - Include detection reporting permissions in conclusion App tokens #74949 (comment)
  4. Review (pkg/workflow/notify_comment.go:185): [/codebase-design] The detection-reporting predicate IsDetectionJobEnabled(data.SafeOutputs) && data.SafeOutputs.ThreatDetection.IsReportAsIssueEnabled() is repeated here and at conclusionMayCreateIssue (L276). If only one site changes, the permission grant and the detection-runs step can drift apart. Extract a shared helper and call it from both places. - Include detection reporting permissions in conclusion App tokens #74949 (comment)

Once you start work, post this work summary as a PR comment, 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: 29b854e
Sous-chef requested-work: 350ae21596cca6d722d67583f022bd7ef1674c917d2cf1b26617cda0bad3d980 f4fb56a9d6351864fb17bc114dd1f8f148d8f0e66870d4bf62149590680ce7f9 fad6020e62bb57e177c0b16936743ee4277a4d7859dec3c0492b4c449c7655b1
Sous-chef requested-state: e3e382c4f03e6936044610c44de60ea45b93d1fa0fc9c32db4da2f3c44f6c0f1

Generated by 👨🍳 PR Sous Chef · pi · haiku45 · ~12 AIC · ⌖ ~16 AIC · ⊞ 1.2K · ◷
Comment /souschef to run again

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (pkg/workflow/notify_comment_test.go:2177): What this is: This table now carries seven independent config fields and repeats the existing reporter cases. Problem: TestConclusionJobIssuesWritePermissionDerivedFromConfig already covers failure, missing-tool, and default paths; adding them here makes a detection-only regression require edits in a second matrix and adds roughly 50 lines for behavior this change does not touch. Fix: Keep the baseline rows plus focused detection enabled/disabled/not-runnable and worker rows; remove the unrelated reporter fields/rows and the exception assertion. If we skip it: Each future conclusion reporter enlarges this table without protecting this change. - Include detection reporting permissions in conclusion App tokens #74949 (comment)
  3. Review (pkg/workflow/notify_comment.go:276): Recompiling with default detection reporting now requests issues: write even when all other issue-writing paths are disabled. Reusable workflow callers without that scope can fail load-time validation, and Apps without Issues write can fail token creation. Document the permission requirement and safe-outputs.threat-detection.report-as-issue: false opt-out in docs/src/content/docs/reference/threat-detection.md, and update ADR-54630's opt-out list. - Include detection reporting permissions in conclusion App tokens #74949 (comment)
  4. Review (pkg/workflow/notify_comment.go:185): [/codebase-design] The detection-reporting predicate IsDetectionJobEnabled(data.SafeOutputs) && data.SafeOutputs.ThreatDetection.IsReportAsIssueEnabled() is repeated here and at conclusionMayCreateIssue (L276). If only one site changes, the permission grant and the detection-runs step can drift apart. Extract a shared helper and call it from both places. - Include detection reporting permissions in conclusion App tokens #74949 (comment)

Once you start work, post this work summary as a PR comment, 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: 29b854e
Sous-chef requested-work: 350ae21596cca6d722d67583f022bd7ef1674c917d2cf1b26617cda0bad3d980 f4fb56a9d6351864fb17bc114dd1f8f148d8f0e66870d4bf62149590680ce7f9 fad6020e62bb57e177c0b16936743ee4277a4d7859dec3c0492b4c449c7655b1
Sous-chef requested-state: e3e382c4f03e6936044610c44de60ea45b93d1fa0fc9c32db4da2f3c44f6c0f1

Generated by 👨🍳 PR Sous Chef · pi · haiku45 · ~19 AIC · ⌖ ~14 AIC · ⊞ 1.2K · ◷
Comment /souschef to run again

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (pkg/workflow/notify_comment_test.go:2177): What this is: This table now carries seven independent config fields and repeats the existing reporter cases. Problem: TestConclusionJobIssuesWritePermissionDerivedFromConfig already covers failure, missing-tool, and default paths; adding them here makes a detection-only regression require edits in a second matrix and adds roughly 50 lines for behavior this change does not touch. Fix: Keep the baseline rows plus focused detection enabled/disabled/not-runnable and worker rows; remove the unrelated reporter fields/rows and the exception assertion. If we skip it: Each future conclusion reporter enlarges this table without protecting this change. - Include detection reporting permissions in conclusion App tokens #74949 (comment)
  3. Review (pkg/workflow/notify_comment.go:276): Recompiling with default detection reporting now requests issues: write even when all other issue-writing paths are disabled. Reusable workflow callers without that scope can fail load-time validation, and Apps without Issues write can fail token creation. Document the permission requirement and safe-outputs.threat-detection.report-as-issue: false opt-out in docs/src/content/docs/reference/threat-detection.md, and update ADR-54630's opt-out list. - Include detection reporting permissions in conclusion App tokens #74949 (comment)
  4. Review (pkg/workflow/notify_comment.go:185): [/codebase-design] The detection-reporting predicate IsDetectionJobEnabled(data.SafeOutputs) && data.SafeOutputs.ThreatDetection.IsReportAsIssueEnabled() is repeated here and at conclusionMayCreateIssue (L276). If only one site changes, the permission grant and the detection-runs step can drift apart. Extract a shared helper and call it from both places. - Include detection reporting permissions in conclusion App tokens #74949 (comment)

Once you start work, post this work summary as a PR comment, 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: 29b854e
Sous-chef requested-work: 350ae21596cca6d722d67583f022bd7ef1674c917d2cf1b26617cda0bad3d980 f4fb56a9d6351864fb17bc114dd1f8f148d8f0e66870d4bf62149590680ce7f9 fad6020e62bb57e177c0b16936743ee4277a4d7859dec3c0492b4c449c7655b1
Sous-chef requested-state: e3e382c4f03e6936044610c44de60ea45b93d1fa0fc9c32db4da2f3c44f6c0f1

Generated by 👨🍳 PR Sous Chef · pi · haiku45 · ~21 AIC · ⌖ ~16 AIC · ⊞ 1.2K · ◷
Comment /souschef to run again

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (pkg/workflow/notify_comment_test.go:2177): What this is: This table now carries seven independent config fields and repeats the existing reporter cases. Problem: TestConclusionJobIssuesWritePermissionDerivedFromConfig already covers failure, missing-tool, and default paths; adding them here makes a detection-only regression require edits in a second matrix and adds roughly 50 lines for behavior this change does not touch. Fix: Keep the baseline rows plus focused detection enabled/disabled/not-runnable and worker rows; remove the unrelated reporter fields/rows and the exception assertion. If we skip it: Each future conclusion reporter enlarges this table without protecting this change. - Include detection reporting permissions in conclusion App tokens #74949 (comment)
  3. Review (pkg/workflow/notify_comment.go:276): Recompiling with default detection reporting now requests issues: write even when all other issue-writing paths are disabled. Reusable workflow callers without that scope can fail load-time validation, and Apps without Issues write can fail token creation. Document the permission requirement and safe-outputs.threat-detection.report-as-issue: false opt-out in docs/src/content/docs/reference/threat-detection.md, and update ADR-54630's opt-out list. - Include detection reporting permissions in conclusion App tokens #74949 (comment)
  4. Review (pkg/workflow/notify_comment.go:185): [/codebase-design] The detection-reporting predicate IsDetectionJobEnabled(data.SafeOutputs) && data.SafeOutputs.ThreatDetection.IsReportAsIssueEnabled() is repeated here and at conclusionMayCreateIssue (L276). If only one site changes, the permission grant and the detection-runs step can drift apart. Extract a shared helper and call it from both places. - Include detection reporting permissions in conclusion App tokens #74949 (comment)

Once you start work, 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: 29b854e
Sous-chef requested-work: 350ae21596cca6d722d67583f022bd7ef1674c917d2cf1b26617cda0bad3d980 f4fb56a9d6351864fb17bc114dd1f8f148d8f0e66870d4bf62149590680ce7f9 fad6020e62bb57e177c0b16936743ee4277a4d7859dec3c0492b4c449c7655b1
Sous-chef requested-state: e3e382c4f03e6936044610c44de60ea45b93d1fa0fc9c32db4da2f3c44f6c0f1

Generated by 👨🍳 PR Sous Chef · pi · haiku45 · ~18 AIC · ⌖ ~22 AIC · ⊞ 1.2K · ◷
Comment /souschef to run again

@pelikhan

pelikhan commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

@copilot make sure that this behavior can be disabled through the "report-as-issue: false" field in safe outputs (or similar existing field name)

Copilot AI and others added 2 commits November 4, 2026 23:07
…n-job-issues

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…ions

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

@copilot make sure that this behavior can be disabled through the "report-as-issue: false" field in safe outputs (or similar existing field name)

Verified and preserved in 7ac4bc9: safe-outputs.threat-detection.report-as-issue: false disables the tracking-issue step and detection-specific issues: write grant, including for workers, without disabling detection or enforcement. Focused regression tests pass. Other enabled issue reporters can still require issues: write.

@pelikhan
pelikhan merged commit d17bfa1 into main Nov 5, 2026
6 of 7 checks passed
@pelikhan
pelikhan deleted the copilot/fix-conclusion-job-issues branch November 5, 2026 06:12
github-actions Bot added a commit that referenced this pull request Nov 5, 2026
…forks flag

Document safe-output output_id/depends-on dependency gating (#74376),
the managed source-sha frontmatter field (#74948), the
dangerously-allow-pull-request-target-forks-all feature flag (#74884),
and detection report-as-issue permission requirements (#74949).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

safe-outputs.github-app: conclusion job cannot open failure/detection issues (token minted without issues scope)

4 participants