Skip to content
Open
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
4 changes: 3 additions & 1 deletion .github/workflows/dependabot-constraintlayout-check.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: Dependabot POS Reminder

on:
pull_request:
pull_request_target:
Copy link

Copilot AI Sep 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 with Dependabot creates a security risk as it runs with write permissions in the context of the target repository. Consider adding explicit checks to verify the PR author is dependabot[bot] before any sensitive operations, or explore using pull_request with a GitHub token that has appropriate permissions.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this is indeed it @malinajirka and we could use something like @wzieba did here: #14556

  1. Adding the permission at the top level instead:
permissions:
  pull-requests: write
  1. Using the GH_TOKEN environmental variable:
    env:
      PR_URL: ${{ github.event.pull_request.html_url }}
      GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  1. And running the step with
      - name: Xyz
        ...
        with:
          github-token: "${{ secrets.GITHUB_TOKEN }}"

Then keep pull_request as is for now, then test it, wdyt? 🤔

types: [opened, reopened]

jobs:
add-pos-reminder:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
permissions:
pull-requests: write

steps:
# Check if PR contains the constraintlayout dependency
Expand Down
Loading