Back to skill

Security audit

gtasks-cli

Security checks for vulnerabilities and agentic risk

Overview

This Google Tasks skill is mostly purpose-aligned, but it includes unsafe command guidance that could expose credentials or run unintended shell commands.

Install only if you trust the gtasks CLI and are comfortable granting it Google Tasks access. Avoid commands that print GTASKS_CLIENT_SECRET, review any delete operations carefully, and do not copy the advanced bash -c parallel-export example; use safer scripts that pass task-list names as data.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
references/ADVANCED.md:139
Finding

Command Injection Through Untrusted Task-List Names

Content
View full analysis
"$(echo {} | tr " " "_").json"' ``` ### Technical Analysis The command parses task-list names and substitutes each name directly into a shell program passed to `bash -c`. Quoting the placeholder as `"{}"` does not make this safe because `xargs` performs textual substitution before the resulting command string is interpreted by Bash. If a task-list name contains shell syntax such as command substitution, backticks, quotation marks, or other metacharacters, that syntax can alter the generated shell program. For example, a list name containing `$(malicious-command)` can cause Bash to execute that command while evaluating the interpolated argument or output filename. Task-list names originate from Google Tasks data and must be treated as untrusted data rather than executable shell source. ### Attack Path 1. An attacker gains a means to influence a task-list title consumed by the user, or convinces the user to create/import a specially crafted title. 2. The title includes shell syntax such as `$(malicious-command)`. 3. The user or Agent runs the documented parallel-export command. 4. `xargs` substitutes the crafted title into the text passed to `bash -c`. 5. Bash parses the inserted syntax and executes the attacker-controlled command with the privileges of the user running the Skill. ### Impact Assessment Successful exploitation permits arbitrary command execution under the current local user account. The attacker could potentially: - Read files accessible to the user, including `~/.gtasks/token.json` and other credentials. - Modify or delete user-owned files. - Access Google Tasks through the authenticated CLI session. ...[truncated 250 chars]
Remediation
View remediation
"${safe_name}.json" done ``` Additional hardening should include: 1. Prefer structured output from `gtasks tasklists view`, if supported, instead of parsing human-readable output. 2. Reject empty names and reserved path components such as `.` and `..`. 3. Ensure the sanitized filename cannot contain `/`, path traversal sequences, control characters, or leading option characters. 4. Detect filename collisions after sanitization rather than silently overwriting an existing export. 5. If parallel processing is required, pass values as positional arguments or through a structured scripting language; never splice them into executable shell text. 6. Store exports in a dedicated directory created with restrictive permissions. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
references/QUICK-REFERENCE.md:19
Finding

OAuth Client Secret Disclosed Through Terminal Output

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
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (11)

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
---
name: gtasks-cli
description: Manage Google Tasks from the command line - view, create, update, delete tasks and task lists. Use when the user asks to interact with Google Tasks, manage to-do items, create task lists, mark tasks complete, or check their Google Tasks.
homepage: https://github.com/BRO3886/gtasks
license: MIT
compatibility: Requires gtasks CLI tool to be installed and authenticated

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill description uses very broad activation phrases like managing to-do items or checking tasks, which can cause the skill to trigger on common productivity requests beyond an explicitly scoped Google Tasks intent. In an agent ecosystem, this increases the chance of overbroad invocation and unintended access to a user's authenticated task data or unintended task mutations.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
**How to get credentials:**
1. Go to [Google Cloud Console](https://console.cloud.google.com/)
2. Create a new project or select an existing one
3. Enable the Google Tasks API
4. Create OAuth2 credentials (Application type: "Desktop app")
5. Note the authorized redirect URIs that gtasks uses:

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

Recommended: store in a file with restricted permissions

echo 'export GTASKS_CLIENT_ID="your-client-id"' >> ~/.gtasks_env echo 'export GTASKS_CLIENT_SECRET="your-client-secret"' >> ~/.gtasks_env chmod 600 ~/.gtasks_env

Source it from your shell profile

echo 'source ~/.gtasks_env' >> ~/.zshrc

text

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/ADVANCED.md (reported line 239)May include surrounding context.

Recommended: store in a file with restricted permissions

echo 'export GTASKS_CLIENT_ID="your-client-id"' >> ~/.gtasks_env echo 'export GTASKS_CLIENT_SECRET="your-client-secret"' >> ~/.gtasks_env chmod 600 ~/.gtasks_env

Source it from your shell profile

echo 'source ~/.gtasks_env' >> ~/.zshrc

text

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

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

gtasks login

text

This will open a browser for OAuth2 authentication. The token is stored in `~/.gtasks/token.json` with 0600 permissions. Verify with `ls -la ~/.gtasks/token.json`. If you no longer need access, run `gtasks logout` to revoke and delete the token.

## Core Concepts

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · references/ADVANCED.md (reported line 223)May include surrounding context.

gtasks login

text

This will open a browser for OAuth2 authentication. The token is stored in `~/.gtasks/token.json` with 0600 permissions. Verify with `ls -la ~/.gtasks/token.json`. If you no longer need access, run `gtasks logout` to revoke and delete the token.

## Core Concepts

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

Common Workflows

Quick Task Creation

When a user says "add a task to my work list":

bash
gtasks tasks add -l "Work" -t "Task title"

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/ADVANCED.md (reported line 183)May include surrounding context.

Proceed with operations

gtasks tasks add -l "Work" -t "New Task" || { echo "Error: Failed to create task" >&2 exit 1 }

text

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The testing example includes a cleanup command that removes a task list using gtasks tasklists rm <<< "1" without an explicit warning that it is destructive and depends on positional list numbering. In documentation for a CLI that manages real user data, readers may copy this pattern into live environments and accidentally delete the wrong list if list order changes or if they are not operating on an isolated test account.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The quick reference explicitly instructs users to print GTASKS_CLIENT_ID and GTASKS_CLIENT_SECRET to the terminal. While this is framed as troubleshooting, it can expose secrets on-screen, into terminal scrollback, screen recordings, shared sessions, or shell logging systems, increasing the chance of credential disclosure.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.