diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6f40ed1c4a..10c371ad3e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,7 +6,11 @@ updates: directory: "/" schedule: interval: "daily" + cooldown: + default-days: 7 - package-ecosystem: "npm" directory: "/" schedule: interval: "daily" + cooldown: + default-days: 7 diff --git a/.github/workflows/lint-commit.yml b/.github/workflows/lint-commit.yml index b817e80a6c..d00b6590f8 100644 --- a/.github/workflows/lint-commit.yml +++ b/.github/workflows/lint-commit.yml @@ -11,10 +11,11 @@ jobs: name: Commit Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 - - uses: actions/setup-node@v7 + persist-credentials: false + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 22.x - run: npm install diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 051b53a193..83a6a99f94 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -15,7 +15,7 @@ jobs: release_created: ${{ steps.release.outputs.release_created }} runs-on: ubuntu-latest steps: - - uses: googleapis/release-please-action@v5 + - uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0 id: release with: token: ${{ secrets.GH_USER_TOKEN }} @@ -36,8 +36,10 @@ jobs: contents: read id-token: write # to generate npm provenance statements steps: - - uses: actions/checkout@v7 - - uses: actions/setup-node@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: lts/* registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1347f7e4bb..867f3b8e4a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,8 +18,10 @@ jobs: name: Lint Python runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 - - uses: astral-sh/ruff-action@v4.1.0 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: astral-sh/ruff-action@278981a28ce3188b1e39527901f38254bf3aac89 # v4.1.0 with: args: "check --select=E,F,PLC,PLE,UP,W,YTT --ignore=E721,PLC0206,PLC0415,PLC1901,S101,UP031 --target-version=py39" - run: ruff format --check --diff @@ -29,9 +31,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repository - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - name: Use Node.js 22.x - uses: actions/setup-node@v7 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 22.x - name: Install Dependencies @@ -44,9 +48,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repository - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - name: Use Node.js 22.x - uses: actions/setup-node@v7 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 22.x - name: Install Dependencies @@ -63,9 +69,11 @@ jobs: timeout-minutes: 30 steps: - name: Checkout Repository - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - name: Use Node.js 22.x - uses: actions/setup-node@v7 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 22.x - name: Update npm @@ -119,17 +127,19 @@ jobs: WASI_SDK_PATH: 'wasi-sdk-25.0' steps: - name: Checkout Repository - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - name: Use Node.js ${{ matrix.node }} - uses: actions/setup-node@v7 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: ${{ matrix.node }} - name: Use Python ${{ matrix.python }} - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ matrix.python }} allow-prereleases: true - - uses: seanmiddleditch/gha-setup-ninja@v6 + - uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6 - name: Install wasi-sdk (Windows) shell: pwsh if: runner.os == 'Windows' diff --git a/.github/workflows/update-gyp-next.yml b/.github/workflows/update-gyp-next.yml index aaae835abe..d85154885a 100644 --- a/.github/workflows/update-gyp-next.yml +++ b/.github/workflows/update-gyp-next.yml @@ -17,11 +17,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - - uses: actions/github-script@v9 + - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 id: get-gyp-next-version with: script: | @@ -33,11 +33,13 @@ jobs: result-encoding: string - name: Update gyp-next + env: + GYP_NEXT_VERSION: ${{ steps.get-gyp-next-version.outputs.result }} run: | - python update-gyp.py --no-commit ${{ steps.get-gyp-next-version.outputs.result }} + python update-gyp.py --no-commit ${GYP_NEXT_VERSION} - name: Open or update PR for the gyp-next update - uses: gr2m/create-or-update-pull-request-action@v1 + uses: gr2m/create-or-update-pull-request-action@483e2e5c8e68c420e72687127cfdc30a45254be7 # v1 with: branch: actions/update-gyp-next author: Node.js GitHub Bot diff --git a/.github/workflows/visual-studio.yml b/.github/workflows/visual-studio.yml index 36abff5843..88514e297f 100644 --- a/.github/workflows/visual-studio.yml +++ b/.github/workflows/visual-studio.yml @@ -27,9 +27,11 @@ jobs: timeout-minutes: 30 steps: - name: Checkout Repository - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - name: Use Python 3 - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: "3.x" - name: Install Dependencies diff --git a/gyp/.github/dependabot.yml b/gyp/.github/dependabot.yml index 58d68276fc..1a5cdb30bd 100644 --- a/gyp/.github/dependabot.yml +++ b/gyp/.github/dependabot.yml @@ -10,6 +10,8 @@ updates: - "*" # Group all Actions updates into a single larger pull request schedule: interval: weekly + cooldown: + default-days: 7 - package-ecosystem: "pip" directory: "/" groups: @@ -18,3 +20,5 @@ updates: - "*" # Group all pip updates into a single larger pull request schedule: interval: weekly + cooldown: + default-days: 7 diff --git a/gyp/.github/workflows/node-gyp.yml b/gyp/.github/workflows/node-gyp.yml index 016d2e0abc..1271ff3487 100644 --- a/gyp/.github/workflows/node-gyp.yml +++ b/gyp/.github/workflows/node-gyp.yml @@ -21,18 +21,20 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Clone gyp-next - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: path: gyp-next + persist-credentials: false - name: Clone nodejs/node-gyp - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: repository: nodejs/node-gyp path: node-gyp - - uses: actions/setup-node@v6 + persist-credentials: false + - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 with: node-version: "lts/*" - - uses: actions/setup-python@v6 + - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: ${{ matrix.python-version }} allow-prereleases: true diff --git a/gyp/.github/workflows/nodejs.yml b/gyp/.github/workflows/nodejs.yml index c88fe7bcf2..b464063231 100644 --- a/gyp/.github/workflows/nodejs.yml +++ b/gyp/.github/workflows/nodejs.yml @@ -22,15 +22,17 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Clone gyp-next - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: path: gyp-next + persist-credentials: false - name: Clone nodejs/node - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: repository: nodejs/node path: node - - uses: actions/setup-python@v6 + persist-credentials: false + - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: ${{ matrix.python-version }} allow-prereleases: true diff --git a/gyp/.github/workflows/python_tests.yml b/gyp/.github/workflows/python_tests.yml index 47f6e5e77c..0b335e5ca1 100644 --- a/gyp/.github/workflows/python_tests.yml +++ b/gyp/.github/workflows/python_tests.yml @@ -10,11 +10,13 @@ jobs: Python_lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: Lint with ruff # See pyproject.toml for settings - uses: astral-sh/ruff-action@v3 + uses: astral-sh/ruff-action@4919ec5cf1f49eff0871dbcea0da843445b837e6 # v3.6.1 - run: ruff format --check --diff - - uses: wagoid/commitlint-github-action@v6 + - uses: wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6.2.1 Python_tests: runs-on: ${{ matrix.os }} @@ -31,13 +33,15 @@ jobs: - os: windows-11-arm # Windows on ARM python-version: 3.x steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: ${{ matrix.python-version }} allow-prereleases: true - - uses: seanmiddleditch/gha-setup-ninja@v6 + - uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6 - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/gyp/.github/workflows/release-please.yml b/gyp/.github/workflows/release-please.yml index 0022a3d894..5182bee742 100644 --- a/gyp/.github/workflows/release-please.yml +++ b/gyp/.github/workflows/release-please.yml @@ -14,7 +14,7 @@ jobs: contents: write pull-requests: write steps: - - uses: google-github-actions/release-please-action@v4 + - uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4.1.1 id: release build: @@ -24,11 +24,13 @@ jobs: if: ${{ needs.release-please.outputs.release_created }} # only publish on release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: Build a binary wheel and a source tarball run: pipx run build - name: Store the distribution packages - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: python-package-distributions path: dist/ @@ -48,12 +50,12 @@ jobs: id-token: write # IMPORTANT: mandatory for trusted publishing steps: - name: Download all the dists - uses: actions/download-artifact@v8 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: python-package-distributions path: dist/ - name: Publish distribution to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 github-release: name: >- @@ -68,12 +70,12 @@ jobs: id-token: write # IMPORTANT: mandatory for sigstore steps: - name: Download all the dists - uses: actions/download-artifact@v8 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: python-package-distributions path: dist/ - name: Sign the dists with Sigstore - uses: sigstore/gh-action-sigstore-python@v3.3.0 + uses: sigstore/gh-action-sigstore-python@04cffa1d795717b140764e8b640de88853c92acc # v3.3.0 with: inputs: >- ./dist/*.tar.gz @@ -81,10 +83,11 @@ jobs: - name: Upload artifact signatures to GitHub Release env: GITHUB_TOKEN: ${{ github.token }} + TAG_NAME: ${{ needs.release-please.outputs.tag_name }} # Upload to GitHub Release using the `gh` CLI. # `dist/` contains the built packages, and the # sigstore-produced signatures and certificates. run: >- gh release upload - ${{ needs.release-please.outputs.tag_name }} dist/** + ${TAG_NAME} dist/** --repo '${{ github.repository }}' diff --git a/zizmor.yml b/zizmor.yml new file mode 100644 index 0000000000..35618cc62f --- /dev/null +++ b/zizmor.yml @@ -0,0 +1,5 @@ +rules: + adhoc-packages: + disable: true + excessive-permissions: + disable: true