Skip to content

Commit 0ef3702

Browse files
[StepSecurity] Apply security best practices (#41)
* [StepSecurity] Apply security best practices Signed-off-by: StepSecurity Bot <[email protected]> * updates --------- Signed-off-by: StepSecurity Bot <[email protected]> Co-authored-by: stepsecurity-app[bot] <188008098+stepsecurity-app[bot]@users.noreply.github.com> Co-authored-by: Carlos Panato <[email protected]>
1 parent 1a74b6d commit 0ef3702

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"

.github/workflows/actionlint.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ on:
77
pull_request:
88
branches: [ 'main', 'release-*' ]
99

10-
jobs:
10+
permissions: {}
1111

12+
jobs:
1213
action-lint:
1314
name: Action lint
1415
runs-on: ubuntu-latest
1516

17+
permissions:
18+
contents: read # To read the repo contents
19+
1620
steps:
1721
- name: Harden Runner
1822
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
@@ -21,6 +25,8 @@ jobs:
2125

2226
- name: Check out code
2327
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
28+
with:
29+
persist-credentials: false
2430

2531
- name: Find yamls
2632
id: get_yamls

.github/workflows/ghaudit.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,46 @@ on:
66

77
name: GitHub Audit
88

9+
permissions: {}
10+
911
jobs:
1012
ghaudit:
1113
runs-on: ubuntu-latest
1214

1315
permissions:
16+
contents: read # To read the repo contents
1417
id-token: write # To federate with Octo STS
1518

1619
steps:
20+
- name: Harden the runner (Audit all outbound calls)
21+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
22+
with:
23+
egress-policy: audit
24+
1725
- uses: octo-sts/action@6177b4481c00308b3839969c3eca88c96a91775f # v1.0.0
1826
id: octo-sts
1927
with:
2028
scope: ${{ github.repository_owner }}
2129
identity: ghaudit
2230

2331
- name: Deploy Keys
24-
uses: wolfi-dev/wolfi-act@main
32+
uses: wolfi-dev/wolfi-act@d78f3659c50c4520e222df428f4903a1c4b0c6ee # # v0.0.1
2533
env:
2634
GH_TOKEN: ${{ steps.octo-sts.outputs.token }}
2735
with:
2836
packages: ghaudit
2937
command: ghaudit org -o ${{ github.repository_owner }} deploy-keys
3038

3139
- name: Branch Protections
32-
uses: wolfi-dev/wolfi-act@main
40+
uses: wolfi-dev/wolfi-act@d78f3659c50c4520e222df428f4903a1c4b0c6ee # # v0.0.1
3341
env:
3442
GH_TOKEN: ${{ steps.octo-sts.outputs.token }}
3543
with:
3644
packages: ghaudit
3745
command: ghaudit org -o ${{ github.repository_owner }} branch-protections
3846

3947
- name: Default Permissions
40-
uses: wolfi-dev/wolfi-act@main
48+
uses: wolfi-dev/wolfi-act@d78f3659c50c4520e222df428f4903a1c4b0c6ee # v0.0.1
4149
env:
4250
GH_TOKEN: ${{ steps.octo-sts.outputs.token }}
4351
with:

0 commit comments

Comments
 (0)