Skip to content

Commit

Permalink
fix: add proper permissions for slither-action operation
Browse files Browse the repository at this point in the history
  • Loading branch information
tenequm committed Jan 21, 2025
1 parent 092a79a commit 195c802
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/branch-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ permissions:
id-token: write
deployments: write
checks: write
security-events: write

# The following concurrency group queus in-progress jobs
concurrency:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ permissions:
id-token: write
deployments: write
checks: write
security-events: write

# The following concurrency group cancels in-progress jobs or runs on pull_request events only
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/reusable-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
permissions:
contents: read
id-token: write
security-events: write

jobs:
contracts-tests:
Expand Down Expand Up @@ -48,14 +49,25 @@ jobs:

- name: Create coverage report
run: bun run cover


contracts-static-analysis:
name: '[contracts] Run static analysis with `slither`'
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Make static analysis of contracts
uses: crytic/[email protected]
id: slither
with:
target: contracts
sarif: results.sarif
fail-on: none

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
Expand Down

0 comments on commit 195c802

Please sign in to comment.