Skip to content

Commit 6ba87a5

Browse files
authored
Merge pull request #43 from gcmurphy/workflow
Update default permissions for all workflows
2 parents 56bf648 + 886632a commit 6ba87a5

File tree

4 files changed

+31
-5
lines changed

4 files changed

+31
-5
lines changed

.github/workflows/audit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ on:
33
schedule:
44
- cron: '0 0 * * *'
55
workflow_dispatch:
6+
7+
permissions: read-all
68
jobs:
79
audit:
810
runs-on: ubuntu-latest

.github/workflows/sast.yml renamed to .github/workflows/devskim.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
name: Static Analysis
1+
name: Static Analysis - DevSkim
22
on:
33
push:
44
branches: [ "main" ]
55
pull_request:
66
branches: [ "main" ]
77
schedule:
88
- cron: '30 17 * * 5'
9+
workflow_dispatch:
910

11+
permissions: read-all
1012
jobs:
1113
lint:
1214
name: DevSkim
@@ -15,6 +17,7 @@ jobs:
1517
actions: read
1618
contents: read
1719
security-events: write
20+
if: (github.action != 'dependabot[bot]')
1821
steps:
1922
- name: Checkout code
2023
uses: actions/checkout@v4

.github/workflows/rust.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
pull_request:
77
branches: [ main ]
88

9+
permissions: read-all
10+
911
env:
1012
CARGO_TERM_COLOR: always
1113

.github/workflows/semgrep.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,38 @@
1-
name: Security Checks
2-
on: [pull_request]
1+
name: Static Analysis - Semgrep
2+
on:
3+
push:
4+
branches: [ "main" ]
5+
pull_request:
6+
branches: [ "main" ]
7+
schedule:
8+
- cron: '30 17 * * 5'
9+
workflow_dispatch:
10+
11+
permissions: read-all
312
jobs:
413
semgrep:
514
name: Static analysis (semgrep)
615
continue-on-error: true
716
runs-on: ubuntu-latest
817
container:
918
image: returntocorp/semgrep
19+
permissions:
20+
actions: read
21+
contents: read
22+
security-events: write
1023
if: (github.action != 'dependabot[bot]')
1124
steps:
12-
- uses: actions/checkout@v3
13-
- run: semgrep ci
25+
- name: Semgrep Scan
26+
uses: actions/checkout@v3
27+
run: semgrep ci --sarif semgrep-results.sarif
1428
env:
1529
SEMGREP_RULES: >-
1630
p/security-audit
1731
p/secrets
1832
p/supply-chain
1933
p/rust
34+
35+
- name: Upload results
36+
uses: github/codeql-action/upload-sarif@v2
37+
with:
38+
sarif_file: semgrep-results.sarif

0 commit comments

Comments
 (0)