Skip to content

Commit

Permalink
Skip SonarCloud analysis of PRs from forked repositories
Browse files Browse the repository at this point in the history
Because such analysis will fail due to unavailability of the relevant
secrets. Working around this is nontrivial and a likely source of
security issues.
  • Loading branch information
Stephan202 committed Dec 17, 2023
1 parent 7529b99 commit e5f93fd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ permissions:
contents: read
jobs:
analyze:
# Analysis of code in forked repositories is skipped, as such workflow runs
# do not have access to the requisite secrets.
if: github.event.pull_request.head.repo.full_name == github.repository
permissions:
contents: read
runs-on: ubuntu-22.04
Expand Down

0 comments on commit e5f93fd

Please sign in to comment.