Skip to content

Commit

Permalink
changed pull_request_target to pull_request for better security in wo…
Browse files Browse the repository at this point in the history
…rkflow (#758)
  • Loading branch information
pmathew92 committed Sep 6, 2024
2 parents d8ac49e + 886ba6c commit cea3c17
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Semgrep

on:
merge_group:
pull_request_target:
pull_request:
types:
- opened
- synchronize
Expand All @@ -20,15 +20,8 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
authorize:
name: Authorize
environment: ${{ github.actor != 'dependabot[bot]' && github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }}
runs-on: ubuntu-latest
steps:
- run: true

run:
needs: authorize # Require approval before running on forked pull requests

name: Check for Vulnerabilities
runs-on: ubuntu-latest
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Snyk
on:
merge_group:
workflow_dispatch:
pull_request_target:
pull_request:
types:
- opened
- synchronize
Expand All @@ -21,15 +21,9 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
authorize:
name: Authorize
environment: ${{ github.actor != 'dependabot[bot]' && github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }}
runs-on: ubuntu-latest
steps:
- run: true


check:
needs: authorize

name: Check for Vulnerabilities
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions .snyk
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ ignore:
SNYK-JAVA-COMFASTERXMLWOODSTOX-3091135:
- '*':
reason: Latest version of dokka has this vulnerability
expires: 2024-08-31T12:08:37.765Z
expires: 2024-10-31T12:19:35.000Z
created: 2024-08-01T12:08:37.770Z
SNYK-JAVA-ORGJETBRAINSKOTLIN-2393744:
- '*':
reason: Latest version of dokka has this vulnerability
expires: 2024-08-31T12:08:55.924Z
expires: 2024-10-31T12:19:35.000Z
created: 2024-08-01T12:08:55.927Z
SNYK-JAVA-COMFASTERXMLJACKSONCORE-7569538:
- '*':
reason: Latest version of dokka has this vulnerability
expires: 2024-08-31T12:08:02.966Z
expires: 2024-10-31T12:19:35.000Z
created: 2024-08-01T12:08:02.973Z
patch: {}

0 comments on commit cea3c17

Please sign in to comment.