fix: add codeql.yml for CodeQL SAST compliance#84
Conversation
Adds the required CodeQL Analysis workflow to satisfy the compliance finding (missing-codeql.yml). Language configured as 'actions' per the CI standard's rule: repos containing .github/workflows/*.yml must add the 'actions' language. Closes #39 Co-authored-by: don-petry <don-petry@users.noreply.github.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 7 minutes and 40 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a GitHub Actions workflow to run CodeQL SAST scans for compliance (issue #39), targeting the repository’s GitHub Actions workflows as the analyzed “language”.
Changes:
- Introduces
.github/workflows/codeql.ymlwith push/PR triggers onmainplus a weekly scheduled scan. - Configures CodeQL to analyze
actionsand uses least-privilege workflow/job permissions. - Aligns the job name and category with expected branch-protection/status-check patterns.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| uses: github/codeql-action/init@v4 | ||
| with: | ||
| languages: actions | ||
|
|
||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@v4 |
There was a problem hiding this comment.
The CodeQL actions are referenced by a moving tag (@v4). If your repo/org policy is aiming for supply-chain hardening (similar to the pinned actions/checkout), pin github/codeql-action/* to immutable commit SHAs as well (and keep them updated via Dependabot). This reduces the risk of a compromised upstream tag affecting your workflow.
| uses: github/codeql-action/init@v4 | |
| with: | |
| languages: actions | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v4 | |
| uses: github/codeql-action/init@3c5c3a4a0f3f64e64d5d4e9f7e3f2db279b9da86 # v4 | |
| with: | |
| languages: actions | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@3c5c3a4a0f3f64e64d5d4e9f7e3f2db279b9da86 # v4 |
| uses: github/codeql-action/init@v4 | ||
| with: | ||
| languages: actions | ||
|
|
||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@v4 |
There was a problem hiding this comment.
The CodeQL actions are referenced by a moving tag (@v4). If your repo/org policy is aiming for supply-chain hardening (similar to the pinned actions/checkout), pin github/codeql-action/* to immutable commit SHAs as well (and keep them updated via Dependabot). This reduces the risk of a compromised upstream tag affecting your workflow.
| uses: github/codeql-action/init@v4 | |
| with: | |
| languages: actions | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v4 | |
| uses: github/codeql-action/init@3fcb8f7314c2e7c6b6bc3b5b7f9a1f4e6d2c9a55 # v4 | |
| with: | |
| languages: actions | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@3fcb8f7314c2e7c6b6bc3b5b7f9a1f4e6d2c9a55 # v4 |
| pull_request: | ||
| branches: [main] | ||
| schedule: | ||
| - cron: '0 17 * * 5' # Weekly scan (Friday 12:00 PM EST / 17:00 UTC) |
There was a problem hiding this comment.
The inline comment mixes a fixed UTC cron with a fixed 'EST' local time; this becomes inaccurate during daylight saving time (ET shifts between UTC-4/UTC-5). Prefer describing this as '12:00 PM ET' with a DST note, or remove the local-time conversion and keep the comment purely in UTC to avoid future confusion.
| - cron: '0 17 * * 5' # Weekly scan (Friday 12:00 PM EST / 17:00 UTC) | |
| - cron: '0 17 * * 5' # Weekly scan (Friday 12:00 PM ET during standard time / 1:00 PM ET during daylight saving time; 17:00 UTC) |
| jobs: | ||
| analyze: | ||
| name: Analyze (actions) | ||
| runs-on: ubuntu-latest |
There was a problem hiding this comment.
ubuntu-latest can change underlying OS versions, which can cause unexpected workflow differences over time. If stability/reproducibility is required for compliance workflows, consider pinning to a specific runner image (e.g., ubuntu-24.04 or ubuntu-22.04) consistent with your CI standards.
| runs-on: ubuntu-latest | |
| runs-on: ubuntu-24.04 |
|
@don-petry — PR is ready for review. The To unblock: go to Settings → Security → Code scanning → CodeQL analysis → Switch to advanced (disable the default setup). Once that's done the check will go green and the PR can be merged. Closes #39 |
|
Closing as stale — predates the standards PR. This PR was generated by Claude during the original bulk-toggle yesterday, before petry-projects/.github#86 landed. That standards PR added prompt rules that:
Re-toggling the underlying issue will let Claude regenerate this fix using the new rules. The next run should produce a workflow that is byte-identical to the standard template (verified with the canary on TalkTerm#51 → PR #78 yesterday). |



Summary
codeql.ymlworkflow to resolve compliance findingmissing-codeql.yml(issue Compliance: missing-codeql.yml #39)actionsper the CI standard: repos containing.github/workflows/*.ymlmust add theactionslanguageAnalyze (actions)matches the requiredAnalyze (<lang>)pattern for branch protection status checks{}top-level, per-jobactions: read,contents: read,security-events: writemain+ weekly Friday scan (12:00 PM EST / 17:00 UTC)actions/checkoutpinned to SHA (de0fac2e...v6.0.2) matching existing workflows; Dependabot will pincodeql-action@v4SHAs on its next weekly runCloses #39
Generated with Claude Code