Skip to content

Commit 4e8ff36

Browse files
authored
CI: Harden permissions (#22)
Follow recommendations from zizmor scan
1 parent 28163bd commit 4e8ff36

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.github/workflows/build-and-test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
pull_request:
77
ignore_branches: [ no_test ]
88

9+
permissions: {}
10+
911
jobs:
1012

1113
build:
@@ -19,6 +21,8 @@ jobs:
1921
run: sudo apt-get install -y rabbitmq-server
2022

2123
- uses: actions/checkout@v4
24+
with:
25+
persist-credentials: false
2226

2327
- name: Set up Go
2428
uses: actions/setup-go@v5

.github/workflows/build_container.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ on:
66
pull_request:
77
ignore_branches: [ no_test ]
88

9+
permissions: {}
10+
911
jobs:
1012

1113
build_container_scratch:
1214

1315
runs-on: ubuntu-latest
1416
steps:
1517
- uses: actions/checkout@v4
18+
with:
19+
persist-credentials: false
1620

1721
- name: Run build_container to generate scratch image
1822
run: scripts/build_container -g scratch -e BASE_IMAGE=scratch
@@ -22,6 +26,8 @@ jobs:
2226
runs-on: ubuntu-latest
2327
steps:
2428
- uses: actions/checkout@v4
29+
with:
30+
persist-credentials: false
2531

2632
- name: Run build_container to generate and image using kaniko
2733
run: scripts/build_container --tag kaniko --builder kaniko -t debug -e UID=1234 -e GID=5678
@@ -37,6 +43,8 @@ jobs:
3743
runs-on: ubuntu-latest
3844
steps:
3945
- uses: actions/checkout@v4
46+
with:
47+
persist-credentials: false
4048

4149
- name: Run scripts/test
4250
run: scripts/test

0 commit comments

Comments
 (0)