Skip to content

Commit 3b70dfd

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 d286742 commit 3b70dfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/auto-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
contents: write
1010
id-token: write
1111
runs-on: ubuntu-latest
12-
if: github.actor == 'dependabot[bot]'
12+
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == github.event.pull_request.head.repo.full_name
1313
steps:
1414
- name: Fetch Dependabot metadata
1515
id: dependabot-metadata

0 commit comments

Comments
 (0)