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

chore(ci): Update harden-runner, set policy to block, restrict permissions #297

Merged
merged 3 commits into from
Mar 4, 2024
Merged
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
56 changes: 44 additions & 12 deletions .github/workflows/reusable-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,20 @@ jobs:
nextjs-13-pages-wrap:
name: Next.js 13 + Page Router + withArcjet
runs-on: ubuntu-latest
permissions:
contents: read
steps:
# Environment security
- name: Step Security
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
disable-sudo: true
egress-policy: block
allowed-endpoints: >
fonts.googleapis.com:443
fonts.gstatic.com:443
github.com:443
registry.npmjs.org:443

# Checkout
# Most toolchains require checkout first
Expand Down Expand Up @@ -76,12 +84,20 @@ jobs:
nextjs-14-app-dir-validate-email:
name: Next.js 14 + App Router + Validate Email
runs-on: ubuntu-latest
permissions:
contents: read
steps:
# Environment security
- name: Step Security
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
disable-sudo: true
egress-policy: block
allowed-endpoints: >
fonts.googleapis.com:443
fonts.gstatic.com:443
github.com:443
registry.npmjs.org:443

# Checkout
# Most toolchains require checkout first
Expand Down Expand Up @@ -110,12 +126,20 @@ jobs:
nextjs-14-openai:
name: Next.js 14 + OpenAI
runs-on: ubuntu-latest
permissions:
contents: read
steps:
# Environment security
- name: Step Security
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
disable-sudo: true
egress-policy: block
allowed-endpoints: >
fonts.googleapis.com:443
fonts.gstatic.com:443
github.com:443
registry.npmjs.org:443

# Checkout
# Most toolchains require checkout first
Expand Down Expand Up @@ -144,12 +168,20 @@ jobs:
nextjs-14-pages-wrap:
name: Next.js 14 + Page Router + withArcjet
runs-on: ubuntu-latest
permissions:
contents: read
steps:
# Environment security
- name: Step Security
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
disable-sudo: true
egress-policy: block
allowed-endpoints: >
fonts.googleapis.com:443
fonts.gstatic.com:443
github.com:443
registry.npmjs.org:443

# Checkout
# Most toolchains require checkout first
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/reusable-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ jobs:
matrix:
node: [18, 20]
os: [ubuntu-latest]
permissions:
contents: read
steps:
# Environment security
- name: Step Security
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
disable-sudo: true
egress-policy: block
allowed-endpoints: >
github.com:443
registry.npmjs.org:443

# Checkout
# Most toolchains require checkout first
Expand Down
Loading