T09 · Insecure Skill Coding Practices
- Location
src/papago_translate/cli.py:18- Finding
Client Secret Exposure Through Command-Line Arguments
- Content
View full analysis
Vulnerability Details
File Location:
src/papago_translate/cli.py:18
Vulnerability Type: Sensitive credential exposure through process arguments
Risk Level: MediumVulnerable Code
python p.add_argument("--client-secret", dest="client_secret", default=None, help="Override NAVER_CLIENT_SECRET")The insecure credential-passing mechanism is also promoted in
README.md:75and described as supported inSKILL.md:79.Technical Analysis
The CLI accepts a Naver API client secret directly through the
--client-secretargument. Command-line arguments are not an appropriate channel for secrets because they can be retained or exposed through:- Shell command history
- Process inspection tools and process metadata
/procinterfaces on applicable operating systems- Endpoint monitoring and process-execution telemetry
- CI/CD logs, diagnostic output, or automation wrappers that record invoked commands
The application does not intentionally log the argument, including in verbose mode. However, that does not prevent external operating-system or monitoring facilities from capturing it before or during execution.
Attack Path
- A user follows the documented configuration option and invokes the CLI with
--client-secret. - The secret becomes part of the process argument vector and may also be saved in shell history.
- Another local account with sufficient process-observation access, an endpoint-monitoring service, or a log collector records the command line.
- The observer extracts the Naver client secret and the associated client ID if it was supplied similarly or otherwise available.
- The exposed credentials are used to submit unauthorized requests to the Naver Papago API until they are revoked or restricted.
This path requires access to command histories, process metadata, or execution telemetry; the code does not transmit the credential to an undeclared third party.
Impa
...[truncated 613 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the
--client-secretcommand-line option and prefer the existingNAVER_CLIENT_SECRETenvironment-variable mechanism. - For interactive use, support secure prompting with Python's
getpass.getpass()so the secret is not echoed or placed in the process argument vector. - For automation, optionally support reading the secret from a protected file descriptor or a credential file whose permissions are validated before use.
- Remove recommendations to pass secrets through flags from
README.mdandSKILL.md. - Add a migration warning if the option must temporarily remain for compatibility, explaining that command-line values may be visible to other users and monitoring systems.
- Recommend immediate credential rotation if a real secret has previously been supplied through command-line arguments or committed to automation logs.
- Remove the
