Skip to content

chore(ci): add CodeQL analysis workflow - #15

Merged
Xuepoo merged 2 commits into
mainfrom
ctx-0012/chore-codeql
Aug 26, 2026
Merged

Xuepoo merged 2 commits into
mainfrom
ctx-0012/chore-codeql

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Closes #14. CarryCtx task CTX-0012 (owner core-governance-curator, session 01M0YM0M).

Summary

  • Adds .github/workflows/codeql.yml: advanced-setup Code Scanning per umbrella CI doctrine (every Bitty repository runs CodeQL in CI).
  • Matrix: rust with build-mode: autobuild + actions query pack (build-mode: none) → checks CodeQL / Analyze (rust), CodeQL / Analyze (actions).
  • Autobuild choice: current v3 README supersedes the standalone autobuild action with the build-mode: autobuild input on init; that pattern is used.
  • Pins: github/codeql-action init/analyze @ 42947a340483f03ba47bb1a039b2c519aab3df85 # v3 (v3 tag dereferenced live via API, tagged 2026-08-21); checkout matches ci.yml pin actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.0.
  • Job permissions contents: read + security-events: write; top-level contents: read; concurrency group; weekly cron 30 4 * * 1; push+PR triggers on main.

Local validation (before push)

  • just actionlint (actionlint -color, pinned 1.7.12): pass.
  • act -n -W .github/workflows/codeql.yml push (act 0.2.89): dry-run plan listed both jobs CodeQL/Analyze (rust)-1 and CodeQL/Analyze (actions)-2 cloning codeql-action at the pinned ref.

Acceptance

All required checks green, including new CodeQL / Analyze (rust).

Add advanced-setup Code Scanning via .github/workflows/codeql.yml:
- languages rust (build-mode autobuild) and actions query pack
- github/codeql-action init/analyze pinned to resolved v3 SHA
- job permissions contents:read + security-events:write
- concurrency group, weekly cron, push+PR triggers on main

Closes #14
@github-advanced-security

Copy link
Copy Markdown

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:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

CodeQL CLI 2.26.3 rejects autobuild for Rust (source-based extraction);
CI evidence from first run: 'Rust does not support the autobuild build
mode. Please try using one of the following build modes instead: none.'
@Xuepoo

Xuepoo commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Note for reviewers: codeql-action emits a deprecation warning for v3 (EOL Dec 2026). Kept v3 per CTX-0012 scope; tracked as a CarryCtx risk with a planned follow-up to bump pins to v4.

@Xuepoo
Xuepoo merged commit c98fbea into main Aug 26, 2026
4 checks passed
@Xuepoo Xuepoo added the chore Chore / maintenance label Aug 29, 2026
@Xuepoo Xuepoo added this to the v0.0.1 milestone Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Chore / maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(ci): enable CodeQL analysis workflow

2 participants