Skip to content

chore: use pull_request_target for dependabot prs #419

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dependabot_pr.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Dependabot PR
on:
pull_request:
pull_request_target:
Copy link
Preview

Copilot AI Aug 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using pull_request_target creates a security risk as it runs workflows in the context of the target repository with access to secrets, even for external contributors. Consider adding explicit checks to verify the PR author is Dependabot (e.g., if: github.actor == 'dependabot[bot]') to prevent potential code injection attacks from malicious PRs.

Copilot uses AI. Check for mistakes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already do that.

types: [opened]
branches:
- main
Expand Down
Loading