Skip to content

Commit

Permalink
BC-2889 limit github action permissions (#2346)
Browse files Browse the repository at this point in the history
  • Loading branch information
Loki-Afro authored Dec 22, 2022
1 parent d62a26c commit 9f6c8ed
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ on:
branches-ignore:
- dependabot/**

permissions:
contents: read

jobs:
build_and_push_nuxt:
runs-on: ubuntu-latest
permissions:
packages: write
strategy:
matrix:
tennens: [default, brb, int, n21, thr]
Expand Down Expand Up @@ -105,9 +110,13 @@ jobs:
- build_and_push_nuxt
- branch_name
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: run trivy vulnerability scanner
uses: aquasecurity/trivy-action@d63413b0a4a4482237085319f7f4a1ce99a8f2ac
uses: aquasecurity/trivy-action@9ab158e8597f3b310480b9a69402b419bc03dbd5
with:
image-ref: "ghcr.io/${{ github.repository }}-default:${{ github.sha }}"
format: "sarif"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/security-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- "package.json"
- "package-lock.json"

permissions:
contents: read

jobs:
PROD:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
jobs:
build_and_push_nuxt:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
tennens: [default, brb, int, n21, thr ]
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Test code

on: [push]

permissions:
contents: read

env:
node: 16
jobs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test_unstable_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
label:
name: 'run unstable tests'

permissions:
contents: read

jobs:
end-to-end-unstable-tests:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 9f6c8ed

Please sign in to comment.