diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4dda9e1..61d2625 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,12 +5,21 @@ jobs: lint-and-test: name: "Lint and Test" runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - name: Harden the runner + uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 + with: + egress-policy: block + policy: global-allowed-endpoints-policy + - name: Check out repository code - uses: actions/checkout@v4 + uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - name: Install Node - uses: actions/setup-node@v4 + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - name: Install Dependencies run: yarn install diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 918efc5..21c7083 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -5,12 +5,24 @@ name: Publish to npm on: [workflow_dispatch, workflow_call] +permissions: + contents: read + jobs: publish-npm: runs-on: ubuntu-latest + permissions: + id-token: write + steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - name: Harden the runner + uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 + with: + egress-policy: block + policy: global-allowed-endpoints-policy + + - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 16 registry-url: https://registry.npmjs.org/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 82c81f7..50be738 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,8 +9,17 @@ jobs: outputs: did-create-release: ${{ steps.release.outputs.release_created }} release-tag: ${{ steps.release.outputs.tag_name }} + permissions: + id-token: write + steps: - - uses: google-github-actions/release-please-action@v3 + - name: Harden the runner + uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 + with: + egress-policy: block + policy: global-allowed-endpoints-policy + + - uses: google-github-actions/release-please-action@db8f2c60ee802b3748b512940dde88eabd7b7e01 # v3.7.13 id: release with: release-type: node