T08 · Insecure Dependencies
- Location
references/ci-cd.md:72- Finding
Unpinned Third-Party Package Execution in CI/CD
- Content
View full analysis
Vulnerability Details
File Location:
references/ci-cd.md, lines 72-78
Vulnerability Type: Supply-chain exposure through unpinned executable packages
Risk Level: MediumVulnerable Code
bash npm ci npm run build npx @capawesome/cli login --token $CAPAWESOME_TOKEN npx @capawesome/cli apps:bundles:create --app-id $APP_ID --path dist/Technical Analysis
The instructions execute
@capawesome/clithroughnpxwithout specifying an exact audited version or requiring an already installed, lockfile-controlled copy. If the package is absent locally,npxmay retrieve and execute the version currently resolved from the configured package registry.This creates a supply-chain boundary in a sensitive CI environment. A compromised package release, registry account, dependency tree, or package-resolution configuration could cause arbitrary package or lifecycle code to execute. The same CI job is expected to have access to
CAPAWESOME_TOKEN, application identifiers, build outputs, and potentially mobile signing material.Related unpinned executable guidance also appears at
references/ci-cd.md:111-114:bash npx @trapezedev/configure run trapeze.yaml --diffAttack Path
- An attacker compromises the publisher, registry entry, or dependency chain of an unpinned package.
- A malicious package version is published or returned by the configured package registry.
- The CI runner invokes the package through
npxwithout enforcing an audited version. npxdownloads and executes the malicious package in the CI job.- The package reads available environment variables, build outputs, source files, signing assets, or CI credentials.
- The attacker exfiltrates those assets or modifies the generated mobile application or deployment bundle.
Impact Assessment
Successful exploitation provides code execution with the privileges of the developer account or CI runner. In CI, t ...[truncated 371 chars]
- Remediation
View remediation
Remediation Suggestions
-
Add required CLI packages to
devDependenciesusing exact, reviewed versions. -
Commit the package lockfile and install dependencies using
npm ci. -
Invoke only the lockfile-installed binary, such as:
bash npx --no-install @capawesome/cli login npx --no-install @capawesome/cli apps:bundles:create --app-id "$APP_ID" --path dist/ npx --no-install @trapezedev/configure run trapeze.yaml --diff -
Use automated dependency review, registry allowlists, integrity checks, and package provenance verification.
-
Isolate build jobs from publishing jobs and expose deployment credentials only to the job that requires them.
-
Use short-lived, least-privileged CI credentials and restrict outbound network access where practical.
-
