Uh oh!
There was an error while loading. Please reload this page.
feat(threat-detection): render detection.log in detection job with group/mask macros - #51255
Conversation
…tion job render step Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…erToStdout helper Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…tdout.cjs Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Moved |
✅ Test Quality Sentinel completed test quality analysis.
|
✅ PR Code Quality Reviewer completed the code quality review. Warning Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs for details. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "api.individual.githubcopilot.com"See Network Configuration for more information.
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. No ADR enforcement needed: PR does not have the 'implementation' label and has ≤100 new lines of code in business logic directories (30 additions detected).
|
Great work on the threat-detection feature! 🎯 The new A few things to discuss before merging:
If you'd like help adding tests for the detection log rendering, you can assign this to your AI agent:
|
There was a problem hiding this comment.
Pull request overview
Adds secure rendering of threat-detection logs to GitHub Actions output.
Changes:
- Adds redaction, secret masking, grouping, and command-injection protection.
- Wires rendering into both detection execution paths.
- Regenerates affected workflow lockfiles.
Show a summary per file
| File | Description |
|---|---|
actions/setup/js/render_detection_log.cjs | Reads and redacts detection logs. |
actions/setup/js/render_detection_log.test.cjs | Tests rendering behavior. |
actions/setup/js/render_log_to_stdout.cjs | Emits protected grouped output. |
pkg/workflow/threat_detection_steps.go | Adds the rendering step to detection jobs. |
.github/workflows/*.lock.yml | Regenerates affected workflows with the new step. |
Review details
Tip
Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Suppressed comments (1)
actions/setup/js/render_detection_log.test.cjs:116
- This assertion also expects the obsolete
detection-log-prefix, while the renderer emitsrender-<hex>. As written, the trailing-newline test fails even when the marker is correctly placed on its own line.
- Files reviewed: 275/275 changed files
- Comments generated: 2
- Review effort level: Balanced
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
gh-aw-bot
commented
Aug 8, 2026
@copilot Quick triage nudge for this PR. Please refresh the branch if GitHub can update it cleanly, verify the remaining blocking reviews are now resolved or ready for dismissal, and run the Open items (newest first):
Run: https://github.com/github/gh-aw/actions/runs/31235166066
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
pelikhan
commented
Aug 8, 2026
@copilot cap size to a reasonable size before cutting out file content |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Added in the latest commit. |
pelikhan
commented
Aug 8, 2026
@copilot render log from file as a helper function, including file size capping |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in the latest commit. Extracted |
gh-aw-bot
commented
Aug 8, 2026
@copilot Quick triage nudge for this PR. Please refresh the branch if GitHub can update it cleanly, verify the responded review threads are ready for resolution, address any remaining failed checks, and run the Open items (newest first):
Branch refresh was requested. Run: https://github.com/github/gh-aw/actions/runs/31238095490
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Fixed in the latest commit — |
gh-aw-bot
commented
Aug 8, 2026
@copilot Quick triage nudge for this PR. Please re-check reviewer feedback state, confirm whether any maintainer-facing follow-up still remains, and run the Open items (newest first):
Branch refresh was requested. Run: https://github.com/github/gh-aw/actions/runs/31240022087
|
All open items are addressed. Local validation is green: |
🎉 This pull request is included in a new release. Release: |
Adds a JS helper to read
detection.logand pipe it to the Actions log with secret redaction and workflow-command injection protection, then wires it into the detection job on both execution paths.New helper:
render_detection_log.cjs/tmp/gh-aw/threat-detection/detection.logredactBuiltInPatterns(defence-in-depth on top of file-level redaction byredact_secrets.cjs)::add-mask::::group::Detection Log/::endgroup::— collapsible section in the Actions log UI::stop-commands::<random-token>/::<token>::— prevents workflow-command-shaped lines in agent output from being interpreted by the runnerDetection job wiring (
threat_detection_steps.go)buildRenderDetectionLogStepbuildDetectionStepSummaryEchoStep)buildExternalDetectorExecutionStep)continue-on-error: true; a missing or empty log is a silent no-opRun: https://github.com/github/gh-aw/actions/runs/31240022087> Generated by 👨🍳 PR Sous Chef · gpt54 · 17 AIC · ⌖ 5.44 AIC · ⊞ 6.1K · ◷