Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[StepSecurity] ci: Harden GitHub Actions #4636

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/create-quantic-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- name: Check Out Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Create cache file
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/delete-pr-artifact-on-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ jobs:
environment: PR Artifacts
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: ./.github/actions/publish-pr-review-site
with:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/e2e-quantic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ jobs:
name: 'Setup e2e tests on Quantic'
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: ./.github/actions/setup
- uses: ./.github/actions/setup-sfdx
Expand All @@ -32,6 +37,11 @@ jobs:
'cypress/e2e/facets-2/**/*',
]
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: ./.github/actions/setup
- uses: ./.github/actions/e2e-quantic
Expand All @@ -42,6 +52,11 @@ jobs:
needs: e2e-quantic-test
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: ./.github/actions/setup
- uses: ./.github/actions/setup-sfdx
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Labeler
on: [pull_request_target]

permissions:
contents: read

jobs:
label:
runs-on: ubuntu-latest
Expand All @@ -9,6 +12,11 @@ jobs:
pull-requests: write

steps:
- uses: actions/labeler@v4
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- uses: actions/labeler@ac9175f8a1f3625fd0d4fb234536d26811351594 # v4.3.0
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
8 changes: 8 additions & 0 deletions .github/workflows/masterbot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
branches:
- master
- 'prerelease/**'
permissions:
contents: read

jobs:
prerelease:
timeout-minutes: 40
Expand All @@ -13,6 +16,11 @@ jobs:
runs-on: ubuntu-latest
environment: 'Prerelease'
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/package-lock-root-fail.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@ on:
- '!utils/atomic-storybook/package-lock.json'
- '!package-lock.json'

permissions:
contents: read

jobs:
lockfile-outside-of-root:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- run: exit 1
8 changes: 8 additions & 0 deletions .github/workflows/package-lock-root-success.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,16 @@ on:
- '**/package-lock.json'
- '!package-lock.json'

permissions:
contents: read

jobs:
lockfile-outside-of-root:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- run: exit 0
Loading