Skip to content

Switch to GitHub Advanced CodeQL workflow#383

Merged
jeremy merged 1 commit intomainfrom
codeql-config
Mar 25, 2026
Merged

Switch to GitHub Advanced CodeQL workflow#383
jeremy merged 1 commit intomainfrom
codeql-config

Conversation

@jeremy
Copy link
Copy Markdown
Member

@jeremy jeremy commented Mar 25, 2026

Summary

  • Move CodeQL analysis from an embedded job in security.yml to a standalone codeql.yml workflow using GitHub's recommended Advanced setup pattern
  • Add actions language to the matrix — scans workflow files for injection vulnerabilities alongside Go analysis
  • Add concurrency group, 30-minute timeout, and if: always() on SARIF upload

No changes to the CodeQL config file (security-and-quality queries, diagnostic/metric exclusions) or to release.ymlsecurity.yml retains its other 4 jobs (secrets, trivy, gosec, dependency-review) and the workflow_call trigger.

Test plan

  • Both matrix entries (Go, Actions) pass on this PR
  • security.yml jobs still pass without the removed codeql job
  • SARIF results appear in the Security tab (requires GHAS)

Summary by cubic

Switches CodeQL scanning to GitHub’s Advanced setup in a dedicated codeql.yml workflow. Adds Actions workflow scanning and tighter controls for reliable uploads.

  • New Features

    • Language matrix: go (manual build) and actions (no build).
    • Weekly cron and manual dispatch triggers.
    • Concurrency for PRs, 30‑minute timeout, and if: always() SARIF upload.
  • Refactors

    • Moved CodeQL from security.yml to standalone codeql.yml (Advanced setup).
    • Kept existing CodeQL config and other security.yml jobs unchanged.

Written for commit 15896ff. Summary will update on new commits.

Move CodeQL analysis from an embedded job in security.yml to a standalone
codeql.yml workflow using GitHub's recommended Advanced setup pattern.

- Add language matrix: Go (manual build) + Actions (no build)
- Add concurrency group to cancel superseded PR runs
- Add 30-minute timeout to prevent runaway jobs
- Upload SARIF with if: always() to capture partial results
- Drop legacy CODEQL_EXTRACTOR_GO_BUILD_TRACING env var
Copilot AI review requested due to automatic review settings March 25, 2026 19:19
@github-actions
Copy link
Copy Markdown

Sensitive Change Detection (shadow mode)

This PR modifies control-plane files:

  • .github/workflows/codeql.yml
  • .github/workflows/security.yml

Shadow mode — this check is informational only. When activated, changes to these paths will require approval from a maintainer.

@github-actions github-actions bot added the ci CI/CD workflows label Mar 25, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 15896ff86d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@jeremy jeremy merged commit 35e224e into main Mar 25, 2026
30 checks passed
@jeremy jeremy deleted the codeql-config branch March 25, 2026 19:22
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR moves CodeQL scanning out of the bundled .github/workflows/security.yml workflow into a standalone .github/workflows/codeql.yml workflow following GitHub’s “Advanced” CodeQL setup, and expands scanning to include GitHub Actions workflows.

Changes:

  • Removed the embedded codeql job from security.yml.
  • Added a dedicated codeql.yml workflow with a matrix for go and actions.
  • Added concurrency control, a 30-minute timeout, and if: always() on SARIF upload.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/security.yml Removes the inline CodeQL job so the security workflow focuses on the remaining security checks.
.github/workflows/codeql.yml Introduces a standalone CodeQL workflow using an advanced matrix (Go + Actions) and explicit SARIF upload behavior.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Comments suppressed due to low confidence (1)

.github/workflows/security.yml:109

  • Removing the codeql job from this reusable security.yml workflow means callers via workflow_call (e.g., the release workflow’s security job) will no longer run CodeQL at all on tag releases. If CodeQL is still intended to be part of the release security gate, consider either adding a workflow_call trigger to codeql.yml and invoking it from release.yml, or reintroducing a CodeQL job that runs only for workflow_call/tag contexts.
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          persist-credentials: false
      - uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants