ECLI-003: Buildkite bootstraps executable tools without repository-controlled integrity verification
@margaretjgu is already working on this.
Since Aug 6, 2026.
Assessment
This issue has not been assessed yet.
Description
Severity: Medium
Problem
The pre-command hook downloads the nvm installer from GitHub and pipes it directly to bash:
Although the URL pins the v0.39.7 tag, Git tags are mutable and can be moved or replaced. The downloaded content is not verified against a repository-controlled digest. Because nvm.sh is sourced into the current shell, a compromised installer could intercept the later vault invocation or access the agent's ambient Vault identity.
Three test scripts contain fallback nvm installers that fetch the current GitHub release without version pinning or integrity verification: run-cloud-tests.sh:15, run-es-tests.sh:29, run-kb-tests.sh:110. The ES and Kibana scripts also download unverified jq binaries: run-es-tests.sh:42, run-kb-tests.sh:123. See also ECLI-014 for whether PR builds receive a Vault-capable agent identity.
Fix
- Remove the duplicate nvm installation blocks from the test scripts and rely
on one hardened bootstrap implementation. - Pin the nvm installer to an immutable commit SHA rather than a mutable tag.
- Download to a temporary file, verify it against a SHA-256 value committed
to this repository, then execute. Do not pipe directly tobash.
Downloading the checksum from the same GitHub release is insufficient against
a compromised release — the expected hash must come from the repository or be
cryptographically signed by a separately trusted key. - Apply the same pattern to
jq: pin by version and platform, store the
expected SHA-256 in the repository, verify before installing, fail closed on
mismatch. - Restrict the Cloud Vault policy to the Cloud test job and ensure PR builds
cannot receive a Vault-capable agent identity (see ECLI-014).
Risk
Medium (low exploitability, high impact). Raise to High if PR builds use Vault-authorized agents or the credentials can affect production.
Copied from the security review in elastic/infosec#27626 (ECLI-003).
- Dominant language
- TypeScript
- Stars
- 43
- Forks
- 24
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 59
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from elastic/cli
-
cloud enhancement
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
comp/desktop P3 type/bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
NousResearch/hermes-agent#118866 ·
-
Browser Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
getsentry/sentry-javascript#24577 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agilepathway/label-checker#640 ·
-
Plugin stuck at "loading" on DSH 0.1.6-alpha.2 — turnTail list slot registration missing options.id Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
chrisparsons83/flexspotff#153 ·