GHSL-2025-084: Untrusted code in Github Actions workflow may lead to secret leak in int128/datadog-actions-metrics
A GitHub Actions workflow checked out untrusted code from a pull request and then ran commands that executed that code, with access to a secret. An attacker could create a pull request to trigger the workflow and potentially leak the DATADOG_API_KEY secret.
The int128/datadog-actions-metrics project is vulnerable in its latest main branch due to improper validation in a GitHub Actions workflow, where checking out untrusted code could potentially lead to secret leakage (GHSL-2025-084).
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The workflow used actions/checkout to fetch code from an untrusted pull request and then executed commands (pnpm install, pnpm build, and a local action) that ran that code in a context with access to a secret.
Impact
This issue may lead to code execution in the high privileged context and exfiltration of the DATADOG_API_KEY secret.
What the attacker needed
Ability to create a pull request
The fix
The issue was fixed by the maintainer.
How it was found
- Create a pull request that triggers the workflow .github/workflows/ts.yaml.
- The workflow_run event triggers .github/workflows/e2e-target.yaml.
- The workflow checks out the pull request's head commit.
- The workflow runs pnpm i and pnpm build, executing attacker-controlled code.
- The workflow runs a local action from the checked-out repository, executing attacker-controlled code.
- The attacker-controlled code can access and exfiltrate the DATADOG_API_KEY secret.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A GitHub Actions workflow is an automated script that runs when something happens, like a pull request. This workflow downloaded code from a pull request and then ran it, but it also had access to a secret key. That means someone could sneak in malicious code and steal the key.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.