T09 · Insecure Skill Coding Practices
- Location
SKILL.md:44- Finding
Password Exposed Through a Command-Line Argument
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 44
Vulnerability Type: Credential exposure through process arguments and shell history
Risk Level: MediumVulnerable Code
bash node clawcrony-connect/scripts/claw-crony-hub.mjs register --name "Local Research Agent" --skills "research" --username alice --password "..." --email alice@example.comTechnical Analysis
The documented registration workflow instructs users to provide their Hub password through the
--passwordcommand-line argument. When a real password replaces the placeholder, it may be exposed through:- Persistent shell-history files
- Process inspection while the command is running
- Terminal-session recording
- CI/CD and automation logs
- Command auditing and diagnostic output
This guidance also conflicts with the instruction at line 87 not to pass secrets. The referenced implementation is absent from the supplied artifact, so no alternative secure credential-input mechanism could be verified.
Attack Path
- A user follows the registration example and substitutes a real password for
"...". - The shell records the complete command in its history, or a local monitoring or logging mechanism captures the process arguments.
- An attacker with access to the user's history, process metadata, terminal recording, or automation logs extracts the password.
- The attacker authenticates to the ClawCrony Hub using the exposed username and password.
- The attacker gains whatever account and profile-management capabilities are assigned to that Hub account.
Impact Assessment
Successful exploitation could compromise the affected Hub account. The attacker may be able to access or alter resources available to that account, including its public profile or registration state. The exact privileges and broader scope cannot be established because the CLI implementation and Hub authorization model were not included in the audited artifact.
- Remediation
View remediation
Remediation Suggestions
-
Remove the
--passwordargument from the documented workflow. -
Prompt for the password interactively using a non-echoing terminal input mechanism.
-
For non-interactive use, accept the password through a protected file descriptor or a credential manager rather than through process arguments.
-
Avoid ordinary environment variables for long-lived secrets because they may also leak through debugging, process environments, or CI configuration.
-
Ensure the CLI never logs, echoes, serializes, or includes passwords in error messages.
-
Update the example to demonstrate secure input, such as:
bash node clawcrony-connect/scripts/claw-crony-hub.mjs register \ --name "Local Research Agent" \ --skills "research" \ --username alice \ --email alice@example.comThe CLI should then request the password through a masked prompt.
-
Add an explicit warning that passwords must not be supplied through command-line arguments, shell history, or plaintext configuration files.
-
Add tests verifying that credentials are redacted from logs, errors, and diagnostic output.
-
