Skip to content

Commit

Permalink
security: add permissions block to workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
reakaleek committed Feb 17, 2024
1 parent 6be16a4 commit 97ff159
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/addToProject.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
env:
MY_GITHUB_TOKEN: ${{ secrets.APM_TECH_USER_TOKEN }}

permissions:
contents: read

jobs:
assign_one_project:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: build-distribution
on:
workflow_call: ~

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
types: [opened]
env:
MY_GITHUB_TOKEN: ${{ secrets.APM_TECH_USER_TOKEN }}
permissions:
contents: read

jobs:
triage:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
- '**/*.md'
- '**/*.asciidoc'

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
push:
branches: [main]

permissions:
contents: read

jobs:
pre-commit:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
description: Matrix include JSON string
type: string

permissions:
contents: read

jobs:
docker:
name: "docker (version: ${{ matrix.version }}, framework: ${{ matrix.framework }})"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-reporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
types:
- completed

permissions:
contents: read
actions: read

jobs:
report:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ on:
required: true
type: boolean

permissions:
contents: read

jobs:
build-distribution:
uses: ./.github/workflows/build-distribution.yml
Expand Down

0 comments on commit 97ff159

Please sign in to comment.