Skip to content

Commit 965f0bf

Browse files
committed
Add explicit permissions to GitHub Actions workflows
Resolves CodeQL security alerts by restricting GITHUB_TOKEN to contents:read only
1 parent bab8201 commit 965f0bf

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Sample CI
22
on: [ push, pull_request ]
33

4+
permissions:
5+
contents: read
6+
47
jobs:
58
test-functions:
69
strategy:

.github/workflows/pylint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
paths:
99
- '**.py'
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
analyze:
1316
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)