Back to skill

Security audit

benxiang-protocol

Security checks for vulnerabilities and agentic risk

Overview

The skill’s purpose is coherent, but its install instructions run unpinned code from an external GitHub repository that was not included in the reviewed artifact.

Review or sandbox the external repository before following the install steps. Prefer a pinned commit with an independently verified checksum or signature, and run npm scripts only in a disposable environment without secrets or broad filesystem access.

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.en.md:32
Finding
Unpinned Remote Repository Retrieval and npm Script Execution## Vulnerability Details **File Location**: `SKILL.en.md`, lines 32–34 **Additional Location**: `SKILL.md`, lines 29–31 **Vulnerability Type**: Unverified remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code ```bash git clone https://github.com/dongsheng123132/2origin.git cd 2origin npm run verify # 96 self-test assertions + 25 MCP end-to-end + mutation check 19/19 ``` The equivalent instructions in `SKILL.md` are: ```bash git clone https://github.com/dongsheng123132/2origin.git cd 2origin npm run verify # 自测 96 项 + MCP 端到端 25 项 + 变异检查 19/19 ``` ### Technical Analysis The installation instructions clone the current state of a remotely controlled Git repository and immediately invoke an npm script from it. They do not pin an immutable commit, verify a cryptographic digest or signature, or otherwise establish that the downloaded code is the same code that was reviewed. An npm script can execute arbitrary operating-system commands under the invoking user's account. Consequently, the effective executable payload is controlled by the repository state at the time the instructions are followed rather than by the audited Skill package. The repository owner—or an attacker who compromises the repository or its owner account—could modify `package.json`, the verification scripts, or code reached by those scripts after the Skill has been reviewed. The implementation referenced by these commands is not included in the audited project, which contains only `SKILL.md` and `SKILL.en.md`. Its behavior and the documentation's security claims therefore could not be independently verified in this audit. The separate `npm run verify` commands at `SKILL.en.md:125` and `SKILL.md:114` repeat the execution risk after installation, but they do not independently retrieve the payload. ### Attack Path 1. An attacker gains control of the referenced GitHub repository or the repository owner's account, or the owner maliciously changes the reposito ...[truncated 1133 chars]
Remediation
## Remediation Suggestions 1. Bundle the reviewed implementation directly with the Skill so the distributed documentation and executable code are audited as one immutable unit. 2. If remote retrieval is necessary, pin the clone to a specific reviewed commit rather than executing the repository's default branch: ```bash git clone https://github.com/dongsheng123132/2origin.git cd 2origin git checkout --detach EXPECTED_COMMIT_SHA ``` 3. Verify the downloaded content against a separately published cryptographic checksum or a trusted signed Git tag before running any script. 4. Document the exact approved commit, expected digest, verification procedure, and signer identity. 5. Inspect the pinned `package.json` and the complete transitive command path behind `npm run verify` as part of the release audit. 6. Run verification in a sandbox or disposable container with no secrets, restricted filesystem access, minimal privileges, and denied network access unless explicitly required. 7. Apply the same pinned-version and integrity-verification requirements to every later invocation of `npm run verify`. 8. Update both language versions of the documentation consistently.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep

Static analysis

No suspicious patterns detected.