I have an origin repo in GitHub and I have created a local fork that I am developing on. I have a GitHub Action that runs a Bandit security check, but when I push changes and create a Pull request from a branch in my fork, the Bandit test runs on the code that is currently in the origin repo, not on the new code in the PR.
How can I run the GitHub Action Workflow on the code that is inside the Pull Request?
FYI: here is the "on" statement currently in the yml file:
name: Security scan
on:
push:
branches:
- master
pull_request_target:
branches: [main, dev]