You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
github/gh-aw-threat-detection publishes the standalone threat-detect binary that gh-aw uses when features: gh-aw-detection: true is set. Upstream audited the external detector path against gh-aw's inline path (buildDetectionEngineExecutionStep + parse_threat_detection_results.cjs) to confirm that flipping workflows over would not regress checks, logging, or behavior.
Most of the resulting work landed upstream and shipped in v0.4.0. This meta-issue tracks the subset that can only be fixed in gh-aw, because the relevant values are produced by the compiler and never reach the binary.
Upstream sources, all reviewed and consolidated here:
Several documented, user-facing features are currently inert on the external path, silently. None emits a warning; all of them look like they are working. Three items are more than cosmetic:
Note: the GITHUB_STEP_SUMMARY writability caution originally listed as a bullet in #50647 is superseded by #50659 and should be dropped from that issue.
Two behavioral questions must be settled explicitly rather than by omission:
mustFail (threat-detection: delegate all conclude branches to threat-detect conclude on the external path #50646).threat-detect conclude fails closed in warn mode when the engine step also failed; parse_threat_detection_results.cjs always warns and proceeds, per ADR 29031-threat-detection-resilience-in-warn-mode. Delegating changes behavior for every workflow currently in warn mode, silently, the moment it sets gh-aw-detection: true. Either upstream drops mustFail to match ADR 29031, or gh-aw adopts it on the inline path too and ADR 29031 is amended. Upstream is happy either way and asks only that the decision be recorded.
Lower-stakes decisions, but still worth writing down: whether experiments/ belongs inside the detection surface (#50647), whether the Setup threat detection step is retired entirely on the external path (#50653), and whether non-proxy detector invocation is supported at all (#50654).
The agent job uses the same ineffective GITHUB_STEP_SUMMARY redirect mechanism across all five engines. If the runner re-injects the file-command variable there too, agent-step-summary.md has been empty all along and nobody noticed, because no agent treats the write failure as an error. #50659 includes verifying this; if confirmed, it needs its own issue since it touches every engine.
Validated as already fixed — no issue filed
Two upstream asks were checked against main and are already resolved. Recording them so they are not re-filed:
apiProxy.models missing from the detection AWF config. Upstream reported Copilot model aliases such as auto failing to resolve in the detection job with 400 The requested model is not supported. pkg/workflow/threat_detection_external.go:319 now propagates data.ModelMappings into the detection workflow data, and lines 280-315 additionally resolve the detection model explicitly rather than leaving it as an alias. Upstream's local workaround (pinning safe-outputs.threat-detection.model) can be removed once they re-test.
Every issue above closed or explicitly waived with rationale recorded.
A side-by-side run of the same workflow on both paths produces equivalent job-log diagnostics, equivalent conclusion / reason / success outputs across the full failure matrix, and an equivalent or better verdict.
Both decisions above recorded (ADR amendment where applicable).
docs/src/content/docs/reference/threat-detection.md updated to describe the resulting external-path contract.
Context
github/gh-aw-threat-detectionpublishes the standalonethreat-detectbinary that gh-aw uses whenfeatures: gh-aw-detection: trueis set. Upstream audited the external detector path against gh-aw's inline path (buildDetectionEngineExecutionStep+parse_threat_detection_results.cjs) to confirm that flipping workflows over would not regress checks, logging, or behavior.Most of the resulting work landed upstream and shipped in v0.4.0. This meta-issue tracks the subset that can only be fixed in gh-aw, because the relevant values are produced by the compiler and never reach the binary.
Upstream sources, all reviewed and consolidated here:
Headline findings
Several documented, user-facing features are currently inert on the external path, silently. None emits a warning; all of them look like they are working. Three items are more than cosmetic:
GITHUB_STEP_SUMMARYis unwritable inside the AWF sandbox (threat-detection: GITHUB_STEP_SUMMARY is unwritable in the AWF sandbox, aborting the v0.4.0 detector with exit 2 #50659). This is the practical blocker for the pin bump.threat-detect concludeon the external path #50646).[!CAUTION] agentic threat detected(threat-detection: strict-mode conclude failure writes no outputs, rendering infra failures as detected threats #50645).Work items
GITHUB_STEP_SUMMARYunwritable in the AWF sandbox, aborts v0.4.0 with exit 2threat-detectv0.4.0threat-detect concludeprompt-template.txt,prompt-import-tree.json,aw_info.json,comment-memory/max-ai-creditsnot propagated to the external AWF configNote: the
GITHUB_STEP_SUMMARYwritability caution originally listed as a bullet in #50647 is superseded by #50659 and should be dropped from that issue.Suggested sequencing
max-ai-creditsis not propagated to the external detector's AWF config #50654 as one PR. All touch the detection-job step builders, all need the samegh aw compilelock-file refresh, and all are safe against the currently pinned binary. Batching avoids repeated lock-file conflicts. (threat-detection: external path writes an unused prompt to the step summary, duplicating the detector's real one #50653 is grouped here for lock-file locality but should be verified after threat-detection: GITHUB_STEP_SUMMARY is unwritable in the AWF sandbox, aborting the v0.4.0 detector with exit 2 #50659.)threat-detect concludeon the external path #50646 once threat-detection: bump external detector pin to threat-detect v0.4.* (Wait for v0.4.* to pass local smokes) #50644 lands and themustFaildecision below is recorded.Decisions required before merging
Two behavioral questions must be settled explicitly rather than by omission:
mustFail(threat-detection: delegate all conclude branches tothreat-detect concludeon the external path #50646).threat-detect concludefails closed in warn mode when the engine step also failed;parse_threat_detection_results.cjsalways warns and proceeds, per ADR29031-threat-detection-resilience-in-warn-mode. Delegating changes behavior for every workflow currently in warn mode, silently, the moment it setsgh-aw-detection: true. Either upstream dropsmustFailto match ADR 29031, or gh-aw adopts it on the inline path too and ADR 29031 is amended. Upstream is happy either way and asks only that the decision be recorded.--workflow-name/--workflow-description/--custom-prompt-filespecifically so this plumbing cannot be dropped by an env filter, and prefers the file form for the custom prompt. gh-aw should confirm the approach. Note that threat-detection: GITHUB_STEP_SUMMARY is unwritable in the AWF sandbox, aborting the v0.4.0 detector with exit 2 #50659 is direct evidence for the flags side of this argument: step-levelenv:is not a reliable channel into the sandboxed process.Lower-stakes decisions, but still worth writing down: whether
experiments/belongs inside the detection surface (#50647), whether theSetup threat detectionstep is retired entirely on the external path (#50653), and whether non-proxy detector invocation is supported at all (#50654).Open question spun out of #50659
The agent job uses the same ineffective
GITHUB_STEP_SUMMARYredirect mechanism across all five engines. If the runner re-injects the file-command variable there too,agent-step-summary.mdhas been empty all along and nobody noticed, because no agent treats the write failure as an error. #50659 includes verifying this; if confirmed, it needs its own issue since it touches every engine.Validated as already fixed — no issue filed
Two upstream asks were checked against
mainand are already resolved. Recording them so they are not re-filed:apiProxy.modelsmissing from the detection AWF config. Upstream reported Copilot model aliases such asautofailing to resolve in the detection job with400 The requested model is not supported.pkg/workflow/threat_detection_external.go:319now propagatesdata.ModelMappingsinto the detection workflow data, and lines 280-315 additionally resolve the detection model explicitly rather than leaving it as an alias. Upstream's local workaround (pinningsafe-outputs.threat-detection.model) can be removed once they re-test.install_threat_detect_binary.shalready has the fullinstall_darwin_binary()branch. Only the stale header comment and missing tests remain, tracked in threat-detection: document macOS support and add installer platform-mapping tests #50655.Definition of done
conclusion/reason/successoutputs across the full failure matrix, and an equivalent or better verdict.docs/src/content/docs/reference/threat-detection.mdupdated to describe the resulting external-path contract.