Skip to content

Commit 16eae90

Browse files
authored
fix: add permissions for github token (#54)
* chore: add permissions for github token * chore: add release test condition that will be deleted later * chore: remove test conditions
1 parent 909d0f3 commit 16eae90

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

.github/workflows/gitleaks.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: GitLeaks
22
on: [pull_request]
33

4+
permissions:
5+
contents: read
6+
47
concurrency:
58
group: gitleaks-${{ github.ref }}
69
cancel-in-progress: true
@@ -15,7 +18,6 @@ jobs:
1518
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1619
GITLEAKS_CONFIG: config.toml
1720
steps:
18-
1921
- name: run-bulwark-gitleaks-scan
2022
shell: sh
2123
env:
@@ -33,4 +35,4 @@ jobs:
3335
exit 1
3436
else
3537
echo "GitLeaks validation check passed"
36-
fi
38+
fi

.github/workflows/release.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@ name: Release to Production
22

33
on:
44
push:
5-
branches: [main]
5+
branches:
6+
- main
67

78
env:
89
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
910

11+
permissions:
12+
contents: write # Required for semantic-release to create releases and tags
13+
packages: write # Required for pushing Docker images to GHCR
14+
id-token: write # Required for cosign signing
15+
1016
jobs:
1117
docker:
1218
name: "Release Docker image"

.github/workflows/test.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
env:
1010
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1111

12+
permissions:
13+
contents: read
14+
packages: write # Required for pushing Docker images to GCR
15+
1216
concurrency:
1317
group: ci-${{ github.ref }}
1418
cancel-in-progress: true

0 commit comments

Comments
 (0)