Back to skill

Security audit

Agentcast

Security checks for vulnerabilities and agentic risk

Overview

This skill appears purpose-aligned, but it asks users to run live wallet and Farcaster identity operations with raw keys through mutable installs and broad network endpoints.

Review before installing. Use a fresh low-value wallet, run dependency installation in an environment with no secrets loaded, prefer reviewed pinned code and lockfiles, avoid custom hub/RPC URLs unless you trust them, and assume on-chain transactions plus Farcaster profile/linking changes are public and may not be reversible.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (1)

T08 · Insecure Dependencies

Warning
Location
scripts/package.json:5
Finding
Unpinned Dependencies and Mutable Repository Checkout<![CDATA[ ## Vulnerability Details **File Locations**: - `scripts/package.json:5-6` - `SKILL.md:119` - `SKILL.md:145-147` - `SKILL.md:180-182` - `SKILL.md:338` - `erc-8004-base.md:16` **Vulnerability Type**: Supply-chain exposure through mutable dependency sources **Risk Level**: Medium ### Vulnerable Code `scripts/package.json:5-6`: ```json "@farcaster/core": "^0.15.0", "viem": "^2.47.0" ``` `SKILL.md:145-147`: ```bash git clone https://github.com/clawd800/agentcast-ai.git cd agentcast-ai npm install viem ``` `SKILL.md:180-182`: ```bash git clone https://github.com/clawd800/agentcast-ai.git cd agentcast-ai npm install viem ``` `SKILL.md:119` and `SKILL.md:338`: ```bash cd agentcast-ai/agentcast/scripts && npm install ``` `erc-8004-base.md:16`: ```bash npm install viem ``` ### Technical Analysis The documented installation process clones the mutable default branch of a remote Git repository and installs packages from the npm registry. The dependencies in `scripts/package.json` use caret version ranges, and the audited project does not include a lockfile that fixes the complete dependency graph and integrity hashes. Consequently, the code installed by a user may differ from the code reviewed during this audit. A future version matching the caret ranges, a changed transitive dependency, or a modified default branch could introduce malicious code. npm packages can also define lifecycle scripts that run during installation. This is particularly sensitive because the scripts are subsequently invoked with wallet private keys and Farcaster signer keys in environment variables. Although the audited scripts do not transmit raw keys, newly resolved or compromised dependency code executes in the same Node.js process and can access `process.env`. ### Attack Path 1. An attacker compromises the upstream Git repository, an allowed npm package version, or a transitive dependency. 2. The attacker publishes code within the permitted version range or modifies the ...[truncated 1274 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace caret dependency ranges with reviewed exact versions: ```json { "dependencies": { "@farcaster/core": "0.15.0", "viem": "2.47.0" } } ``` 2. Generate, review, and commit `package-lock.json` so the entire transitive dependency graph and package integrity hashes are fixed. 3. Replace `npm install` in operational documentation with: ```bash npm ci ``` 4. Pin repository checkout instructions to a reviewed commit hash or signed release tag rather than the mutable default branch: ```bash git clone https://github.com/clawd800/agentcast-ai.git cd agentcast-ai git checkout --detach <reviewed-commit-hash> npm ci ``` 5. Review dependency lifecycle scripts. Where dependencies do not require them, install using: ```bash npm ci --ignore-scripts ``` 6. Run dependency installation in an environment that does not contain wallet keys, signer keys, API keys, or other sensitive environment variables. 7. Execute wallet-related scripts in an isolated, least-privileged environment and expose only the credentials required for the specific operation. 8. Add automated dependency integrity, vulnerability, and provenance checks to the release process. Review all lockfile changes before merging or publishing a new release. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Ae1

High
Category
analysis-evasion
Content
ich requires the fname to be already registered on `fnames.farcaster.xyz`. Use `register-fname.mjs` instead.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Lp3

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding
The skill instructs users to use environment variables for sensitive material such as PRIVATE_KEY and SIGNER_KEY and to make multiple network calls, but it does not declare any explicit tool scope or allowed-tools restrictions. In an agent environment, that omission increases the chance the runtime will grant broader-than-necessary access, enabling unintended exfiltration of secrets or unreviewed outbound requests during skill execution.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# By agentId (most reliable)
curl -X POST https://ac.800.works/api/agents/refresh \
  -H "Content-Type: application/json" \
  -d '{"agentId": YOUR_AGENT_ID}'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Intent-Code Divergence

Medium
Confidence
97% confidence
Finding
The final-step guidance at L291-L295 says 'Do NOT cast during setup' and to cast only after the agent appears on the dashboard. However, earlier instructions tell the user to post a test cast to verify setup (L20-L22), announce with a cast in Path A (L162-L169), verify by posting a test cast in Path B (L195-L199), and post in Path D verification (L267-L269). These instructions directly contradict each other about whether casting should occur before indexing confirmation.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill instructs users to use a raw PRIVATE_KEY and perform live on-chain registration/update transactions, but it does not prominently warn that blockchain actions are irreversible or that mishandling private keys can lead to permanent asset loss and identity compromise. In this context, users may copy sensitive keys into shells or scripts and execute state-changing transactions against a real contract, increasing the risk of accidental exposure or unintended writes.

Context-Inappropriate Capability

Medium
Confidence
84% confidence
Finding
The manifest frames the skill around setting up an agent identity on AgentCast/Farcaster and using the AgentCast dashboard/proxy. However, the code permits overriding the destination with any URL, causing the tool to transmit signed Farcaster messages to an arbitrary remote endpoint unrelated to AgentCast. That general-purpose exfiltration/network forwarding capability is not justified by the stated purpose.

External Transmission

Medium
Category
Data Exfiltration
Content
const url = useProxy
    ? AGENTCAST_PROXY
    : "https://api.neynar.com/v2/farcaster/user/verification";

  const headers = { "Content-Type": "application/json" };
  if (!useProxy) {
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
const url = useProxy
    ? AGENTCAST_PROXY
    : "https://api.neynar.com/v2/farcaster/user/verification";

  const headers = { "Content-Type": "application/json" };
  if (!useProxy) {
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"name": "agentcast",
  "type": "module",
  "dependencies": {
    "@farcaster/core": "^0.15.0",
    "viem": "^2.47.0"
  }
}
Confidence
86% confidence
Finding
The dependency uses a caret range, which allows automatic installation of newer minor/patch versions instead of an exact reviewed version. This increases supply-chain risk because a compromised or breaking upstream release could be pulled into future installs without explicit approval; in this skill, the Farcaster and on-chain identity context makes dependency trust more important because these libraries may handle signing, identity, or network interactions.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"type": "module",
  "dependencies": {
    "@farcaster/core": "^0.15.0",
    "viem": "^2.47.0"
  }
}
Confidence
86% confidence
Finding
The viem dependency is specified with a caret range, so builds may resolve to different upstream releases over time rather than a single audited version. That creates a real but low-severity supply-chain exposure, especially relevant here because viem is commonly used for blockchain transaction and signing operations where a malicious or vulnerable update could affect on-chain behavior.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/register-fname.mjs:89

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/set-profile.mjs:88

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/verify-wallet-on-farcaster.mjs:69