Skip to content

Conversation

nirinchev
Copy link
Collaborator

Proposed changes

Dependabot doesn't have access to repo secrets, which is why we must use pull_request_target event trigger.

@Copilot Copilot AI review requested due to automatic review settings August 4, 2025 10:54
@nirinchev nirinchev requested a review from a team as a code owner August 4, 2025 10:54
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Updates the GitHub workflow trigger for Dependabot PRs from pull_request to pull_request_target to enable access to repository secrets that Dependabot requires.

  • Changes workflow event trigger to allow Dependabot access to repository secrets
  • Maintains the same event types and branch filtering configuration

name: Dependabot PR
on:
pull_request:
pull_request_target:
Copy link

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.

@nirinchev nirinchev merged commit 6504d2b into main Aug 4, 2025
17 checks passed
@nirinchev nirinchev deleted the ni/dependabot branch August 4, 2025 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant