Back to skill

Security audit

智能体合同

Security checks for vulnerabilities and agentic risk

Overview

This skill advertises autonomous legally binding contract actions but does not provide matching safeguards, clear scope, or reviewable implementation.

Review this before installing. Do not allow it to autonomously sign, enforce, or execute real contracts, and do not grant broad file or shell access unless it is sandboxed, scoped to non-sensitive test data, and every consequential action is manually approved. Treat the npm install example as unreviewed external code.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:136
Finding

Unpinned Third-Party npm Package Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:136-141
Vulnerability Type: Insecure third-party dependency installation
Risk Level: Medium

Vulnerable Code Snippet:

markdown
**Installation**:
# ...
```bash
npm install agent-commercial-contract
text

### Technical Analysis

The installation instructions retrieve `agent-commercial-contract` from the npm registry without pinning an exact version, supplying an integrity hash, or providing a lockfile. The project does not include the package implementation or identify a verified source repository and publisher, so the dependency's behavior cannot be established from the audited artifact.

An unpinned command resolves to the registry version selected at installation time. Consequently, the effective code can change after this Skill has been reviewed. npm packages can also define lifecycle scripts, such as `preinstall`, `install`, and `postinstall`, which npm may execute during installation.

This creates a supply-chain exposure if the package is compromised, transferred to an attacker, or publishes a malicious future release.

### Attack Path

1. An attacker compromises the npm package, its publisher account, or a future release.
2. The attacker publishes a malicious version containing executable code or an npm lifecycle script.
3. A user follows the Skill's documented `npm install agent-commercial-contract` instruction.
4. npm resolves and downloads the attacker-controlled release.
5. A lifecycle script may execute during installation, or the payload executes when the imported package is used.
6. The payload operates with the privileges of the user or automation account running npm.

### Impact Assessment

Successful exploitation could permit arbitrary code execution under the installing account. Depending on that account's privileges and environment, the payload could read or alter accessible files, steal environment variables and development 
...[truncated 245 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the dependency to an audited exact version rather than using an unconstrained installation:
    bash
    npm install --save-exact agent-commercial-contract@<verified-version>
    
  2. Commit a lockfile containing the resolved version and package integrity data.
  3. Document the package's official source repository, verified publisher, and expected integrity information.
  4. Audit the selected package version, including all transitive dependencies and npm lifecycle scripts.
  5. Use npm ci with a reviewed lockfile in automated environments.
  6. Where compatible with the package, disable lifecycle scripts during installation:
    bash
    npm ci --ignore-scripts
    
  7. Execute dependency installation in an isolated, least-privileged environment without production credentials.
  8. Prefer including a reviewable implementation in the Skill package rather than relying on an unspecified external package.

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:24
Finding

Excessive Filesystem and Command-Execution Tool Permissions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:24-29
Vulnerability Type: Excessive agent capabilities and violation of least privilege
Risk Level: Medium

Vulnerable Code Snippet:

yaml
tools:
  - read
  - exec
  - write
  - glob
  - grep

Technical Analysis

The Skill declares arbitrary command execution and broad filesystem reading, writing, and searching capabilities. Its documented core workflow is contract-related content generation, but the artifact does not establish a legitimate requirement for unrestricted shell execution or broad file modification.

No command allowlist, path restriction, sandbox boundary, user-confirmation requirement, or read-only default is defined. This violates least privilege by exposing capabilities beyond those necessary for textual content generation.

Although the audited instructions do not directly order malicious commands, excessive capabilities increase the consequences of malicious user input, prompt injection embedded in processed content, model error, or compromise of a future dependency.

Attack Path

  1. The Skill is loaded with exec, read, write, glob, and grep available.
  2. An attacker supplies contract content or another input containing instructions intended to influence the Agent's tool use.
  3. The Agent interprets the untrusted content as actionable instructions or otherwise makes an unsafe tool decision.
  4. The Agent searches for sensitive files, reads accessible data, modifies local files, or invokes a system command.
  5. Data or system resources accessible to the Agent account are exposed or altered.

Exploitation depends on the hosting Agent's tool authorization and confirmation controls; the Skill itself does not provide the required restrictions.

Impact Assessment

The exposed scope includes files readable or writable by the Agent process and commands executable by its operating-system account. Potential conse ...[truncated 394 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove exec, write, glob, and grep unless each capability is demonstrably required.
  2. Use a read-only content-generation design where possible.
  3. Restrict file access to a dedicated workspace and explicitly deny access to home directories, credential stores, system paths, and unrelated repositories.
  4. If writing is required, permit it only for explicitly named output files and prevent overwriting existing or sensitive files.
  5. If command execution is unavoidable, enforce a fixed command and argument allowlist rather than accepting shell strings.
  6. Prohibit shell interpolation and the incorporation of user-controlled data into executable commands.
  7. Require explicit user approval before every command execution or consequential file modification.
  8. Run the Skill in a sandbox under a dedicated, least-privileged account without secrets or production access.
  9. Treat document and contract contents as untrusted data and ensure they cannot redefine the Agent's instructions or tool policy.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
96% confidence
Finding

The skill explicitly promotes autonomous negotiation, signing, execution, and enforcement of legally binding contracts, which are high-risk actions with legal, financial, and compliance consequences. The warning present is weak and generic, and it does not clearly prohibit autonomous final decisions or require human/legal review before binding actions, making unsafe deployment in sensitive contexts more likely.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill’s declared purpose is autonomous negotiation, signing, execution, and enforcement of legally binding commercial contracts, but the body of the document mostly describes generic text generation, templates, and style-based output. This mismatch is dangerous because it can mislead users and agent platforms about the actual behavior and trust boundary of the skill, causing it to be invoked in high-risk legal workflows without the controls, validation, or legal safeguards such a capability would require.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill also declares broad read/write/glob/grep file-system capabilities without a clear contract-specific justification or any visible path restrictions. In an agent setting, this can enable overbroad access to local files, accidental disclosure of sensitive documents, or modification of unrelated project content if the skill is steered by user input or other prompt content.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill also declares broad read/write/glob/grep file-system capabilities without a clear contract-specific justification or any visible path restrictions. In an agent setting, this can enable overbroad access to local files, accidental disclosure of sensitive documents, or modification of unrelated project content if the skill is steered by user input or other prompt content.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation claims that only whitelisted commands will be executed, but there is no visible whitelist or enforcement mechanism in the skill file. This creates a false sense of security and can lead operators to trust dangerous exec capability under assumptions that are not actually implemented.

Content

No source excerpt is available for this finding.