T09 · Insecure Skill Coding Practices
- Location
scripts/call_bobine.mjs:5- Finding
Ed25519 Private Key Exposed Through Command-Line Arguments
- Content
View full analysis
Vulnerability Details
File Location:
scripts/call_bobine.mjs:5, 26-34; related command interface inscripts/lib/cli.mjs:49-54
Vulnerability Type: Sensitive credential exposure through process arguments
Risk Level: MediumVulnerable Code:
js const options = parseOptions(process.argv.slice(2))js const result = options["auth-module"] ? await signEd25519Call( options["auth-module"], options.module, options.method, params, options.sigkey, options.pubkey, callOptions, ) : await execute(options.module, options.method, params, callOptions)The documented command interface explicitly accepts the private key as a command-line value:
js [--auth-module <ed25519-module>] \ [--sigkey <private-ed25519-pkcs8-hex>] \ [--pubkey <public-ed25519-spki-hex>] \Technical Analysis
The application reads the complete Ed25519 PKCS#8 private key from
process.argvthrough the--sigkeyoption. Although the implementation uses the key locally and does not place it in the HTTP request, command-line arguments are not an appropriate secret transport mechanism.Depending on the operating system and execution environment, command lines can be exposed through process inspection facilities, process-monitoring software, audit systems, CI/CD job logs, shell tracing, terminal recordings, command history, or diagnostic output. Any component that records the invocation can therefore retain the complete reusable signing key.
This issue is especially significant because the input is a long-lived private key rather than a single-use signature or token. Possession of the private key allows an attacker to create new signatures independently of the original process.
Attack Path
- A user follows the supported signed-call workflow and invokes
call_bobine.mjswith the private key supplied through--sigkey.
...[truncated 1334 chars]
- A user follows the supported signed-call workflow and invokes
- Remediation
View remediation
Remediation Suggestions
- Remove support for passing private keys directly through
--sigkey. - Prefer a
--sigkey-fileoption that reads the key from a permission-restricted file. Verify that the file is a regular file and, where supported, reject permissions that allow access by other users. - Alternatively, read the key from standard input or a dedicated secret-manager integration. Avoid prompting through ordinary echoed terminal input.
- If environment-variable support is added, clearly document that environment variables may also be visible to process supervisors, crash reporters, or deployment tooling.
- Ensure that validation errors, debug logs, telemetry, and exception handlers never include the private-key value.
- Update all examples and usage text so users are not encouraged to place private keys in shell history.
- Recommend rotation or revocation of keys that have already been used through command-line arguments in shared, monitored, or logged environments.
- Clear references to sensitive buffers when practical after signing, while recognizing that JavaScript does not guarantee complete memory erasure.
- Remove support for passing private keys directly through
