T08 · Insecure Dependencies
- Location
scripts/lightning/add-lightning.sh:7- Finding
Unpinned npm Dependency Executed with Wallet Credentials
- Content
View full analysis
Vulnerability Details
File Location: All shell wrappers under
scripts/lightning/; representative instance:scripts/lightning/add-lightning.sh:7-9
Vulnerability Type: Unpinned third-party runtime dependency
Risk Level: HighVulnerable Code
bash source ~/.archon.env npx @didcid/keymaster add-lightning "$@"Equivalent unpinned
npx @didcid/keymasterinvocations appear in:scripts/lightning/add-lightning.sh:7-9scripts/lightning/lightning-balance.sh:7-9scripts/lightning/lightning-check.sh:8-10scripts/lightning/lightning-decode.sh:7-9scripts/lightning/lightning-invoice.sh:7-9scripts/lightning/lightning-pay.sh:8-15scripts/lightning/lightning-payments.sh:7-9scripts/lightning/lightning-zap.sh:8-15scripts/lightning/publish-lightning.sh:7-9scripts/lightning/unpublish-lightning.sh:7-9
The documentation also recommends direct unpinned execution at
SKILL.md:407-421.Technical Analysis
Every executable wrapper loads
~/.archon.envand then invokes@didcid/keymasterthroughnpxwithout specifying an exact package version. The project contains no package manifest, committed lockfile, integrity constraint, or requirement that an audited local installation be used.Depending on the local npm and
npxstate, this can cause the current registry release to be downloaded and executed. Consequently, the effective implementation may change after this skill has been reviewed. The downloaded process inherits the wrapper's environment, including sensitive variables documented as:ARCHON_WALLET_PATHARCHON_PASSPHRASEARCHON_GATEKEEPER_URL
The dependency also receives authority to perform Lightning wallet and payment operations. Although no malicious behavior was found in the reviewed repository, the externally supplied runtime implementation is outside the audited code and remains mutable.
Attack Path
- An attacke ...[truncated 1688 chars]
- Remediation
View remediation
Remediation Suggestions
-
Add a project package manifest and pin
@didcid/keymasterto a reviewed exact version rather than a range. -
Commit the generated lockfile and install dependencies with
npm ci, preserving npm integrity metadata. -
Invoke only the local audited executable, such as:
bash npx --no-install @didcid/keymaster add-lightning "$@"Alternatively, call the package binary directly from
node_modules/.bin. -
Separate dependency installation from wallet operations. Do not permit package download or installation lifecycle scripts to run after wallet credentials have been loaded.
-
Verify package provenance and signatures where supported, and review dependency updates before changing the pinned version.
-
Use automated dependency scanning and lockfile-diff review in continuous integration.
-
Minimize credential exposure by supplying sensitive variables only to the already-installed runtime process and by restricting wallet-file permissions.
-
Apply the same remediation to every wrapper and to the direct
npxcommands documented inSKILL.md.
-
