ci(PRODSEC-343): consolidate CodeQL workflows into single unified scan - #3
Open
anguprasad07 wants to merge 1 commit into
Open
ci(PRODSEC-343): consolidate CodeQL workflows into single unified scan#3anguprasad07 wants to merge 1 commit into
anguprasad07 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Copilot reviewed 1 out of 1 changed files in this pull request and generated 5 comments.
Comments suppressed due to low confidence (1)
.github/workflows/codeql.yml:28
inputs.refis only populated forworkflow_dispatch(andworkflow_call) events; forscheduleandpull_requestevents theinputscontext yields an empty/null value. The|| ''fallback is therefore effectively a no-op, sinceinputs.refis already empty in those cases. More importantly, passing an empty string forrefon PR runs may be misinterpreted by the reusable workflow depending on how it handles a blankrefinput — verify thatcodeql-scan.yml@mastercorrectly checks out the PR head whenrefis empty, otherwise the scanned code may not match the PR.
ref: ${{ inputs.ref || '' }}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,37 @@ | |||
| name: "CodeQL" | |||
Comment on lines
+12
to
+14
| pull_request: | ||
| types: [opened, reopened, ready_for_review, synchronize] | ||
| # branches: [master, main] |
|
|
||
| # Cancel in-progress PR scans when new commits arrive; never cancel full scans. | ||
| concurrency: | ||
| group: codeql-unified-${{ github.repository }}-${{ github.ref }} |
| # 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
+26
to
+37
| uses: KeepTruckin/security-scanners/.github/workflows/codeql-scan.yml@master | ||
| with: | ||
| ref: ${{ inputs.ref || '' }} | ||
| # 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' }} | ||
| secrets: inherit | ||
| permissions: | ||
| security-events: write | ||
| contents: read | ||
| actions: read | ||
| packages: read |
ktbot
approved these changes
Jun 7, 2026
ktbot
left a comment
There was a problem hiding this comment.
Approved PRODSEC-343 CodeQL workflow consolidation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces separate codeql-full-scan.yml and codeql-pr-scan.yml with a single unified codeql.yml workflow.