Skip to content

Commit 9eaba04

Browse files
authored
Merge pull request #47 from portapps/fix-perms
fix reusable workflow permissions
2 parents f97e4ac + b2cbdba commit 9eaba04

3 files changed

Lines changed: 9 additions & 13 deletions

File tree

.github/workflows/app-build.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: app-build
22

3-
permissions:
4-
contents: read
5-
63
on:
74
workflow_call:
85
inputs:
@@ -35,8 +32,6 @@ env:
3532
jobs:
3633
build:
3734
runs-on: windows-latest
38-
permissions:
39-
contents: read
4035
env:
4136
GO_VERSION: ${{ inputs.go_version }}
4237
NODE_VERSION: ${{ inputs.node_version }}
@@ -118,8 +113,6 @@ jobs:
118113
runs-on: ubuntu-latest
119114
needs:
120115
- build
121-
permissions:
122-
contents: write # required to create a GitHub release
123116
steps:
124117
-
125118
name: Prepare
@@ -147,4 +140,4 @@ jobs:
147140
bin/release/*
148141
name: ${{ env.GIT_TAGNAME }}
149142
env:
150-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
143+
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/app-virustotal.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: app-virustotal
22

3-
permissions:
4-
contents: read
5-
63
on:
74
workflow_call:
85
secrets:
@@ -14,8 +11,6 @@ on:
1411
jobs:
1512
run:
1613
runs-on: ubuntu-latest
17-
permissions:
18-
contents: write # required to write GitHub Release body
1914
steps:
2015
-
2116
name: Prepare

.github/zizmor.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
# https://docs.zizmor.sh/configuration/
22
rules:
3+
# does not apply to reusable worfklows where permissions are defined by
4+
# the caller workflow and not the reusable workflow itself.
5+
# https://docs.zizmor.sh/audits/#excessive-permissions
6+
excessive-permissions:
7+
ignore:
8+
- app-build.yml
9+
- app-virustotal.yml
10+
311
secrets-outside-env:
412
disable: true

0 commit comments

Comments
 (0)