Back to skill

Security audit

Agent Causal

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent analytics purpose, but it asks users to install unverified remote code and under-documents its network-facing modes.

Review before installing. Prefer a pinned, checksummed release or isolated environment, avoid the mutable git clone install path, use read-only PostHog tokens, and do not expose the HTTP mode beyond localhost without your own authentication and transport controls.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:66
Finding
Integrity-Unverified Remote Code Retrieval and Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 66–90 **Vulnerability Type**: Remote payload retrieval and execution without integrity verification **Risk Level**: High ### Vulnerable Code ```bash # Download the release tarball — no git clone needed curl -sL https://github.com/ZhuMorris/agent-causal-decision-tool/archive/refs/tags/v0.10.2.tar.gz -o agent-causal.tar.gz tar -xzf agent-causal.tar.gz pip install agent-causal-decision-tool-0.10.2/ -q ``` Alternative installation instructions: ```bash git clone https://github.com/ZhuMorris/agent-causal-decision-tool.git ~/clawd/agent-causal-decision-tool pip install ~/clawd/agent-causal-decision-tool -q ``` ### Technical Analysis The installation instructions retrieve executable Python package content from a personal GitHub repository and pass it to `pip install` without verifying a cryptographic checksum or trusted signature. Python installation can execute attacker-controlled build backend or setup logic, making the downloaded repository an effective remote code-execution channel. Although the release URL references a tag, the instructions do not verify that the downloaded archive matches a reviewed artifact. The alternative `git clone` workflow is more exposed because it installs the repository's mutable default branch rather than an immutable commit. Compromise of the upstream account, repository, release content, dependencies, or delivery path could therefore alter the code executed after the Skill itself has been reviewed. There is also a version inconsistency: the Skill metadata declares version `0.10.3`, while the release archive instructions install version `0.10.2`. This weakens reproducibility and makes it less clear which implementation was assessed or intended. The network download is relevant to initial setup, but the absence of integrity controls exceeds the minimum privilege and trust necessary to install a statistical analysis tool. The project package contains only do ...[truncated 1780 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Vendor the reviewed implementation inside the Skill package so that the installed code is identical to the audited code. 2. If remote retrieval is necessary, publish a versioned release artifact and pin its expected SHA-256 digest: ```bash curl --fail --show-error --location \ https://github.com/ZhuMorris/agent-causal-decision-tool/archive/refs/tags/v0.10.3.tar.gz \ --output agent-causal.tar.gz echo "<trusted-sha256> agent-causal.tar.gz" | sha256sum --check --strict ``` 3. Abort installation if download or integrity verification fails. Avoid `curl -s` because it suppresses useful diagnostics; use `--fail --show-error`. 4. Sign release artifacts and verify signatures against a documented, independently distributed maintainer key. 5. Remove the mutable default-branch installation path. If Git is required, check out and verify an immutable commit identifier before installation. 6. Pin all transitive Python dependencies and use hash verification, such as a locked requirements file with `pip --require-hashes`. 7. Align the Skill metadata version, release archive version, local source version, and documented schema version. 8. Perform installation in an isolated virtual environment or container using a non-privileged account. Do not run `pip install` with `sudo`. 9. Include the connector implementation in the audited artifact and test that PostHog credentials are neither logged nor transmitted to hosts other than the explicitly configured PostHog instance. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (5)

Description-Behavior Mismatch

Medium
Confidence
90% confidence
Finding
The manifest description materially understates the skill's capabilities by omitting local SQLite persistence and history retrieval. This can mislead operators and downstream policy engines into treating the tool as stateless when it actually stores experiment results, which may include sensitive business metrics, audit data, or connector-derived metadata.

Intent-Code Divergence

Medium
Confidence
96% confidence
Finding
The security model claims the tool performs only local statistical calculations and implies no network exposure during normal use, but the same document later exposes HTTP server and external connector functionality. This inconsistency can cause users or orchestrators to grant the skill broader trust than warranted, increasing the chance that network-facing features are enabled without appropriate controls.

Session Persistence

Medium
Category
Rogue Agent
Content
**No runtime network access during analysis.** The decision engine, audit, and cohort analysis do not make outbound requests.
**Tools used:** `exec` (for running the `agent-causal` CLI commands you specify). Commands are fully hardcoded with no user-supplied strings interpolated into shell execution.
**PostHog token scope:** Use a read-only API token with minimal scopes. Do not use tokens with write or admin permissions.
**Credential handling:** PostHog API credentials are read from env vars (`POSTHOG_API_KEY`/`POSTHOG_PROJECT_ID`) or a local `~/.posthogrc` file — never hardcoded or logged.

---
Confidence
84% confidence
Finding
The skill reads long-lived credentials from environment variables or a persistent `~/.posthogrc` file, creating a local secret persistence surface that is only lightly documented. In multi-user or shared agent environments, weak file permissions, accidental inclusion in backups, or later compromise of the host could expose the PostHog API key and associated project access.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
Documenting an HTTP server mode expands the attack surface from local-only execution to a potentially network-accessible service, yet this broader exposure is not reflected in the manifest description. In agent environments, operators may approve the skill for local analytics while overlooking that it can listen on a port and accept requests, creating opportunities for unauthorized access or misuse.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The HTTP mode is presented with a simple `--port 8000` example but no warning about binding scope, authentication, TLS, or firewalling. If implemented naively, users may expose an unauthenticated decision API on a reachable interface, allowing unauthorized requests, data exfiltration from stored results, or abuse of connector-backed functionality.

Static analysis

No suspicious patterns detected.