This document explains common CodeQL workflow warnings and how to interpret them.
Status:
Cause: Workflow permissions or repository settings
Impact: CodeQL analysis still runs, but PR comments may not be posted
Solutions:
- ✅ Already implemented: Workflow has
pull-requests: writepermission - ✅ Already implemented: Additional permissions added for comprehensive access
- 🔍 Check: Repository settings → Actions → General → Workflow permissions
- 🔍 Check: If running from a fork, permissions are limited by GitHub security
Status: ℹ️ Informational (Not a failure)
Cause: Large number of changed files (>300) in pull request
Impact: CodeQL performs full analysis instead of optimized diff analysis
Result: ✅ Analysis still completes successfully - just takes longer
Why this happens:
- Diff-based analysis is an optimization for smaller changesets
- When too many files change, CodeQL falls back to full analysis
- This is by design and not an error
Status: ℹ️ Informational (Not a failure)
Cause: Same as #2 - large changeset
Impact: Same as #2 - full analysis instead of diff analysis
Result: ✅ Analysis still works perfectly
permissions:
actions: read
contents: read
security-events: write
pull-requests: write
issues: write
repository-projects: read
statuses: write- Fetches full git history (
fetch-depth: 0) - Checks changeset size and provides informative messages
- Continues analysis regardless of diff optimization availability
- Uploads results even with warnings
- Provides clear messaging about what's happening
- Distinguishes between actual failures and informational messages
- ✅ Diff-based analysis (faster)
- ✅ All optimizations active
- ✅ PR comments posted
⚠️ Warning messages about diff analysis (expected)- ✅ Full analysis performed (slower but complete)
- ✅ All security issues detected
- ✅ Results uploaded successfully
- Check repository Settings → Actions → General
- Ensure "Read and write permissions" is selected
- Verify workflow has
pull-requests: writepermission ✅ (already set)
- Check for actual error messages (not warnings)
- Review CodeQL configuration syntax
- Verify paths in
.github/codeql/codeql-config.yml
✅ CodeQL is working correctly if you see:
- Security analysis completes
- Results uploaded to GitHub Security tab
- No actual error messages (warnings are OK)
- Security issues detected and reported
❌ Actual problems would show as:
- Workflow fails completely
- No results uploaded
- Configuration syntax errors
- Build failures
Summary: The warnings you're seeing are normal and expected for large changesets. CodeQL is working correctly and providing comprehensive security analysis.