Skip to content

Commit 59327fd

Browse files
authored
Merge pull request #205 from instructlab/ihrachyshka-harden-runner-remove
Remove requirement to use harden-runner action
2 parents c80a391 + 045e202 commit 59327fd

File tree

6 files changed

+0
-51
lines changed

6 files changed

+0
-51
lines changed

.github/workflows/actionlint.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ jobs:
2929
actionlint:
3030
runs-on: ubuntu-latest
3131
steps:
32-
- name: "Harden Runner"
33-
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
34-
with:
35-
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
36-
3732
- name: "Checkout"
3833
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3934
with:

.github/workflows/docs.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ jobs:
3232
markdown-lint:
3333
runs-on: ubuntu-latest
3434
steps:
35-
- name: "Harden Runner"
36-
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
37-
with:
38-
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
3935
- name: "Checkout"
4036
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4137
with:

.github/workflows/spellcheck.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ jobs:
3131
name: Spellcheck (en_US)
3232
runs-on: ubuntu-latest
3333
steps:
34-
- name: "Harden Runner"
35-
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
36-
with:
37-
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
38-
3934
- name: "Checkout"
4035
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4136
with:

.github/workflows/stale_bot.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ jobs:
2323
pull-requests: write
2424
runs-on: ubuntu-latest
2525
steps:
26-
- name: "Harden Runner"
27-
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
28-
with:
29-
disable-sudo: true
30-
egress-policy: block
31-
allowed-endpoints: >
32-
api.github.com:443
33-
3426
- name: "Stale Action"
3527
uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
3628
with:

docs/github-actions-providers.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
* `pypa/*@*` - Python Packaging actions
1111
* `rojopolis/spellcheck-github-actions@*` - Spellcheck action
1212
* `sigstore/gh-action-sigstore-python@*` - Sigstore Python action
13-
* `step-security/harden-runner@*` - Harden Runner action
1413
* `ludeeus/action-shellcheck@*` - Shellcheck action
1514
* `hynek/build-and-inspect-python-package@*` - Build and inspect Python package action
1615
* `andstor/file-existence-action@*` - File existence action

docs/github-actions-use-policy.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -60,31 +60,3 @@ Allowed providers will include all GitHub created actions (`actions/*`) as well
6060
The InstructLab organization's Settings->Actions->General must be configured to allow select actions including actions created by GitHub along with the allowed providers.
6161

6262
Adding actions to the allowed providers or denied providers lists will require approval by the organization maintainers along with updating the organization's settings. This can be done by submitting a Pull Request to modify [`github-actions-providers.md`](github-actions-providers.md).
63-
64-
## Harden the GitHub Action runner
65-
66-
To further increase security, the first step of each job in a workflow must be the [`step-security/harden-runner`](https://github.com/step-security/harden-runner) action.
67-
This action hardens the action runner by implementing network egress control and some infrastructure security.
68-
69-
```yaml
70-
- name: "Harden Runner"
71-
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
72-
with:
73-
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
74-
```
75-
76-
Each execution of the workflow job will produce a report showing endpoints accessed by the job and possible source file overwrites.
77-
The report will also suggest modifications to the harden-runner action's configuration to further increase security.
78-
79-
```yaml
80-
- name: "Harden Runner"
81-
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
82-
with:
83-
disable-sudo: true
84-
egress-policy: block
85-
allowed-endpoints: >
86-
github.com:443
87-
```
88-
89-
Hardening the action runner like this can prevent malicious or misbehaving actions or the misuse of actions from exfiltrating secrets.
90-
The article [Harden-Runner Defends Against Arbitrary Command Execution in `tj-actions/changed-files` GitHub Action](https://www.stepsecurity.io/blog/defend-against-arbitrary-command-execution-in-tj-actions-changed-files) shows how the misuse of an action could allow an attacker with a well-crafted pull request to exfiltrate secrets.

0 commit comments

Comments
 (0)