StepSecurity
StepSecurity Adds Control to Flag Risky GitHub Fork Workflows
StepSecurity has introduced a control that checks whether GitHub organisations and public repositories allow workflows from forked pull requests to run without approval. The company rates the control Critical and says it scans hourly. It checks both an organisation’s default policy and the policy set by each public, non-archived repository, since repositories can override the organisation setting.
The least restrictive policy lets an established GitHub account fork a public repository, alter a workflow or a script it calls, and open a pull request that runs the changed code immediately. A later rejection does not undo that execution. GitHub limits secrets and `GITHUB_TOKEN` permissions for these `pull_request` workflows, but StepSecurity warns that code on self-hosted runners may reach credentials or internal systems available to the runner.
Such runners may not be wiped between jobs, allowing an attacker to leave a backdoor or move further into a network. The company also cites a 2023 PyTorch incident in which researchers used a merged typo fix to submit later pull requests that ran on self-hosted runners; the cited reports do not identify which approval option PyTorch had selected.
StepSecurity recommends **Require approval for all external contributors**. Its control flags only the least restrictive option; repositories requiring approval for first-time contributors pass, although the company says that policy can stop requiring approval after a single commit or pull request is merged. The control reports findings and links to GitHub settings but does not change them. It is available to StepSecurity Enterprise customers and requires the GitHub App to have **Administration: read** permission.
The company notes that `pull_request_target` workflows run regardless of this approval policy and are covered by a separate control.