Skip to content

Commit 3e57ba5

Browse files
authored
Add permissions tofiles-changed jobs (#36142)
Followup to #36140. `files-changed` is a job that imports another workflow via `uses` statement but CodeQL still complains about lack of permissions on these jobs, so add it. This will fix the remaining [3 CodeQL issues](https://github.com/go-gitea/gitea/security/code-scanning?query=is%3Aopen+branch%3Amain+permissions).
1 parent 4c06c98 commit 3e57ba5

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

.github/workflows/pull-compliance.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ concurrency:
1010
jobs:
1111
files-changed:
1212
uses: ./.github/workflows/files-changed.yml
13+
permissions:
14+
contents: read
1315

1416
lint-backend:
1517
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'

.github/workflows/pull-db-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ concurrency:
1010
jobs:
1111
files-changed:
1212
uses: ./.github/workflows/files-changed.yml
13+
permissions:
14+
contents: read
1315

1416
test-pgsql:
1517
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'

.github/workflows/pull-docker-dryrun.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ concurrency:
1010
jobs:
1111
files-changed:
1212
uses: ./.github/workflows/files-changed.yml
13+
permissions:
14+
contents: read
1315

1416
container:
1517
if: needs.files-changed.outputs.docker == 'true' || needs.files-changed.outputs.actions == 'true'

0 commit comments

Comments
 (0)