Back to skill

Security audit

Contract Agent Free

Security checks for vulnerabilities and agentic risk

Overview

This skill appears purpose-aligned for contract and escrow workflows, but it needs review because it combines broad invocation, executable npm installation, sensitive key/contract storage, and unclear network behavior.

Review this before installing. Use it only in a sandbox or controlled project directory, pin and verify the `contract-agent` npm package before execution, keep private keys out of version control, and require explicit human approval before any signing, escrow locking, milestone acceptance, or release workflow. Treat the free version as simulated unless the publisher clearly documents real payment or network integrations.

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
SKILL.md:203
Finding

Unpinned and Unaudited Executable npm Dependency

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 203–206
Vulnerability Type: Third-party software supply-chain risk
Risk Level: Medium

Vulnerable Code

bash
# Dependency installation
npm install contract-agent
# ...
# Initialize SDK
contract-agent init --storage sqlite

Technical Analysis

The Skill directs the Agent to install contract-agent from the npm registry without specifying an exact version, integrity hash, lockfile, verified publisher, or authoritative source repository. It then directly executes the installed CLI.

Because npm packages may define lifecycle scripts, attacker-controlled code can potentially execute during installation. An unpinned dependency can also resolve to a future version that differs from the version originally reviewed. The project contains only SKILL.md; it does not include the package implementation or other artifacts that would allow the dependency's behavior and provenance to be verified.

This finding establishes an unsafe dependency-consumption pattern. The audit did not establish that the current npm package is malicious.

Attack Path

  1. An attacker compromises the referenced npm package or its publisher account, or causes an unsafe package version to be resolved.
  2. The Agent follows the documented command npm install contract-agent.
  3. Malicious package lifecycle code executes during installation, or attacker-controlled executable content is installed.
  4. The Agent runs contract-agent init --storage sqlite and subsequent package commands.
  5. The malicious code operates with the privileges of the Agent or user running npm and may access resources available to that account.

Impact Assessment

Successful exploitation could permit arbitrary code execution with the installing user's privileges. Depending on the runtime environment, the affected scope may include:

  • Reading or modifying files accessible to the Agent.
  • Accessing locally stored identity keys and contract ...[truncated 466 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin contract-agent to an exact, security-reviewed version rather than resolving the latest compatible release.
  2. Commit and enforce a lockfile containing registry-resolved integrity metadata.
  3. Document and verify the package's official npm scope, publisher identity, and source repository.
  4. Review the dependency source and all transitive dependencies before permitting execution.
  5. Use npm ci in controlled deployments to enforce the reviewed dependency graph.
  6. Disable package lifecycle scripts with --ignore-scripts where functionality permits. If scripts are required, audit them explicitly before execution.
  7. Verify package integrity and provenance through trusted signatures, attestations, or approved registry controls.
  8. Run installation and CLI commands in a sandbox with minimal filesystem and network permissions.
  9. Prevent the package process from accessing unrelated credentials, private keys, and sensitive host paths.
  10. Prefer bundling or vendoring a reviewed implementation when reproducible and policy-compliant distribution is possible.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (5)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill describes irrevocable fund locking and automatic milestone-based release without an equally prominent warning about irreversible financial consequences, mistaken acceptance, or dispute edge cases. In a contract/escrow context, users may delegate actions to agents and misunderstand that approval logic can cause unrecoverable financial state changes or simulated workflows to be mistaken for real ones.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

文件标题、显示名、摘要及整体操作说明均默认采用中文表述,未见提供用户语言选择、双语说明或明确的区域性适用声明。根据规则,若技能在自然语言层面强制特定语言而无用户选择或合理限定,可构成语言/地区策略违规。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest and FAQ describe a local SDK with SQLite storage and explicitly say the free version does not integrate with real payment gateways. However, the documented interface includes a callback URL input and later troubleshooting repeatedly tells users to test network connectivity, implying networked behavior beyond the stated local simulated-contract scope.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger condition is so broad that the skill could be invoked for nearly any AI/model/orchestration task, not just contract workflows. In an agent platform with write/exec privileges, over-broad auto-selection increases the chance of unintended execution, inappropriate file access, or command use in contexts where the user did not intend contract tooling to run.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The FAQ states the free version is local-only for escrow simulation and requires no extra API key, yet the error table repeatedly instructs users to validate environment variables, ping network connectivity, and check firewalls/proxies. That guidance contradicts the stated local-only/no-extra-API-key operating model and suggests hidden remote dependencies.

Content

No source excerpt is available for this finding.