Skip to content

Commit 85e1673

Browse files
committed
ci(cd): update workflow permissions
1 parent b2ef0fd commit 85e1673

File tree

3 files changed

+10
-18
lines changed

3 files changed

+10
-18
lines changed

.github/workflows/code-ql.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@ on:
88
schedule:
99
- cron: '0 12 * * 4'
1010

11-
permissions: read-all
11+
permissions:
12+
contents: read
13+
security-events: write
1214

1315
jobs:
1416
codeql:
1517
name: Code QL
1618
runs-on: ubuntu-latest
17-
permissions:
18-
actions: read
19-
contents: read
20-
security-events: write
2119

2220
steps:
2321
- name: Checkout repository for code analysis

.github/workflows/njsscan.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@ on:
88
schedule:
99
- cron: '0 12 * * 4'
1010

11-
permissions: read-all
11+
permissions:
12+
contents: read
13+
security-events: write
1214

1315
jobs:
1416
nodejsscan:
1517
name: NodeJS Scan
1618
runs-on: ubuntu-latest
17-
permissions:
18-
security-events: write
19-
actions: read
20-
contents: read
2119

2220
steps:
2321
- name: Checkout the code

.github/workflows/scorecards.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,15 @@ on:
77
push:
88
branches: [main]
99

10-
permissions: read-all
10+
permissions:
11+
id-token: write
12+
contents: read
13+
security-events: write
1114

1215
jobs:
1316
scorecards:
1417
name: Scorecards Analysis
1518
runs-on: ubuntu-latest
16-
permissions:
17-
# Needed to upload the results to code-scanning dashboard.
18-
security-events: write
19-
# Used to receive a badge. (Upcoming feature)
20-
id-token: write
21-
actions: read
22-
contents: read
2319

2420
steps:
2521
- name: 'Checkout code'

0 commit comments

Comments
 (0)