Skip to content

Commit e493f62

Browse files
authored
Address Scorecard Token-Permissions and Pinned-Dependencies (#633)
On-behalf-of: @SAP marko.mudrinic@sap.com Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
1 parent 97173cc commit e493f62

4 files changed

Lines changed: 41 additions & 31 deletions

File tree

.github/workflows/auto-labeler.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ on:
88

99
permissions:
1010
contents: read
11-
pull-requests: write
12-
issues: write
1311

1412
jobs:
1513
auto-labeler:
1614
if: github.event.pull_request.head.repo.full_name == github.repository
17-
uses: platform-mesh/.github/.github/workflows/job-auto-labeler.yml@main
15+
uses: platform-mesh/.github/.github/workflows/job-auto-labeler.yml@9ddacafbe3260312cb1cc3f9974ad2fece8effe0
16+
permissions:
17+
contents: read
18+
pull-requests: write
19+
issues: write

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515

1616
jobs:
1717
lint:
18-
uses: platform-mesh/.github/.github/workflows/job-golang-lint.yml@main
18+
uses: platform-mesh/.github/.github/workflows/job-golang-lint.yml@9ddacafbe3260312cb1cc3f9974ad2fece8effe0
1919
with:
2020
useTask: true
2121

@@ -25,7 +25,7 @@ jobs:
2525
runsOn: 'ubuntu-latest-large'
2626

2727
docker-build:
28-
uses: platform-mesh/.github/.github/workflows/job-docker-build.yml@main
28+
uses: platform-mesh/.github/.github/workflows/job-docker-build.yml@9ddacafbe3260312cb1cc3f9974ad2fece8effe0
2929
with:
3030
imageTagName: ghcr.io/platform-mesh/platform-mesh-operator
3131

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
name: OpenSSF Scorecard
22
on:
3-
push:
4-
branches: [main]
5-
schedule:
6-
- cron: '30 4 * * 1'
7-
workflow_dispatch:
3+
push:
4+
branches: [main]
5+
schedule:
6+
- cron: '30 4 * * 1'
7+
workflow_dispatch:
88

9-
permissions: read-all
9+
permissions:
10+
contents: read
1011

1112
jobs:
12-
scorecard:
13-
uses: platform-mesh/.github/.github/workflows/job-ossf-scorecard.yml@main
14-
permissions:
15-
security-events: write
16-
id-token: write
17-
contents: read
18-
actions: read
13+
scorecard:
14+
uses: platform-mesh/.github/.github/workflows/job-ossf-scorecard.yml@9ddacafbe3260312cb1cc3f9974ad2fece8effe0
15+
permissions:
16+
security-events: write
17+
id-token: write
18+
contents: read
19+
actions: read

.github/workflows/release.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,15 @@ on:
66
- main
77

88
permissions:
9-
contents: write
10-
id-token: write
11-
issues: write
12-
packages: write
13-
pull-requests: write
14-
attestations: write
9+
contents: read
1510

1611
concurrency:
1712
group: release-${{ github.ref }}
1813
cancel-in-progress: false
1914

2015
jobs:
2116
lint:
22-
uses: platform-mesh/.github/.github/workflows/job-golang-lint.yml@main
17+
uses: platform-mesh/.github/.github/workflows/job-golang-lint.yml@9ddacafbe3260312cb1cc3f9974ad2fece8effe0
2318
with:
2419
useTask: true
2520

@@ -30,21 +25,27 @@ jobs:
3025
runsOn: 'ubuntu-latest-large'
3126

3227
create-version:
33-
uses: platform-mesh/.github/.github/workflows/job-create-version.yml@main
28+
uses: platform-mesh/.github/.github/workflows/job-create-version.yml@9ddacafbe3260312cb1cc3f9974ad2fece8effe0
3429
secrets: inherit
30+
permissions:
31+
contents: write
3532

3633
docker-build-push:
3734
needs: [create-version, lint, test]
38-
uses: platform-mesh/.github/.github/workflows/job-docker-build-push.yml@main
35+
uses: platform-mesh/.github/.github/workflows/job-docker-build-push.yml@9ddacafbe3260312cb1cc3f9974ad2fece8effe0
36+
secrets: inherit
37+
permissions:
38+
contents: write
39+
packages: write
40+
id-token: write
3941
with:
4042
imageTagName: ghcr.io/platform-mesh/platform-mesh-operator
4143
version: ${{ needs.create-version.outputs.version }}
4244
multiarch: true
43-
secrets: inherit
4445

4546
update-version:
4647
needs: [create-version, docker-build-push]
47-
uses: platform-mesh/.github/.github/workflows/job-chart-version-update.yml@main
48+
uses: platform-mesh/.github/.github/workflows/job-chart-version-update.yml@9ddacafbe3260312cb1cc3f9974ad2fece8effe0
4849
secrets: inherit
4950
with:
5051
appVersion: ${{ needs.create-version.outputs.version }}
@@ -53,14 +54,20 @@ jobs:
5354

5455
sbom:
5556
needs: [create-version, docker-build-push]
56-
uses: platform-mesh/.github/.github/workflows/job-sbom.yml@main
57+
uses: platform-mesh/.github/.github/workflows/job-sbom.yml@9ddacafbe3260312cb1cc3f9974ad2fece8effe0
58+
permissions:
59+
contents: read
60+
packages: read
5761
with:
5862
imageReference: ghcr.io/platform-mesh/platform-mesh-operator:${{ needs.create-version.outputs.version }}
5963

6064
image-ocm:
6165
needs: [create-version, docker-build-push, sbom]
62-
uses: platform-mesh/.github/.github/workflows/job-image-ocm.yml@main
66+
uses: platform-mesh/.github/.github/workflows/job-image-ocm.yml@9ddacafbe3260312cb1cc3f9974ad2fece8effe0
6367
secrets: inherit
68+
permissions:
69+
contents: read
70+
packages: write
6471
with:
6572
imageReference: ghcr.io/platform-mesh/platform-mesh-operator:${{ needs.create-version.outputs.version }}
6673
appVersion: ${{ needs.create-version.outputs.version }}

0 commit comments

Comments
 (0)