Skip to content

Commit

Permalink
OpenSSF Scorecard: fine grained workflow permissions
Browse files Browse the repository at this point in the history
Signed-off-by: Enrique Lacal <[email protected]>
  • Loading branch information
EnriqueL8 committed Jan 24, 2025
1 parent 20f4bae commit 9d34f01
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 6 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/docker_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ on:
- '.github/**' # exclude .github directory
- '**.md' # exclude all markdown files

permissions:
contents: read
packages: write

jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
with:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/docker_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ on:
release:
types: [released, prereleased]

permissions:
contents: read
packages: write

jobs:

docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
pull_request:
release:
types: [released]

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ on:

workflow_dispatch:

permissions:
contents: read
packages: write

jobs:
build:
env:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
- cron: "0 0 * * *"
workflow_dispatch:

permissions:
contents: read

jobs:
e2e-test:
runs-on: firefly-ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/solidity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Solidity Tests
on:
pull_request:
branches: [main]
permissions:
contents: read
packages: read

jobs:
solidity-test:
Expand Down

0 comments on commit 9d34f01

Please sign in to comment.