From 33057d870cf350fdd0d80ab1258a676f09408f5c Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 27 Jan 2025 10:15:20 -0600 Subject: [PATCH 1/3] PYTHON-5062 Add GitHub Actions CodeQL scanning --- .github/workflows/{codeql.yml => codeql-python.yml} | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) rename .github/workflows/{codeql.yml => codeql-python.yml} (98%) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql-python.yml similarity index 98% rename from .github/workflows/codeql.yml rename to .github/workflows/codeql-python.yml index d0a7c9716..a5bc8d2c9 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql-python.yml @@ -1,4 +1,4 @@ -name: "CodeQL" +name: "CodeQL Python" on: push: @@ -25,7 +25,6 @@ jobs: permissions: # required for all workflows security-events: write - # required to fetch internal or private CodeQL packs packages: read steps: From 6626086aae4bfb5241d30ec325871d008951a36e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 27 Jan 2025 10:15:32 -0600 Subject: [PATCH 2/3] add actions codeql file --- .github/workflows/codeql-actions.yml | 42 ++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/codeql-actions.yml diff --git a/.github/workflows/codeql-actions.yml b/.github/workflows/codeql-actions.yml new file mode 100644 index 000000000..2d3bf95bc --- /dev/null +++ b/.github/workflows/codeql-actions.yml @@ -0,0 +1,42 @@ +name: "CodeQL GitHub Actions" + +on: + push: + branches: [ "master"] + tags: ['*'] + pull_request: + paths: + - .github/workflows/*.yml + schedule: + - cron: '17 10 * * 2' + +jobs: + analyze-python: + name: Analyze GitHub Actions + runs-on: "ubuntu-latest" + timeout-minutes: 360 + permissions: + # required for all workflows + security-events: write + # required to fetch internal or private CodeQL packs + packages: read + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: actions + build-mode: none + # 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 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:actions" From 6b3affc60438286f51a1a6e3aeb6fc13ed91bd40 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 27 Jan 2025 10:28:13 -0600 Subject: [PATCH 3/3] install uv --- bindings/python/.evergreen/integ-test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bindings/python/.evergreen/integ-test.sh b/bindings/python/.evergreen/integ-test.sh index 2efdc9a07..2dfa808b7 100755 --- a/bindings/python/.evergreen/integ-test.sh +++ b/bindings/python/.evergreen/integ-test.sh @@ -28,6 +28,7 @@ export PYMONGOCRYPT_LIB createvirtualenv $PYTHON .venv pip install -e . +pip install uv pushd $PYMONGO_DIR pip install -e ".[test,encryption]" source ${DRIVERS_TOOLS}/.evergreen/csfle/secrets-export.sh