T09 · Insecure Skill Coding Practices
- Location
scripts/sms4a_api.py:63- Finding
Credentials May Be Exposed Through Command-Line Password Arguments
- Content
View full analysis
Vulnerability Details
File Location:
scripts/sms4a_api.py, lines 63–65
Vulnerability Type: Credential exposure through command-line arguments
Risk Level: Mediumpython parser.add_argument("--username", help="SMS4A username") parser.add_argument("--password", help="SMS4A password")Technical Analysis
The helper accepts the SMS4A password directly through the
--passwordcommand-line option. Command-line arguments are not an appropriate secret transport mechanism because they may be exposed through:- Shell history files
- Process inspection tools and operating-system process interfaces
- Terminal session recording
- Agent execution logs or telemetry
- Job schedulers and automation logs
- Diagnostic output that records invoked commands
The password is subsequently used to construct the HTTP Basic Authentication header. Base64 encoding at
scripts/sms4a_api.py:322–323is required by Basic Authentication and is not encryption:python def build_auth_header(username: str, password: str) -> str: token = base64.b64encode(f"{username}:{password}".encode("utf-8")).decode("ascii") return f"Basic {token}"The audit found that this header is sent only over HTTPS to fixed Retarus endpoints and is not written to standard output. Therefore, the Base64 operation is not a covert exfiltration channel. The vulnerability is specifically the optional command-line credential input.
Attack Path
- An operator or Agent invokes the helper with
--password <secret>. - The complete command is retained in shell history, execution telemetry, a process listing, or an automation log.
- A local user, monitoring process, log reader, or other party with access to that data obtains the plaintext password.
- The attacker combines the password with the corresponding username and authenticates to the Retarus SMS4A service.
- Subject to the compromised account's server-side perm ...[truncated 984 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the
--passwordcommand-line option from normal operation. - Continue supporting secret-store-backed environment injection and permission-restricted secret files.
- If interactive use is required, obtain the password with Python's
getpass.getpass()so it is not echoed or included in process arguments. - Require secret files to be regular files owned by the expected user and reject files with overly permissive modes where supported.
- Avoid including credential values in logs, exceptions, dry-run output, or telemetry.
- If backward compatibility requires retaining
--password, mark it as unsafe, emit a prominent warning, and prohibit its use in Agent-managed or logged environments. - Update
SKILL.mdto recommend only environment injection, an approved secret store, or a protected secret file rather than presenting command-line passwords as a supported testing method.
- Remove the
