-
Notifications
You must be signed in to change notification settings - Fork 36
Add agentic workflow to auto-fix high severity code scanning alerts every 30 minutes #10005
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
Co-authored-by: eaftan <4733401+eaftan@users.noreply.github.com>
|
@copilot format, lint |
1 similar comment
|
@copilot format, lint |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot run every 30 minutes, skip if another a PR created by the workflow is still opened |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in commit 4f8412b. Changed schedule from weekly to |
code-scanning-fixer.md✅ All Requirements Met
1. Fix Code Scanning Alerts
Implementation: Uses GitHub code scanning API (
list_code_scanning_alertsandget_code_scanning_alert) to discover and analyze security vulnerabilities2. High Severity Only
Implementation: Filters alerts with
severity: highexclusively. The prompt explicitly states "Filter the results to only include alerts withseverity: high"3. Every 30 Minutes Schedule
Implementation: Runs every 30 minutes via
schedule: every 30m(compiled to cron:*/30 * * * *)4. Track Old Findings (No Duplicates)
Implementation: Uses cache-memory at
/tmp/gh-aw/cache-memory/fixed-alerts.jsonlto store:{"alert_number": 123, "fixed_at": "2024-01-15T10:30:00Z", "pr_number": 456}5. Skip if Open PR Exists
Implementation: Uses
skip-if-match: 'is:pr is:open in:title "[code-scanning-fix]"'🔒 Security Features
📦 Files Created
.github/workflows/code-scanning-fixer.md(6.7 KB) - Workflow definition.github/workflows/code-scanning-fixer.lock.yml(66 KB) - Compiled GitHub Actions workflow🚀 How It Works
✅ Format & Lint
make fmt- Formatting completemake lint- All validations passed💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.