Skip to content

Commit 2d11d57

Browse files
chore: [SECURITY-1357] refine condition for dependabot approval in workflow
This change improves the security of the dependabot auto-approval workflow by: - Checking the PR user login instead of github.actor - Verifying the PR is from the same repository (not a fork) This prevents potential security issues where forked PRs could be auto-approved.
1 parent 2d0141c commit 2d11d57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/dependabot-approve-and-request-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
contents: write
99
id-token: write
1010
runs-on: ubuntu-latest
11-
if: github.actor == 'dependabot[bot]'
11+
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == github.event.pull_request.head.repo.full_name
1212
steps:
1313
- uses: contentful/github-auto-merge@v1
1414
with:

0 commit comments

Comments
 (0)