GHSL-2026-199: Code execution in DataDog/trivy API Diff Check workflow
The API Diff Check workflow invokes a pull request-controlled local action in a privileged pullrequesttarget job. An external contributor can execute arbitrary code with a write-scoped GITHUBTOKEN and access the ORGREPOTOKEN secret.
Other sources
The API Diff Check workflow runs on pullrequesttarget, checks out a pull request’s merge ref, and then invokes the checkout-relative ./.github/actions/setup-go composite action. An external pull request author can modify that local action and execute arbitrary code in the privileged base-repository workflow. The job grants its GITHUBTOKEN pull-requests: write and issues: write permissions. The attacker-controlled code can steal the repository-level ORGREPOTOKEN secret before the later conditional step that explicitly references it.
— GitHub Security Lab
Affected Software
Event History
Frequently Asked Questions
Who can exploit this workflow weakness?
An external contributor who can open or influence a pull request can exploit it, because the affected job uses pull_request_target while invoking a pull request-controlled local action.
What access could an attacker gain through successful exploitation?
The attacker can execute arbitrary code with a write-scoped GITHUB_TOKEN and access to the ORG_REPO_TOKEN secret.
Is a repository affected only when maintainers run the workflow manually?
No. The issue is in the API Diff Check workflow's privileged pull_request_target job, which processes pull request-controlled action content.