Skip to content

Commit 5c5f1bd

Browse files
authored
feat: Update container permissions
1 parent 307fe31 commit 5c5f1bd

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/container.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ jobs:
5252
release: ${{ steps.set-version.outputs.release }}
5353
version: ${{ steps.set-version.outputs.version }}
5454

55+
permissions:
56+
id-token: write
57+
contents: read
58+
5559
steps:
5660
- name: "Checkout"
5761
uses: actions/checkout@v4
@@ -87,6 +91,11 @@ jobs:
8791
uses: advanced-security/reusable-workflows/.github/workflows/container-security.yml@main
8892
needs: set-version
8993
secrets: inherit
94+
permissions:
95+
id-token: write
96+
contents: read
97+
packages: read # Read Container Registry
98+
security-events: write # Code Scanning
9099
with:
91100
version: ${{ needs.set-version.outputs.version }}
92101
container-file: ${{ inputs.container-file }}
@@ -98,6 +107,11 @@ jobs:
98107
needs: [ scan-image, set-version ]
99108
if: ${{ needs.set-version.outputs.release == 'true' }}
100109
secrets: inherit
110+
permissions:
111+
id-token: write
112+
contents: write # Upload SBOM to GitHub
113+
packages: write # Push to Container Registry
114+
attestations: write # Upload attestations
101115
with:
102116
version: ${{ needs.set-version.outputs.version }}
103117
container-file: ${{ inputs.container-file }}

0 commit comments

Comments
 (0)