Skip to content

Commit c9fcc20

Browse files
authored
[Sec] least privilege for actions (#241)
1 parent 6622a61 commit c9fcc20

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/code-quality.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Code Quality
22

33
on: [push, pull_request]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
code-quality:
710
name: Code Quality Checks

.github/workflows/npm-release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
paths:
1010
- 'libCacheSim-node/**'
1111

12+
permissions:
13+
contents: write # Needed for creating releases and accessing repository contents
14+
actions: read # Needed for workflow actions
15+
1216
env:
1317
BUILD_TYPE: Release
1418

.github/workflows/scorecard.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ on:
1515
branches: [ "develop" ]
1616

1717
# Declare default permissions as read only.
18-
permissions: read-all
18+
permissions:
19+
contents: read
20+
actions: read
1921

2022
jobs:
2123
analysis:

0 commit comments

Comments
 (0)