Move threat detection into a separate detection job#22782
Conversation
|
@copilot detection artifact name is detection. |
- Add buildDetectionJob() in threat_detection.go - Update DetectionArtifactName to detection-artifact - Remove inline detection from agent job - Update all downstream dependencies to reference needs.detection - Update tests to reflect new structure Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/978a0be1-d91e-4077-8eb9-2d0fc3b13964
detection job
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/d543f2d3-1aa2-4e61-9b88-bba3e8de6d8c
Fixed in 5089d05 — reverted Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot detection is always on unless threat-detection is false. |
|
@copilot fix CI / Integration: Workflow Infra (pull_request)Failing after 41s |
Remove HasSafeOutputsEnabled guard from the default threat-detection mechanism so detection applies to any safe-outputs workflow regardless of which specific outputs are configured. Detection is now always on unless threat-detection: false is explicitly set. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/adcccf49-ce0b-4a8e-9e8c-ab84a62bc06e
Fixed in 82d9207. Removed the Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…needs.detection.outputs The test was checking for the old inline detection condition needs.agent.outputs.detection_success == 'true', but with the separate detection job, update_cache_memory now depends on needs.detection.outputs.detection_success == 'true'. Also fix stale comments in compiler_jobs.go and known_needs_expressions_test.go. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/61fd2981-722f-4572-8223-9f58dab01e27
Fixed in 50cd9d1. The Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/7314145e-57f5-4c0c-9021-9c1e60f26027
Fixed in 76b2ce1. The detection job now uses Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
✅ All tools validated successfully! Agent Container Smoke Test confirms agent container is ready. |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
@copilot add step that pulls containers for awf (no others needed) |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/1e242eb2-05b9-4d90-9651-39b101df8541
Fixed in d0717a1. Added Example generated step: - name: Download container images
run: bash ${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh ghcr.io/github/gh-aw-firewall/agent:0.25.0 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.0 ghcr.io/github/gh-aw-firewall/squid:0.25.0Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
✅ All tools validated successfully! Agent Container Smoke Test confirms agent container is ready. |
Agent Container Tool Check
Result: 12/12 tools available ✅ Overall Status: PASS
|
|
🔬 Smoke test §23522535542 —
Overall:
|
There was a problem hiding this comment.
Smoke test review ✅ — PR moves threat detection to a dedicated job, creating a cleaner workflow DAG. Output interface is properly cleaned up.
📰 BREAKING: Report filed by Smoke Copilot
| @@ -284,8 +284,6 @@ jobs: | |||
| GH_AW_WORKFLOW_ID_SANITIZED: agentperformanceanalyzer | |||
There was a problem hiding this comment.
✅ The removal of detection_conclusion and detection_success outputs from the agent job is a clean design choice — these outputs now live in the dedicated detection job where they belong.
| @@ -282,8 +282,6 @@ jobs: | |||
| GH_AW_WORKFLOW_ID_SANITIZED: agentpersonaexplorer | |||
There was a problem hiding this comment.
🔀 Moving threat detection into its own detection job creates a cleaner agent → detection → safe_outputs/conclusion DAG, improving isolation and auditability.
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
Smoke test run Merged PRs:
Results: GitHub MCP ✅ | Serena ✅ | Playwright ✅ | Web-fetch ✅ | File+cat ✅ | Build ✅
|
Detection steps were inlined in the
agentjob, making them impossible to disable independently and tightly coupling detection to the agent's execution environment.Changes
New
detectionjobbuildDetectionJob()that creates a dedicated job running afteragent(needs: agent,if: always() && needs.agent.result != 'skipped')agent_output.json, patches)detectiondetection_successanddetection_conclusionas job outputssafe-outputsworkflow; the only way to disable it is to setthreat-detection: falseexplicitlyubuntu-latestby default (overridable viathreat-detection.runs-on)squid,agent,api-proxy) before running detection — no other MCP images are neededneeds.detection.result == 'success'Agent job cleanup
compiler_yaml_main_job.godetection_success/detection_conclusionoutputs from agent jobDownstream dependency updates
All jobs that previously checked
needs.agent.outputs.detection_successnow depend ondetectionand checkneeds.detection.result == 'success'(job result, not output variable):safe_outputs— addeddetectiontoneeds, updatedifcondition toneeds.detection.result == 'success'safe-jobs— addeddetectiontoneedswhen threat detection enabledupdate_cache_memory— depends ondetection; condition isalways() && needs.detection.result == 'success'push_repo_memory— depends ondetectionwhen enabled; condition isalways() && needs.detection.result == 'success'unlock— addeddetectiontoneedsconclusion— depends on all workflow jobs via a newensureConclusionIsLastJob()final pass, guaranteeing it is always the last job to run; readsdetection_conclusionfromneeds.detection.outputs.detection_conclusionDefault-on detection
Removed the
HasSafeOutputsEnabledguard from the auto-default mechanism inextractSafeOutputsConfig. Detection is now auto-enabled for any configuredsafe-outputsworkflow, not just those with specific outputs enabled. Setthreat-detection: falseto opt out.Conclusion is always last
Added
ensureConclusionIsLastJob()— a final pass at the end ofbuildJobs()that iterates all jobs in the job manager and adds any not yet listed (exceptconclusionitself andpre_activation) to conclusion'sneeds. This catches custom user-defined jobs (e.g.post-issue,super_linter,check_ci_status) that were previously not included, ensuring the conclusion job truly runs last in every workflow.Resulting job DAG (when threat detection enabled)
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.
✨ PR Review Safe Output Test - Run 23519518981
Changeset
detectionjob forsafe-outputsworkflows and make threat detection default to enabled unlessthreat-detection: falseis set explicitly.✨ PR Review Safe Output Test - Run 23520167835