From 1d5a7288df8d3795e071daa74b49c39c670431d7 Mon Sep 17 00:00:00 2001 From: zssherman Date: Thu, 22 Oct 2026 14:11:33 -0500 Subject: [PATCH 1/2] FIX: Fixes for safety. --- .github/dependabot.yml | 10 +++ .github/workflows/antivirus.yml | 11 ++- .github/workflows/build-docs.yml | 6 +- .github/workflows/codeql-analysis.yml | 76 +++++++++++++++++++ .github/workflows/pypi-release.yml | 17 +++-- .github/workflows/python-package.yml | 8 +- .../environment_actions.yml | 4 +- docs/environment_docs.yml | 3 + docs/requirements.txt | 1 + requirements.txt | 1 + test-requirements.txt | 1 + 11 files changed, 119 insertions(+), 19 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..d15c975e --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + groups: + actions: + patterns: + - "*" diff --git a/.github/workflows/antivirus.yml b/.github/workflows/antivirus.yml index 25b1d9bf..d62257da 100644 --- a/.github/workflows/antivirus.yml +++ b/.github/workflows/antivirus.yml @@ -1,14 +1,19 @@ on: pull_request: - types: [assigned, opened, synchronize, reopened, closed] + types: [opened, synchronize, reopened] + +permissions: + contents: read jobs: gitavscan: runs-on: ubuntu-latest name: AV scan steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - name: Git AV Scan - uses: djdefi/gitavscan@main + uses: djdefi/gitavscan@66a83ba98eca422f37322bc9851fa56195b252f3 # v23 with: full: '--full' diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 029d5ea7..0106ec2c 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -20,11 +20,11 @@ jobs: run: shell: bash -l {0} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # Install dependencies - name: Setup Conda Environment - uses: mamba-org/setup-micromamba@v1 + uses: mamba-org/setup-micromamba@f457c30a868e4760d3a6fcea5f25dc655b8edf39 # v3.2.1 with: environment-file: docs/environment_docs.yml activate-environment: pysp2-docs @@ -39,7 +39,7 @@ jobs: make html # Push the book's HTML to github-pages - name: GitHub Pages action - uses: peaceiris/actions-gh-pages@v3.8.0 + uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0 if: github.ref == 'refs/heads/main' with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 00000000..c437c8f2 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,76 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ main ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ main ] + schedule: + - cron: '42 7 * * 5' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'python' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://git.io/codeql-language-support + + steps: + - name: Checkout repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0 + + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0 diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index 06fe8378..f8c90bbb 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -9,17 +9,17 @@ jobs: runs-on: ubuntu-latest if: github.repository == 'ARM-DOE/PySP2' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 name: Install Python with: python-version: 3.14 - name: Install dependencies run: | - python -m pip install --upgrade pip + python -m pip install --upgrade "pip>=26.2.2" "certifi>=2026.10.19" python -m pip install setuptools setuptools-scm wheel twine check-manifest - name: Build tarball and wheels run: | @@ -36,7 +36,8 @@ jobs: else echo "✅ Looks good" fi - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: with: name: releases path: dist @@ -45,11 +46,11 @@ jobs: needs: build-artifacts runs-on: ubuntu-latest steps: - - uses: actions/setup-python@v4 + - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 name: Install Python with: python-version: "3.x" - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: name: releases path: dist @@ -62,12 +63,12 @@ jobs: if: github.event_name == 'release' runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: name: releases path: dist - name: Publish package to PyPI - uses: pypa/gh-action-pypi-publish@v1.13.0 + uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3 with: user: __token__ password: ${{ secrets.PYPI_TOKEN }} diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index c415dd20..e2180422 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -22,14 +22,14 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + python-version: ["3.13", "3.14", "3.15"] os: [macOS, ubuntu, Windows] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Setup Conda Environment - uses: mamba-org/setup-micromamba@v1 + uses: mamba-org/setup-micromamba@f457c30a868e4760d3a6fcea5f25dc655b8edf39 # v3.2.1 with: python-version: ${{ matrix.python-version }} environment-file: ./continuous_integration/environment_actions.yml @@ -46,4 +46,4 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Run tests run: | - pytest + pytest diff --git a/continuous_integration/environment_actions.yml b/continuous_integration/environment_actions.yml index d71193e9..df0154fc 100644 --- a/continuous_integration/environment_actions.yml +++ b/continuous_integration/environment_actions.yml @@ -12,4 +12,6 @@ dependencies: - python>=3.7 - pytest - flake8 - + - certifi>=2026.10.19 + - ca-certificates>=2026.10.19 + - pip>=26.2.2 diff --git a/docs/environment_docs.yml b/docs/environment_docs.yml index d32eeb2c..6e780692 100644 --- a/docs/environment_docs.yml +++ b/docs/environment_docs.yml @@ -8,6 +8,9 @@ dependencies: - sphinx - pydata-sphinx-theme - arm-test-data + - certifi>=2026.10.19 + - ca-certificates>=2026.10.19 + - pip>=26.2.2 - pip: - sphinx_gallery - sphinx-copybutton diff --git a/docs/requirements.txt b/docs/requirements.txt index 7aa9188b..ec883ba8 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -4,4 +4,5 @@ sphinx_gallery xarray act-atmos matplotlib +certifi>=2026.10.19 -e . diff --git a/requirements.txt b/requirements.txt index 0a12e2c0..b9a9120f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,3 +5,4 @@ xarray act-atmos xlrd matplotlib +certifi>=2026.10.19 diff --git a/test-requirements.txt b/test-requirements.txt index e079f8a6..f8fc9e1b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1 +1,2 @@ pytest +certifi>=2026.10.19 From 08f41f636cc58a41e77627d7827fded3616ef330 Mon Sep 17 00:00:00 2001 From: zssherman Date: Thu, 22 Oct 2026 14:16:48 -0500 Subject: [PATCH 2/2] FIX: Already exists. --- .github/workflows/codeql-analysis.yml | 76 --------------------------- 1 file changed, 76 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index c437c8f2..00000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,76 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ main ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ main ] - schedule: - - cron: '42 7 * * 5' - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'python' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Learn more about CodeQL language support at https://git.io/codeql-language-support - - steps: - - name: Checkout repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0 - - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0