-
Notifications
You must be signed in to change notification settings - Fork 28
Disable threat detection on daily malicious code scan workflow #4617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ode scan workflow Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR aims to disable threat detection on the daily malicious code scan workflow to remove an unnecessary analysis step before creating code scanning alerts. However, the implementation has issues that need to be addressed.
Key Changes
- Added threat-detection configuration to disable the detection step in the daily malicious code scan workflow (though incorrectly placed)
- Recompiled workflow to remove the 253-line detection job and its dependencies
- Unrelated changes to multiple test workflow files that appear to be from a different fix
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/daily-malicious-code-scan.md |
Added threat-detection: false configuration (incorrectly nested under safe-outputs) |
.github/workflows/daily-malicious-code-scan.lock.yml |
Removed detection job and updated dependencies for safe-output jobs |
.github/workflows/test-serena-short.lock.yml |
Unrelated changes to GH_TOKEN handling in PR checkout step |
.github/workflows/test-serena-long.lock.yml |
Unrelated changes including step reordering and GH_TOKEN modifications |
.github/workflows/test-serena-go-config.lock.yml |
Unrelated changes to GH_TOKEN handling in PR checkout step |
.github/workflows/test-serena-custom-gomod.lock.yml |
Unrelated changes to GH_TOKEN handling in PR checkout step |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| safe-outputs: | ||
| create-code-scanning-alert: | ||
| driver: "Malicious Code Scanner" | ||
| threat-detection: false |
Copilot
AI
Nov 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The threat-detection: false configuration is incorrectly placed. According to the schema and code implementation, threat-detection should be at the same level as safe-output types (like create-code-scanning-alert), not nested under them.
Current (incorrect):
safe-outputs:
create-code-scanning-alert:
driver: "Malicious Code Scanner"
threat-detection: falseExpected:
safe-outputs:
create-code-scanning-alert:
driver: "Malicious Code Scanner"
threat-detection: falseThe threat-detection field should be a top-level frontmatter field, not nested within safe-outputs.
| threat-detection: false | |
| threat-detection: false |
| await exec.exec("gh", ["pr", "checkout", prNumber.toString()], { | ||
| env: { ...process.env, GH_TOKEN: process.env.GITHUB_TOKEN }, | ||
| }); | ||
| await exec.exec("gh", ["pr", "checkout", prNumber.toString()]); |
Copilot
AI
Nov 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR contains unrelated changes to this test workflow file, including:
- Reordering of language service installation steps (Go moved before TypeScript)
- Adding
GH_TOKENenvironment variables to theCheckout PR branchstep - Removing explicit environment variable passing from the
gh pr checkoutcommand
These changes are unrelated to disabling threat detection in the daily malicious code scan workflow and should be in a separate PR.
| await exec.exec("gh", ["pr", "checkout", prNumber.toString()]); | |
| await exec.exec("gh", ["pr", "checkout", prNumber.toString()], { env: { GH_TOKEN: process.env.GH_TOKEN } }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
The daily malicious code scan workflow was running an unnecessary threat detection step that analyzed the agent's output before creating code scanning alerts.
Changes
threat-detection: falsetosafe-outputssection in.github/workflows/daily-malicious-code-scan.mdResult
The workflow now runs without the detection step while still creating code scanning alerts for malicious code findings. The detection job (253 lines) and all related dependencies have been removed from the compiled workflow.
Before:
After:
Technical Note
Threat detection is enabled by default for workflows with
safe-outputs. Settingthreat-detection: falseexplicitly disables the detection job that validates agent output before executing safe output operations.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.