Skip to content

Commit f604af9

Browse files
authored
fix: Swap security label check on the PR title validation job to explicit permissions instead (feast-dev#3987)
revert security label check for PR title validation & add explicit read-only permission instead Signed-off-by: Jeremy Ary <[email protected]>
1 parent 2cf1a0f commit f604af9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/lint_pr.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ on:
77
- edited
88
- synchronize
99

10+
permissions:
11+
# read-only perms specified due to use of pull_request_target in lieu of security label check
12+
pull-requests: read
13+
1014
jobs:
1115
validate-title:
12-
# when using pull_request_target, all jobs MUST have this if check for 'ok-to-test' or 'approved' for security purposes.
1316
if:
14-
((github.event.action == 'labeled' && (github.event.label.name == 'approved' || github.event.label.name == 'lgtm' || github.event.label.name == 'ok-to-test')) ||
15-
(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')))) &&
1617
github.repository == 'feast-dev/feast'
1718
name: Validate PR title
1819
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)