Back to skill

Security audit

matrixbnuhs

Security checks for vulnerabilities and agentic risk

Overview

The skill describes a legitimate education knowledge system, but its setup and deployment instructions ask users to run unpinned code from a mutable external repository and perform a production deployment.

Review the external GitHub repository before running the setup commands. Prefer a pinned commit, a reviewed lockfile, npm ci, and an isolated environment without sensitive credentials. Do not run vercel --prod unless you have confirmed the target project, account, generated build output, and deployment permissions.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:30
Finding

Mutable Remote Repository Retrieved and Executed Without Verification

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 30–34
Vulnerability Type: Remote payload retrieval and execution
Risk Level: High

bash
git clone https://github.com/wanyview1/Matrix-BNUHS.git
cd Matrix-BNUHS

# Install dependencies
npm install

Technical Analysis

The Skill instructs users to clone an externally hosted repository and immediately run npm install inside it. The repository is not pinned to a reviewed commit or immutable release, and its contents are not included in the audited artifact. Consequently, the effective code executed by these instructions can change after the Skill has been reviewed.

Running npm install can execute package lifecycle scripts such as preinstall, install, and postinstall. It may also execute scripts defined by the cloned repository itself. A malicious or compromised repository can therefore run arbitrary commands under the invoking user's account.

Attack Path

  1. An attacker compromises the referenced GitHub account, repository, or one of its write-authorized contributors.
  2. The attacker adds malicious package lifecycle scripts or changes dependency declarations and lockfiles.
  3. A user follows the Skill instructions and clones the current repository state.
  4. The user executes npm install.
  5. npm executes attacker-controlled lifecycle code with the user's privileges.

Impact Assessment

Successful exploitation can provide arbitrary code execution with the privileges of the user running npm. Depending on the local environment, the payload could access project files, environment variables, developer credentials, SSH configuration, npm tokens, browser-accessible data, and other files available to that account. It could also modify user-owned files or install additional user-level components.

The audited artifact does not itself contain or automatically execute a malicious payload. The risk arises from delegating execution to mut ...[truncated 36 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin the repository to a reviewed commit hash rather than using the mutable default branch.
  • Include the required application source in the Skill package when feasible so it can be audited together with the instructions.
  • Verify downloaded source against a documented cryptographic checksum or signed release.
  • Commit and review an npm lockfile, then use npm ci rather than unconstrained npm install.
  • Use npm ci --ignore-scripts when package lifecycle scripts are unnecessary.
  • If lifecycle scripts are required, document and review each script before allowing execution.
  • Run installation in an isolated, least-privileged environment without production credentials or access to sensitive host files.

T08 · Insecure Dependencies

Error
Location
SKILL.md:150
Finding

Unpinned Global Vercel CLI Installation Before Production Deployment

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 150–153
Vulnerability Type: Insecure third-party dependency installation
Risk Level: High

bash
# Install Vercel CLI
npm i -g vercel

# Deploy
vercel --prod

Technical Analysis

The instructions globally install the latest available version of the vercel npm package without a version pin, lockfile, or integrity verification. The resolved package and its transitive dependencies may therefore change between executions. Global installation also extends modifications beyond the project directory.

The newly installed CLI is then immediately used for a production deployment. A compromised package version, compromised transitive dependency, or unexpected upstream release could execute local code during installation or CLI startup. The CLI may operate in a context containing deployment credentials and access to production projects.

Attack Path

  1. An attacker compromises the relevant npm package, one of its transitive dependencies, or its publishing credentials.
  2. A malicious release becomes the version resolved by npm i -g vercel.
  3. A user follows the Skill instructions and globally installs that release.
  4. Malicious installation or runtime code executes under the user's account.
  5. When vercel --prod is invoked, the compromised code may access available deployment credentials, alter deployment content, or redirect the deployment.

Impact Assessment

Exploitation can result in arbitrary code execution with the installing user's privileges and system-wide user-environment changes associated with a global npm installation. If deployment credentials are available, a compromised CLI may access or misuse those credentials and affect production deployments or projects authorized for the account.

The command may also publish unintended or unreviewed content to production. No compromised package or actual credential theft was observed i ...[truncated 100 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin the Vercel CLI to a reviewed, specific version.
  • Prefer a project-local development dependency recorded in a reviewed lockfile instead of a global installation.
  • Use npm ci with lockfile integrity data in a clean deployment environment.
  • Verify package provenance, signatures, and integrity where supported.
  • Separate dependency installation from production deployment and require an explicit review or approval gate.
  • Confirm the deployment account, project, scope, and generated artifacts before invoking a production deployment.
  • Run deployment tooling with least-privilege, short-lived credentials limited to the intended project.
  • Avoid exposing unrelated environment variables, repository tokens, or host credentials to the deployment process.
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
Findings (1)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest description and overview are written entirely in Chinese and present the skill as a general-purpose knowledge collaboration system for education, without stating that it is intentionally limited to Chinese-speaking users or offering language choice. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.