Back to skill

Security audit

Glancely

Security checks for vulnerabilities and agentic risk

Overview

This tracker skill is mostly purpose-aligned, but it needs Review because it can run discovered local component code, create persistent agent reminders, and handle broad Google Calendar credentials with limited safeguards.

Install only if you are comfortable with a local tracker framework that modifies ~/.glancely, may add OpenClaw cron jobs, and can access Google Calendar for diary logging. Treat any component under ~/.glancely/components as executable code, review cron notification text before registering it, and revoke/remove Google OAuth tokens if you stop using the diary feature.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (4)

T09 · Insecure Skill Coding Practices

Warning
Location
glancely/core/auth/google_oauth.py:36
Finding

Google OAuth Refresh Tokens Are Stored Without Explicitly Restrictive Permissions

Content
View full analysis
Credentials: CONFIG_DIR.mkdir(parents=True, exist_ok=True) creds: Credentials | None = None if TOKEN_PATH.is_file(): creds = Credentials.from_authorized_user_file(str(TOKEN_PATH), SCOPES) if creds and creds.valid: return creds if creds and creds.expired and creds.refresh_token: creds.refresh(Request()) TOKEN_PATH.write_text(creds.to_json(), encoding="utf-8") return creds if not CREDENTIALS_PATH.is_file(): raise AuthSetupError( f"Missing OAuth client at {CREDENTIALS_PATH}.\n" f" 1. Go to https://console.cloud.google.com/apis/credentials\n" f" 2. Create OAuth client ID → Desktop app\n" f" 3. Download the JSON, save as {CREDENTIALS_PATH}\n" f" 4. Re-run install.sh (or this command)." ) flow = InstalledAppFlow.from_client_secrets_file(str(CREDENTIALS_PATH), SCOPES) creds = flow.run_local_server(port=0, open_browser=True, prompt="consent") TOKEN_PATH.write_text(creds.to_json(), encoding="utf-8") return creds ``` ### Technical Analysis The OAuth token, including its reusable refresh token, is written with `Path.write_text()` without explicitly setting the file mode. The resulting permissions depend on the process umask. The containing directory is also created without an explicit restrictive mode. On systems with an unusually permissive umask, or where the configuration directory already has permissive permissions, another local account may be able to read `~/.glancely/token.json`. The same concern applies to the user-supplied OAuth client-secret file, whose permissions are not validated before use. The token uses a Google Calendar authorization scope and can be r ...[truncated 1043 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
glancely/dashboard/build.py:32
Finding

Dashboard Generation Executes Discovered Component Code With the Full Parent Environment

Content
View full analysis
dict: if not component.stats_script.is_file(): return {"status": "error", "summary": {"error": "missing scripts/stats.py"}, "rows": []} try: out = subprocess.check_output( [sys.executable, str(component.stats_script)], cwd=REPO_ROOT, env={**os.environ, "PYTHONPATH": str(REPO_ROOT)}, timeout=30, stderr=subprocess.PIPE, ) ``` Components are automatically discovered from the user component directory: ```python for root in roots: if not root.is_dir(): continue for child in sorted(p for p in root.iterdir() if p.is_dir()): comp = load_component(child) if comp is None: continue if comp.name == "scaffold_component": continue if panel_only and not comp.panel_enabled: continue if comp.name in seen: continue seen.add(comp.name) components.append(comp) ``` ### Technical Analysis Any directory under the configured component root that contains a valid `component.toml` is treated as a component. During dashboard generation, its `scripts/stats.py` is executed as Python code. The subprocess is not a security sandbox. It runs with the current user's permissions and receives a copy of the complete parent environment through `env={**os.environ, ...}`. This may include API keys, cloud credentials, tokens, proxy credentials, or other secrets unrelated to Glancely. The 30-second timeout only limits execution duration. It does not restrict filesystem access, network access, child-process creation, or secret access. Therefore, a component obtained fro ...[truncated 1400 chars]
Remediation
View remediation

T02 · Agent Memory Poisoning

Warning
Location
glancely/core/openclaw_cron.py:78
Finding

User-Controlled Notification Text Is Persisted as an Agent System Event

Content
View full analysis
dict[str, Any]: """Create or replace the cron job for one component. Idempotent by job name.""" cfg = load_user_config() data = _read_jobs() jobs = data.setdefault("jobs", []) name = _job_name(component, label) now_ms = int(time.time() * 1000) new_job = { "id": str(uuid.uuid4()), "agentId": cfg["agent_id"], "sessionKey": cfg["session_key"], "name": name, "enabled": enabled, "createdAtMs": now_ms, "schedule": {"kind": "cron", "expr": cron_expr, "tz": tz}, "sessionTarget": cfg["session_target"], "wakeMode": "now", "payload": {"kind": "systemEvent", "text": notification_text}, "state": {}, } ``` ### Technical Analysis The `--notify` value can contain arbitrary text. That text is written directly into OpenClaw's persistent cron registry as a `systemEvent`, and the module documentation states that the Agent interprets the event text as a prompt. No trusted wrapper distinguishes reminder data from A ...[truncated 1909 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
glancely/core/auth/google_oauth.py:25
Finding

Diary Integration Requests Full Google Calendar Authorization

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (119)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · DASHBOARD_UPGRADE_PLAN.md (reported line 2173)May include surrounding context.

  • Step 4: Clean up test scaffold
bash
rm -rf ~/.glancely/components/test_chart
  • Step 5: Commit

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · DASHBOARD_UPGRADE_PLAN.md (reported line 2173)May include surrounding context.

  • Step 4: Clean up test scaffold
bash
rm -rf ~/.glancely/components/test_chart
  • Step 5: Commit

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The setup section instructs the agent to install software from PyPI and run setup commands if the CLI or data directory is missing, which is materially riskier than the high-level description suggests. Package installation and system-level command execution expose users to supply-chain risk, environment mutation, and unintended persistence, especially when triggered from broad natural-language routing.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.