feat(security): add CodeQL, Semgrep, and Trivy scanning#356
Merged
Conversation
CodeQL (.github/workflows/codeql.yml): Semantic C# analysis with security-and-quality queries. Catches data-flow issues (injection, path traversal, auth bypass) that pattern-based tools miss. Runs on push/PR to main+develop and weekly on schedule. Semgrep (.github/workflows/semgrep.yml): Pattern-based SAST using p/csharp, p/secrets, and p/owasp-top-ten rule packs. Complements CodeQL with fast, broad coverage of common C# mistakes and OWASP Top 10. SEMGREP_APP_TOKEN is optional — omit for OSS-only rules. Trivy (.github/workflows/trivy.yml): Filesystem scan for hardcoded secrets and dependency vulnerabilities (CRITICAL/HIGH/MEDIUM). Catches secrets in source files and config that other scanners miss, and provides a second opinion on NuGet CVEs alongside the existing 'dotnet list package --vulnerable' check. All three upload results as SARIF to GitHub Code Scanning so findings appear in the Security tab alongside existing zizmor alerts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Build Performance Report⏱️ Build Time: 12 minutes 📊 Comparison with main branch:
✅ Within acceptable range This is an automated performance check |
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
CodeQL — weekly only (30-min build, deep semantic analysis) Semgrep — PR gate + weekly (fast pattern-based SAST, new rule packs) Trivy — PR gate (secrets only) + weekly (secrets + vuln full scan) Running all scanners on every push to main/develop was redundant: protected branches require a PR, so the PR checks already cover each push. Weekly schedules catch newly discovered CVEs and published rules against the existing codebase without slowing down PR feedback. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Build Performance Report⏱️ Build Time: 12 minutes 📊 Comparison with main branch:
✅ Within acceptable range This is an automated performance check |
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.
Summary
Adds three complementary security scanners, all reporting to GitHub Code Scanning (Security tab):
p/csharp,p/secrets,p/owasp-top-ten)dotnet list package --vulnerable)All three run on push/PR to
main+develop(path-filtered) and weekly on schedule.Notes
SEMGREP_APP_TOKENis optional. Without it, OSS rule packs still run but findings won't appear in the Semgrep cloud dashboard.security-and-qualityquery suite — may surface existing findings on first run.CRITICAL,HIGH, andMEDIUMseverity only to keep signal-to-noise high.🤖 Generated with Claude Code