T09 · Insecure Skill Coding Practices
- Location
ticktick/cli.py:67- Finding
OAuth Client Secret Exposed Through Command-Line Arguments
- Content
View full analysis
Vulnerability Details
File Location:
ticktick/cli.py:29-31,ticktick/cli.py:67-68,SKILL.md:53-59
Vulnerability Type: Sensitive information exposure through process arguments
Risk Level: MediumVulnerable Code
python if args.client_id and args.client_secret: setup_credentials(args.client_id, args.client_secret)python auth_p.add_argument("--client-id", dest="client_id", metavar="<id>", help="TickTick OAuth client ID") auth_p.add_argument("--client-secret", dest="client_secret", metavar="<secret>", help="TickTick OAuth client secret")The documented workflow explicitly instructs users to supply the secret in the command line:
bash python -m ticktick.cli auth --client-id <YOUR_CLIENT_ID> --client-secret <YOUR_CLIENT_SECRET> python -m ticktick.cli auth --client-id <ID> --client-secret <SECRET> --manualTechnical Analysis
Command-line arguments are not an appropriate transport for confidential values. Depending on the operating system and environment, arguments may be exposed through:
- Shell history files.
- Process-listing tools while the command is running.
- Process accounting or endpoint telemetry.
- Terminal session recording.
- Automation logs, CI output, or command wrappers.
- Agent execution traces that retain the complete command.
The client secret is legitimately required for this OAuth client, but accepting it exclusively through an ordinary
argparseoption unnecessarily expands its exposure. The issue is particularly relevant for an Agent Skill because command invocations may be logged or retained outside the CLI itself.Attack Path
- A user or Agent follows the authentication instructions in
SKILL.md. - The OAuth client secret is included literally in the command's argument vector.
- The command is retained in shell history, execution telemetry, process accounting, or an Agent log.
...[truncated 908 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace the ordinary
--client-secretargument with an interactive hidden prompt usinggetpass.getpass(). - If noninteractive operation is required, accept the secret through a protected file descriptor, an operating-system keyring, or a narrowly scoped secret-manager integration.
- Avoid environment variables as the default because they may also be exposed through process environments, crash reports, or automation logs.
- If backward compatibility requires retaining
--client-secret, mark it as deprecated and display a warning that it may expose the value through process metadata and command history. - Update
README.mdandSKILL.mdso examples never place real secrets directly in command lines. - Advise existing users to remove commands containing secrets from shell history and rotate secrets if they may have been logged.
- Ensure Agent integrations redact secret-bearing arguments from invocation logs and traces.
- Replace the ordinary
