Skip to content

Commit

Permalink
Skip SonarCloud analysis of PRs from forked repositories (#926)
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 authored Dec 18, 2023
1 parent 7c2078b commit ff3be8a
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 ff3be8a

Please sign in to comment.