T09 · Insecure Skill Coding Practices
Warning
- Location
SKILL.md:61- Finding
npm One-Time Password Exposed Through Command-Line Arguments
- Content
View full analysis
" ``` ```bash npm publish --access public --tag beta --otp="" ``` ### Technical Analysis The documented publishing workflow instructs users or agents to substitute an npm one-time password directly into the `--otp` command-line argument. Although obtaining an OTP is legitimate for an authenticated npm publication, placing the value in a command exposes it to local observation channels such as: - Shell history files - Terminal or tmux logging - Command auditing and session-recording systems - Debug output or shell tracing - Process inspection while the command is running - Agent execution transcripts The related instruction at `SKILL.md:47` limits OTP retrieval to situations where npm requires it and therefore does not, by itself, exceed the publishing task's necessary privileges. No instruction sends the OTP to an unrelated service. The weakness is the insecure transfer of that credential from the password manager into a visible command-line argument. ### Attack Path 1. A release operator or agent initiates an npm publication that requires an OTP. 2. The OTP is retrieved through the referenced 1Password workflow. 3. The operator or agent replaces `` with the actual value in one of the documented commands. 4. The resulting command is captured through shell history, tmux logging, process monitoring, execution transcripts, or terminal-session recording. 5. An attacker with access to that local observation channel extracts the OTP before it expires. 6. If the attacker also has a usable npm authentication session or token, they may reuse the OTP to authorize a malicious publication or another protected npm operation during the OTP's validity window. ### Impact Assessment Succe ...[truncated 651 chars]- Remediation
View remediation
