fix: constrain list_code_scanning_alerts with state:open and severity:critical,high in structural analysis prompt - #48551
Merged
Conversation
…:critical,high in structural analysis prompt Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Audit workflow prompts for constrained code-scanning queries
fix: constrain list_code_scanning_alerts with state:open and severity:critical,high in structural analysis prompt
Jul 28, 2026
pelikhan
approved these changes
Jul 28, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Strengthens response-size constraints in the structural-analysis workflow.
Changes:
- Moves code-scanning filters inline with the tool instruction.
- Refreshes generated workflow locks.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/github-mcp-structural-analysis.md |
Adds inline alert filters. |
.github/workflows/github-mcp-structural-analysis.lock.yml |
Updates the generated body hash. |
.github/workflows/smoke-copilot-auto.lock.yml |
Refreshes generated model-cost metadata. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Medium
| 5. **actions**: `list_workflows` - List workflows with perPage=1 | ||
| 6. **code_security**: `list_code_scanning_alerts` | ||
| - Required guard params: `state: open`, `severity: critical,high` | ||
| 6. **code_security**: `list_code_scanning_alerts` — always call with `state: open` and `severity: critical,high` |
Contributor
|
🎉 This pull request is included in a new release. Release: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unconstrained
list_code_scanning_alertscalls in workflow prompts can produce oversized responses and cause workflow failures. The guard params were already present ingithub-mcp-structural-analysis.mdbut as a soft sub-bullet note, not inline with the call — easy for an agent to skip.Change
.github/workflows/github-mcp-structural-analysis.mdstate: openandseverity: critical,highconstraints directly into the call instruction, consistent with how every other tool in the same list specifies its parameters:The
head_limitnote is preserved. Workflow recompiled (264/264, 0 errors).