Skip to content

Commit

Permalink
ci: Use pull_request_target for dependency review workflow (#849)
Browse files Browse the repository at this point in the history
Use `pull_request_target` for dependency review workflow

Closes #841
  • Loading branch information
WillDaSilva authored Jul 21, 2022
1 parent 8173064 commit 4eca554
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Dependency Review

on:
pull_request: {}
pull_request_target: {}
workflow_dispatch:
inputs: {}

env:
FOSSA_CLI_VERSION: '3.3.9'
FOSSA_CLI_INSTALLER_VERSION: '3.3.10'

permissions:
contents: read
Expand All @@ -19,11 +19,14 @@ jobs:
uses: actions/[email protected]

- name: GitHub dependency vulnerability check
uses: actions/dependency-review-action@v2
if: ${{ github.event_name == 'pull_request_target' }}
# Use this fork until https://github.com/actions/dependency-review-action/pull/165 is merged
uses: WillDaSilva/dependency-review-action@main

- name: FOSSA dependency license check
run: |
curl --no-progress-meter -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/v${FOSSA_CLI_VERSION}/install-latest.sh | bash
# `$FOSSA_CLI_INSTALLER_VERSION` only controls the version of the installer used - the latest version of `fossa-cli` will always be used.
curl --no-progress-meter -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/v${FOSSA_CLI_INSTALLER_VERSION}/install-latest.sh | bash
echo '## FOSSA dependency license check' >> $GITHUB_STEP_SUMMARY
echo '' >> $GITHUB_STEP_SUMMARY
Expand Down

0 comments on commit 4eca554

Please sign in to comment.