Repository navigation
Report skipped threat detection when the detector was not installed - #67810
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
| if [ "${RUN_DETECTION:-}" != "true" ]; then | ||
| echo "conclusion=skipped" >> "${GITHUB_OUTPUT}" | ||
| echo "success=true" >> "${GITHUB_OUTPUT}" | ||
| echo "reason=" >> "${GITHUB_OUTPUT}" | ||
| exit 0 | ||
| fi |
There was a problem hiding this comment.
Updated in 2ed6253: a missing detector is now a successful skip only when RUN_DETECTION=false and the install outcome is skipped. Unset, empty, unexpected, or mismatched states report detector unavailable; regression coverage verifies strict and warn behavior.
There was a problem hiding this comment.
🟢 Approval recommended
The focused fallback matches the existing conclusion contract and has comprehensive regression coverage.
0 open findings
What changed in this PR
Fixes #66872 by treating an unavailable detector as skipped when detection was unnecessary.
Changes:
- Emits successful skipped outputs when
RUN_DETECTIONis nottrue. - Adds regression coverage for strict, warning, and empty guard-output cases.
| File | Description |
|---|---|
actions/setup/sh/conclude_threat_detection.sh |
Handles skipped detection without requiring the detector binary. |
pkg/workflow/threat_detection_conclude_script_test.go |
Covers missing-binary behavior and preserves required failure cases. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
@copilot address the following outstanding work in one pass:
Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI. Sous-chef head: c7026f6
|
…tection-error 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>
|
@copilot address the following outstanding work in one pass:
Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI. Sous-chef head: 2ed6253
|
…tection-error Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
The fail-closed guard and its regression coverage remain in place (2ed6253). I merged the latest main in ff9eed8, preserving that fix.
Merged the latest main in ff9eed8. The updated implementation resolves the stale work-queue test expectation; the targeted test and final impacted Go test gate pass. I did not trigger CI. |
|
🎉 This pull request is included in a new release. Release: |
When an agent produced no safe outputs or patches, the detection guard skipped the detector install, but the conclusion step still failed in strict mode because
threat-detectwas absent.conclusion=skipped,success=true, and an empty reason. A missing binary remains an error when detection was required.continue-on-error: false#66872