Skip to content

Commit

Permalink
ci: Harden CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Mar 26, 2023
1 parent 013c74c commit 8c6fbc1
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ jobs:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, '[ci skip]') || github.event_name == 'workflow_dispatch' }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 # v2.2.1
with:
disable-sudo: true
disable-file-monitoring: true
egress-policy: block
allowed-endpoints: >
github.com:443
registry.npmjs.org:443
- name: Check out the source code
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0

Expand All @@ -32,6 +42,19 @@ jobs:
name: Test
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 # v2.2.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.wordpress.org:80
api.wordpress.org:443
wordpress.org:443
develop.svn.wordpress.org:443
plugins.svn.wordpress.org:443
github.com:443
- name: Check out the source code
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0

Expand Down Expand Up @@ -62,6 +85,21 @@ jobs:
MYSQL_PASSWORD: wordpress
MYSQL_DATABASE: wordpress_test
steps:
- name: Harden Runner
uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 # v2.2.1
with:
egress-policy: block
allowed-endpoints: >
api.github.com:443
api.wordpress.org:80
api.wordpress.org:443
wordpress.org:443
develop.svn.wordpress.org:443
plugins.svn.wordpress.org:443
github.com:443
objects.githubusercontent.com:443
packagist.org:443
- name: Check out the source code
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0

Expand Down Expand Up @@ -96,6 +134,16 @@ jobs:
name: Check dist
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 # v2.2.1
with:
disable-sudo: true
disable-file-monitoring: true
egress-policy: block
allowed-endpoints: >
github.com:443
registry.npmjs.org:443
- name: Check out the source code
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0

Expand Down
Loading

0 comments on commit 8c6fbc1

Please sign in to comment.