Skip to content

Commit

Permalink
fix: Swap security label check on the PR title validation job to expl…
Browse files Browse the repository at this point in the history
…icit permissions instead (#3987)

revert security label check for PR title validation & add explicit read-only permission instead

Signed-off-by: Jeremy Ary <jary@redhat.com>
  • Loading branch information
jeremyary authored Mar 6, 2024
1 parent 2cf1a0f commit f604af9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/lint_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ on:
- edited
- synchronize

permissions:
# read-only perms specified due to use of pull_request_target in lieu of security label check
pull-requests: read

jobs:
validate-title:
# when using pull_request_target, all jobs MUST have this if check for 'ok-to-test' or 'approved' for security purposes.
if:
((github.event.action == 'labeled' && (github.event.label.name == 'approved' || github.event.label.name == 'lgtm' || github.event.label.name == 'ok-to-test')) ||
(github.event.action != 'labeled' && (contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(github.event.pull_request.labels.*.name, 'approved') || contains(github.event.pull_request.labels.*.name, 'lgtm')))) &&
github.repository == 'feast-dev/feast'
name: Validate PR title
runs-on: ubuntu-latest
Expand Down

0 comments on commit f604af9

Please sign in to comment.