Skip to content

Switch CodeQL to advanced setup and ignore tests - #268

Merged
mlapaglia merged 1 commit into
developfrom
codeql-advanced-setup
Nov 14, 2026
Merged

mlapaglia merged 1 commit into
developfrom
codeql-advanced-setup

Conversation

@mlapaglia

@mlapaglia mlapaglia commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Adds .github/workflows/codeql.yml to replace CodeQL default setup. It scans the same languages (actions, javascript-typescript, python) with build-mode: none on a weekly schedule, plus push and PR runs on develop.
  • Adds .github/codeql/codeql-config.yml with paths-ignore: [tests]. Default setup doesn't accept a config file, so test assertions such as assert "sftp.example.com:2222" in details were raising py/incomplete-url-substring-sanitization alerts (8 open, all under tests/).
  • Follows the conventions of the other workflows: permissions: {} at the top level, scoped job permissions, SHA-pinned actions, harden-runner, and persist-credentials: false.

Before merging

Turn off default setup (Settings → Code security → CodeQL analysis → switch to Advanced). While it's on, uploads from this workflow are rejected.

After this workflow's first run on develop, the 8 test alerts should close automatically.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Added automated security analysis for updates to the development branch and pull requests, with a weekly scheduled run.
    • Analysis now covers workflow files, JavaScript/TypeScript, and Python, while excluding test code.

Default setup can't take a config file, so test assertions like
`"sftp.example.com:2222" in details` were raising
py/incomplete-url-substring-sanitization alerts. Add a CodeQL workflow
covering the same languages as default setup (actions,
javascript-typescript, python) with paths-ignore for tests/.
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Adds a CodeQL workflow for pushes and pull requests targeting develop, plus a weekly schedule. The workflow analyzes Actions, JavaScript/TypeScript, and Python. Its configuration excludes the tests path.

Changes: CodeQL scanning

Layer / File(s) Summary
Configure and run CodeQL analysis
.github/codeql/codeql-config.yml, .github/workflows/codeql.yml
The configuration names the CodeQL setup and excludes tests. The workflow defines triggers, concurrency, permissions, runner egress auditing, credential-free checkout, CodeQL analysis, and result upload.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant GitHub as GitHub events
  participant Workflow as CodeQL workflow
  participant Runner as GitHub runner
  participant CodeQL as CodeQL analysis
  participant Security as GitHub security events
  GitHub->>Workflow: Start on push, pull request, or schedule
  Workflow->>Runner: Run language analysis matrix
  Runner->>CodeQL: Initialize and analyze checked-out repository
  CodeQL->>Security: Upload analysis results
Loading
Merge Risk: Minimal · up to b07df

This adds CodeQL scanning with an advanced setup that excludes test code. It does not change application behavior. The only noted prerequisite is turning off default setup before merging.

Architecture risk: Low · up to b07df

The changed surface does not map to a changed system, dependency edge, entrypoint, or external dependency.

Changed systems: None identified.

Architecture concerns
No architecture-level concerns identified.

Review details

Before / after behavior

  • observed — Modified behavior in .github/codeql/codeql-config.yml: Adds a named CodeQL configuration that excludes the tests path and documents that test code is not shipped with the app.
  • observed — Modified behavior in .github/workflows/codeql.yml: Adds a CodeQL workflow with the specified triggers, concurrency policy, language matrix, job permissions, runner egress audit, credential-free checkout, and CodeQL initialization and analysis steps.
Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the two main changes: switching CodeQL from default setup to advanced setup, and excluding tests from analysis. Both match the workflow file and the codeql-config.yml paths-ignore entr…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the two main changes: switching CodeQL from default setup to advanced setup, and excluding tests from analysis. Both match the workflow file and the codeql-config.yml paths-ignore entry described in the summary and objectives. The title is concise and specific.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5a41ffbd-a6b0-42ad-9458-f97b08b68f98
Commits

Reviewing files that changed from the base of the PR and between 1efac86 and b07df63.

Files selected for processing: 2

  • .github/codeql/codeql-config.yml
  • .github/workflows/codeql.yml

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@codecov-commenter

codecov-commenter commented Nov 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.85%. Comparing base (1efac86) to head (b07df63).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #268   +/-   ##
========================================
  Coverage    80.85%   80.85%           
========================================
  Files          144      144           
  Lines        13748    13748           
========================================
  Hits         11116    11116           
  Misses        2632     2632           
Flag Coverage Δ
e2e 0.00% <ø> (ø)
integration 47.35% <ø> (ø)
unit 72.11% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mlapaglia
mlapaglia merged commit f9e3a6a into develop Nov 14, 2026
26 checks passed
@mlapaglia
mlapaglia deleted the codeql-advanced-setup branch November 14, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants