Back to skill

Security audit

Ticktick Cli

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent TickTick command-line skill whose OAuth and task-write behavior is disclosed, though users should treat its stored credentials as sensitive.

Install only if you are comfortable granting the CLI TickTick tasks:read and tasks:write access. Avoid entering real client secrets in shared terminals or logs, protect or exclude ~/.clawdbot/credentials/ticktick-cli/config.json from backups/sync, and review task IDs carefully before using batch-abandon because it changes multiple tasks without a separate confirmation step.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/ticktick.ts:29
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") ``` The documented invocation explicitly places the secret on the command line: ```bash bun run scripts/ticktick.ts auth --client-id YOUR_CLIENT_ID --client-secret YOUR_CLIENT_SECRET ``` ### Technical Analysis The CLI accepts the OAuth client secret as a command-line option. Command-line arguments are not an appropriate secret-input channel because they may be retained in shell history, terminal session logs, automation logs, audit telemetry, or process-monitoring systems. Depending on operating-system controls, process arguments may also be observable by other local processes while authentication is running. This exposure is not required for the Skill's declared TickTick functionality. The secret can instead be collected through protected interactive input or a system credential manager. ### Attack Path 1. A user follows the documented authentication command and supplies the real client secret through `--client-secret`. 2. The shell records the complete command in its history or an automation platform records it in execution logs. 3. A local attacker, support process, backup collector, or user with access to those records retrieves the secret. 4. The attacker uses the exposed OAuth application credentials in attacks against the application's OAuth flow. The practical impact depends on TickTick's OAuth controls and whether the attacker can also obt ...[truncated 529 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/auth.ts:46
Finding

OAuth Credentials and Reusable Tokens Stored in Plaintext

Content
View full analysis
{ await ensureConfigDir(); await writeFile(CONFIG_FILE, JSON.stringify(config, null, 2), { mode: 0o600 }); await chmod(CONFIG_DIR, 0o700).catch(() => {}); await chmod(CONFIG_FILE, 0o600).catch(() => {}); } ``` The persisted configuration contains all of the following sensitive values: ```ts export interface TickTickConfig { clientId: string; clientSecret: string; accessToken?: string; refreshToken?: string; tokenExpiry?: number; redirectUri?: string; } ``` Logout removes tokens but intentionally preserves the OAuth client credentials: ```ts export async function logout(): Promise { const config = await loadConfig(); if (config) { delete config.accessToken; delete config.refreshToken; delete config.tokenExpiry; await saveConfig(config); console.log("Logged out successfully. Credentials preserved."); } else { console.log("No configuration found."); } } ``` ### Technical Analysis The application serializes the client secret, access token, and refresh token directly into a JSON file. The use of directory mode `0700` and file mode `0600` is a meaningful mitigation against access by other local users. However, these permissions do not protect the credentials from malware, compromised processes, backups, debugging tools, or attackers operating under the same user account. A refresh token is particularly sensitive because it may permit the acquisition of new access tokens aft ...[truncated 1576 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
package.json:11
Finding

Non-Reproducible Dependency Resolution Due to Version Ranges and Missing Lockfile

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The documentation claims a bounded TickTick-management purpose, but it also introduces sensitive OAuth handling, localhost callback behavior, and plaintext credential storage that are not fully surfaced in the top-level description. This mismatch can mislead users or agents about the true security-sensitive behavior of the skill, causing them to invoke it without understanding token capture and local secret persistence risks.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/auth.ts (reported line 63)May include surrounding context.

ts
if (!config.accessToken) {
    throw new Error(
      "No access token found. Run 'ticktick auth' to authenticate."
    );
  }

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill declares shell and network-capable behavior but does not define any explicit tool scope such as allowed-tools or permissions. In an agent setting, this ambiguity can let the runtime grant broader capabilities than users expect, increasing the risk of unintended command execution or outbound network access during task handling.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
93% confidence
Finding

The skill instructs users to persist OAuth client credentials, access tokens, and refresh tokens in a local config file, explicitly noting plaintext storage. If the host is compromised, backups are exposed, or file permissions are misapplied, an attacker can reuse these tokens to access or manipulate the user's TickTick data without re-authentication.

Content

Scanner excerpt · SKILL.md (reported line 15)May include surrounding context.

md
### 1. Register a TickTick Developer App

1. Go to [TickTick Developer Center](https://developer.ticktick.com/manage)
2. Create a new application
3. Set the redirect URI to `http://localhost:8080`
4. Note your `Client ID` and `Client Secret`

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 240)May include surrounding context.

md
import { getValidToken } from "./auth";

const API_BASE = "https://api.ticktick.com/open/v1";

export interface Project {
  id: string;

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/api.ts (reported line 3)May include surrounding context.

ts
import { getValidToken } from "./auth";

const API_BASE = "https://api.ticktick.com/open/v1";

export interface Project {
  id: string;

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/auth.ts (reported line 13)May include surrounding context.

ts
import { getValidToken } from "./auth";

const API_BASE = "https://api.ticktick.com/open/v1";

export interface Project {
  id: string;

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code performs a destructive state-changing operation by marking tasks as abandoned via a batch API call. Although results are logged afterward, there is no confirmation prompt or explicit user-facing warning before the irreversible action executes.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
94% confidence
Finding

The dependency on commander uses a caret range, which allows newer minor/patch releases to be installed without explicit review. This creates supply-chain risk and can lead to non-reproducible builds if an upstream release becomes compromised or introduces unsafe behavior.

Content

Scanner excerpt · package.json (reported line 13)May include surrounding context.

json
"ticktick": "./scripts/ticktick.ts"
  },
  "dependencies": {
    "commander": "^12.0.0",
    "open": "^10.0.0"
  },
  "devDependencies": {

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

The open dependency is not pinned and is fetched using a caret range, so different installs may resolve to different upstream releases. This is more dangerous here because open interacts with the local system to launch URLs/apps, and the package also has a known command-injection advisory in some versions, making version ambiguity a meaningful security risk.

Content

Scanner excerpt · package.json (reported line 14)May include surrounding context.

json
},
  "dependencies": {
    "commander": "^12.0.0",
    "open": "^10.0.0"
  },
  "devDependencies": {
    "@types/bun": "^1.0.0"

Unverifiable Dependency: open has 1 known advisory(ies) (GHSA-28xh-wpgr-7fm8 (Command Injection in open)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The manifest includes open, which has a known command-injection advisory in some versions, but the package.json does not pin the version, so it is impossible to verify whether the installed dependency is vulnerable. In a CLI skill that is likely to open OAuth URLs or user-influenced links on the local machine, unresolved exposure to a command-injection flaw is materially risky.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
83% confidence
Finding

The devDependency @types/bun is also unpinned, allowing unreviewed upstream changes into the development environment. While this is less severe than a runtime dependency, it still weakens build reproducibility and can expose developers or CI pipelines to supply-chain issues.

Content

Scanner excerpt · package.json (reported line 17)May include surrounding context.

json
"open": "^10.0.0"
  },
  "devDependencies": {
    "@types/bun": "^1.0.0"
  }
}

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code explicitly formats dates with "en-US", which imposes a specific locale regardless of the user's settings or preferences. This matches the policy category for language/locale constraints because there is no opt-in, fallback to system locale, or documented region-specific reason.

Content

No source excerpt is available for this finding.