To enhance security when dealing with pull requests from forks, it's recommended to use on: [pull_request_target] instead of on: [pull_request]. This prevents the code from forked repositories from being executed in the base repository's workflow, as pull_request_target runs workflows in the context of the base repository.
To enhance security when dealing with pull requests from forks, it's recommended to use on: [pull_request_target] instead of on: [pull_request]. This prevents the code from forked repositories from being executed in the base repository's workflow, as pull_request_target runs workflows in the context of the base repository.