diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed0e232..bda4748 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,12 +6,23 @@ on: - 'v*.[0-9]' pull_request: +permissions: # added using https://github.com/step-security/secure-workflows + contents: read + jobs: test: + permissions: + checks: write # for coverallsapp/github-action to create new checks + contents: read # for actions/checkout to fetch code runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - name: Harden Runner + uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5 # v2.0.0 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + + - uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6 # v2.6.0 + - uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1.4.6 with: node-version: 12.x - run: yarn diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index ba85a66..77b63e3 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -2,13 +2,21 @@ name: Publish to npm on: release: types: [created] +permissions: # added using https://github.com/step-security/secure-workflows + contents: read + jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Harden Runner + uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5 # v2.0.0 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + + - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0 # Setup .npmrc file to publish to npm - - uses: actions/setup-node@v3 + - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1 with: node-version: "16.x" registry-url: "https://registry.npmjs.org" diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index 615c4a2..02b944c 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -21,6 +21,11 @@ jobs: id-token: write steps: + - name: Harden Runner + uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5 # v2.0.0 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + - name: "Checkout code" uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 with: