PYTHON-5877 Consolidate CodeQL config into drivers-github-tools#2883
Draft
aclark4life wants to merge 1 commit into
Draft
PYTHON-5877 Consolidate CodeQL config into drivers-github-tools#2883aclark4life wants to merge 1 commit into
aclark4life wants to merge 1 commit into
Conversation
Delegate to the shared action so the pinned CodeQL version lives in one place and Dependabot can update it centrally.
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4 | ||
| steps: | ||
| - uses: mongodb-labs/drivers-github-tools/codeql@6916a008ec612b4575d8f630c6745e776207e30a # PYTHON-5877 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s CodeQL GitHub Actions workflow to delegate the CodeQL scanning steps to the shared mongodb-labs/drivers-github-tools/codeql composite action, keeping only repository-specific configuration (triggers, matrix, concurrency, and paths-ignore) in this repo.
Changes:
- Replaced the inline checkout / setup-python / CodeQL init+analyze steps with a single call to
mongodb-labs/drivers-github-tools/codeqlpinned by SHA. - Updated the workflow inputs passed to CodeQL from
languagestolanguage, and moved the checkoutrefinto the composite action inputs. - Preserved the existing matrix and
paths-ignoreconfig block in this repo’s workflow.
Comment on lines
+42
to
45
| language: ${{ matrix.language }} | ||
| build-mode: ${{ matrix.build-mode }} | ||
| # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs | ||
| queries: security-extended | ||
| ref: ${{ inputs.ref }} | ||
| config: | |
Comment on lines
+39
to
+44
| steps: | ||
| - uses: mongodb-labs/drivers-github-tools/codeql@6916a008ec612b4575d8f630c6745e776207e30a # PYTHON-5877 | ||
| with: | ||
| languages: ${{ matrix.language }} | ||
| language: ${{ matrix.language }} | ||
| build-mode: ${{ matrix.build-mode }} | ||
| # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs | ||
| queries: security-extended | ||
| ref: ${{ inputs.ref }} |
Contributor
Author
|
Companion to mongodb-labs/drivers-github-tools#108 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
PYTHON-5877
Changes in this PR
Replaces the inline CodeQL analysis steps with a call to the new
mongodb-labs/drivers-github-tools/codeqlcomposite action(drivers-github-tools#108).
The composite action centralises:
github/codeql-actionhash (Dependabot updates it in one place for all drivers)The workflow in this repo retains only the repo-specific parts: triggers,
concurrency, matrix, and the
paths-ignoreconfig block.Test Plan
Checklist
Checklist for Author
Checklist for Reviewer