T09 · Insecure Skill Coding Practices
- Location
scripts/ticktick.ts:28- Finding
OAuth Client Secret Exposed Through Command-Line Arguments
- Content
View full analysis
", "TickTick OAuth client ID") .option("--client-secret ", "TickTick OAuth client secret") .option("--manual", "Manual auth flow for headless servers (paste redirect URL)") .option("--logout", "Clear authentication tokens") .option("--status", "Check authentication status") .action(async (options) => { // ... if (options.clientId && options.clientSecret) { await setupCredentials(options.clientId, options.clientSecret); } ``` The documented invocation directly places the secret on the command line: ```bash # Set credentials and start OAuth flow bun run scripts/ticktick.ts auth --client-id YOUR_CLIENT_ID --client-secret YOUR_CLIENT_SECRET ``` ### Technical Analysis The CLI requires the OAuth client secret to be supplied as an ordinary command-line argument. Depending on the operating system and execution environment, command-line arguments may be exposed through: - Shell history files. - Process inspection interfaces and tools. - Process accounting or endpoint monitoring. - CI/CD command logs. - Terminal recording and diagnostic collection. - Agent execution transcripts. Although the client secret does not independently grant access to the user's TickTick account, it is sensitive OAuth application material. Its disclosure weakens the OAuth client authentication boundary and can contribute to abuse when combined with intercepted authorization codes, refresh tokens, or other credentials. Accepting the secret in this manner is unnecessary because it can instead be collected through non-echoing interactive input or a protected file descriptor. ### Attack Path 1. A user follows the documented setup command and supplies ...[truncated 990 chars]- Remediation
View remediation
