Skip to content

ci(PRODSEC-343): consolidate CodeQL workflows into single unified scan#1

Closed
anguprasad07 wants to merge 1 commit into
mainfrom
PRODSEC-343/consolidate-codeql
Closed

ci(PRODSEC-343): consolidate CodeQL workflows into single unified scan#1
anguprasad07 wants to merge 1 commit into
mainfrom
PRODSEC-343/consolidate-codeql

Conversation

@anguprasad07

Copy link
Copy Markdown

Replaces separate codeql-full-scan.yml and codeql-pr-scan.yml with a single unified codeql.yml workflow.

Copilot AI review requested due to automatic review settings May 4, 2026 12:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Findings (by severity):

  • blocker: none
  • high:
    • .github/workflows/codeql.yml:26 Reusable workflow is pinned to a mutable ref (@master), which is a supply-chain/reproducibility risk.
  • medium:
    • .github/workflows/codeql.yml:28-31 save-cache is enabled for all non-PR runs, including manual scans of an arbitrary ref, which can overwrite the intended “overlay-base” cache.
  • low:
    • .github/workflows/codeql.yml:12-14 PR branch filter is commented out; other workflows in this repo explicitly scope to branches: [main].

This PR introduces a unified GitHub Actions workflow to run CodeQL scans (scheduled, manual, and PR-triggered) via a shared reusable workflow, aiming to replace/standardize previous scanning setups.

Changes:

  • Adds a single codeql.yml workflow handling schedule, workflow_dispatch (with optional ref), and PR events.
  • Adds concurrency behavior to cancel in-progress PR scans when new commits arrive.
  • Toggles cache-saving behavior so only non-PR runs save the overlay-base cache.

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

# Skip draft PRs. Non-PR events are never drafts so this guard is a no-op
# for schedule/workflow_dispatch.
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
uses: KeepTruckin/security-scanners/.github/workflows/codeql-scan.yml@master
Comment on lines +29 to +31
# Full scans (schedule/dispatch) seed the overlay-base cache for PR scans.
# PR scans restore it read-only — they must NOT overwrite it.
save-cache: ${{ github.event_name != 'pull_request' }}
default: ''
pull_request:
types: [opened, reopened, ready_for_review, synchronize]
# branches: [master, main]
@anguprasad07
anguprasad07 deleted the PRODSEC-343/consolidate-codeql branch May 12, 2026 15:29
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