T08 · Insecure Dependencies
- Location
SKILL.md:11- Finding
Unpinned Global Dependency Installation and Unreviewed Automatic Upgrade
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:11-18,SKILL.md:47-48,README.md:9-16,README.md:278-288,README.md:588-589
Vulnerability Type: Unpinned third-party dependency and unsafe upgrade workflow
Risk Level: MediumVulnerable Code
SKILL.md:11-18:markdown ## Installation ```bash npm install -g cairn-work cairn onboardcairn onboardcreates~/cairn/with auto-generated context files (AGENTS.mdand.cairn/planning.md) that agents read automatically.text `SKILL.md:47-48`: ```markdown - `cairn update-skill` — Refresh context files after CLI updates - `cairn upgrade` — Update CLI to latest versionREADME.md:9-16:markdown ## Setup ```bash npm install -g cairn-work cairn onboardThis creates a workspace and writes two context files your agent reads automatically:
text `README.md:278-288`: ```markdown ### `cairn update-skill` Refresh `AGENTS.md` and `.cairn/planning.md` with the latest templates (e.g., after a CLI update). ```bash cairn update-skillcairn upgradeCheck for a new CLI version and install it.
text `README.md:588-589`: ```bash cairn update-skill # Refresh templates after CLI update cairn upgrade # Update to latest CLI versionTechnical Analysis
The installation command does not specify an exact
cairn-workversion, integrity digest, lockfile, or reviewed release identifier. It installs the package globally, exposing npm installation lifecycle behavior and the resulting executable to the invoking user's filesystem permissions.The documented
cairn upgradeworkflow compounds this risk by replacing the installed executable with an unspecified latest release. The audited project contains only documentation and does not include the package's executable source or dependency manifest. Therefore, the code executed during package installation, onboarding ...[truncated 2102 chars]- Remediation
View remediation
Remediation Suggestions
-
Pin
cairn-workto an exact reviewed version rather than installing the current latest release:bash npm install --global --ignore-scripts cairn-work@<reviewed-exact-version>Only use
--ignore-scriptsif the package has been verified to operate without installation lifecycle scripts. -
Publish and verify the expected npm integrity digest or package checksum before installation. Document the package name, exact version, registry, and digest together.
-
Include the CLI source, dependency manifest, and lockfile in the auditable project, or link to an immutable source revision corresponding exactly to the installed package.
-
Prefer a project-local or isolated installation over a global installation. Run the CLI in a restricted environment with only the filesystem and network access necessary for workspace management.
-
Replace automatic latest-version upgrades with an explicit process that:
- Identifies the proposed version.
- Reviews release notes and source changes.
- Verifies provenance and integrity.
- Requires user approval before installation.
- Supports rollback to the prior reviewed version.
-
Document all files and network endpoints accessed by
onboard,update-skill, andupgrade. -
Validate generated
AGENTS.mdand.cairn/planning.mdcontent before allowing an agent to load it. Prevent generated templates from silently changing agent safety constraints or introducing commands unrelated to project management. -
Use npm provenance verification, registry allowlisting, and dependency scanning in the release and installation process.
-
