Skip to content

Commit

Permalink
Changed the trigger from pull_request_target to pull_request for bet…
Browse files Browse the repository at this point in the history
…ter security (#1297)

### Changes
 Made security related changes wrt. `pull_request_target`

- Changed `pull_request_target`  to pull_request `pull_request`
- Removed the `authorize` job from the list of jobs defined in that
workflow
- Remove the dependency on `authorize` job for other jobs in that
workflow


<!--
Please describe both what is changing and why this is important.
Include:
- Classes and methods added, deleted, deprecated, or changed
- Screenshots of new or changed UI, if applicable
- A summary of usage if this is a new feature or change to a public API
(this should also be added to relevant documentation once released)
-->



### Checklist

- [ ] I have read the [Auth0 general contribution
guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md)
- [ ] I have read the [Auth0 Code of
Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md)
- [ ] All code quality tools/guidelines have been run/followed
  • Loading branch information
gyaneshgouraw-okta authored Sep 3, 2024
1 parent b05b4a0 commit 974b740
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 24 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/browserstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Browserstack
on:
merge_group:
workflow_dispatch:
pull_request_target:
pull_request:
types:
- opened
- synchronize
Expand All @@ -22,15 +22,8 @@ env:
NODE_VERSION: 18

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

browserstack:
needs: authorize

name: BrowserStack Tests
runs-on: ubuntu-latest
Expand Down
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
9 changes: 1 addition & 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,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

check:
needs: authorize

name: Check for Vulnerabilities
runs-on: ubuntu-latest
Expand Down

0 comments on commit 974b740

Please sign in to comment.