Skip to content

Commit 7239e7e

Browse files
committed
using least privileges in workflows
1 parent 51c401c commit 7239e7e

3 files changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/devguard-scanner.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ on:
66
workflow_dispatch:
77
push:
88

9+
permissions:
10+
contents: read
11+
actions: read
12+
security-events: write
13+
packages: write
14+
915

1016
jobs:
1117
golangci:

.github/workflows/postgresql.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
tags:
66
- '*'
77

8+
permissions:
9+
contents: read
10+
packages: write
11+
812
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
913
jobs:
1014
# Docker image build job

.github/workflows/vulndb.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
schedule:
66
- cron: '0 */6 * * *' # every hour
77

8+
permissions:
9+
contents: read
10+
packages: write
11+
812
env:
913
POSTGRES_DB: devguard
1014
POSTGRES_USER: devguard

0 commit comments

Comments
 (0)