Back to skill

Security audit

CMIC Skill Scanner (Linux x64)

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed local skill-scanner wrapper, but its packaged binary and checksum are missing and its default mode may run an externally resolved local scanner.

Review before installing. Do not rely on the claimed bundled binary unless the package actually contains it and the checksum verifies. Prefer running with --engine native, avoid default auto mode unless you trust the resolved external scanner, and only enable --use-llm or --upload-url with endpoints you control and understand.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (3)

T08 · Insecure Dependencies

Error
Location
SKILL.md:34
Finding
Unpinned Remote Repository Used as a Build Source<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:34-35` **Vulnerability Type**: Mutable remote dependency and unsafe source build **Risk Level**: High ### Vulnerable Code ```bash git clone https://gitee.com/random_player/cmic-skill-scanner.git cd cmic-skill-scanner && cargo build --release ``` ### Technical Analysis The build instructions clone the current default branch of a remote repository without pinning an audited commit or verifying a signed release tag or source checksum. Consequently, the code compiled by a user may differ from the code that was available when this skill package was reviewed. Building a Rust project can execute build scripts and procedural macros during compilation. Therefore, compromise of the repository, its dependencies, or the account controlling it could lead to code execution during the build itself, even if the resulting binary is never run. ### Attack Path 1. An attacker compromises the referenced repository, its maintainer account, or a dependency resolved during the build. 2. The attacker adds malicious source code, a Cargo build script, or a malicious dependency to the mutable default branch. 3. A user follows the documented `git clone` command, which retrieves the attacker-controlled revision. 4. The user runs `cargo build --release`. 5. Malicious build-time code executes with the permissions and environment of the user running Cargo. 6. The resulting binary may also retain malicious behavior and execute later as the scanner. ### Impact Assessment Successful exploitation could permit arbitrary code execution with the privileges of the user performing the build. Potential scope includes access to files readable by that user, modification of user-owned files, theft of environment variables or development credentials, network communication, and creation of a malicious scanner binary for subsequent execution. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions - Pin the repository to a specific, audited commit hash rather than cloning a mutable default branch. - Publish and require verification of a cryptographically signed release tag. - Provide a SHA-256 or stronger digest for the complete source archive. - Use a source repository controlled by a clearly identified, trusted organization. - Commit and audit `Cargo.lock`, and build with `cargo build --release --locked`. - Review build scripts, procedural macros, and transitive dependencies before compilation. - Prefer reproducible builds and publish provenance or attestation linking the source revision to the distributed binary. ]]>

T07 · Tool Hijacking and Spoofing

Error
Location
SKILL.md:94
Finding
Default Auto Mode May Execute an Implicitly Resolved External Scanner<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:94-98` **Vulnerability Type**: Untrusted local tool resolution and execution **Risk Level**: High ### Vulnerable Code ```text Default `auto` mode tries a locally resolved external scanner first and falls back to native when it is unavailable or fails. Use `--engine external` to require the external result, or `--engine native` to run only the built-in engine. CMIC passes the target path to a user-configured local tool. The tool runs with the current user's process permissions; trust the external tool and its configuration separately. CMIC only configures the external LLM endpoint when `--use-llm` is explicitly set; the tool may otherwise bootstrap dependencies or use its own network configuration. ``` The same default is also documented in `INSTALL.md:23-24`: ```text The default engine is `auto`: it prefers a locally resolved external scanner and falls back to the built-in native engine if the external scanner is unavailable or fails. Use `--engine native` to run only the built-in engine. ``` ### Technical Analysis The default `auto` mode prefers a “locally resolved” external scanner over the native implementation. The documentation does not define the executable name, lookup order, trusted directories, ownership requirements, absolute-path enforcement, or integrity validation applied to the resolved tool. If resolution uses `PATH`, a working directory, user-controlled configuration, or another writable search location, an attacker may be able to place a spoofed scanner where it will be selected before the legitimate tool. The external process runs with the current user's permissions and receives the scan target path. It may also inherit environment variables unless the implementation explicitly filters them. The implementation was not included in the reviewed package, so the exact resolution algorithm and any protections cannot be verified. The documented default nevertheless creates a t ...[truncated 1280 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Make the native engine the default and require explicit opt-in for external execution. - Require users to provide an absolute external-scanner path. - Reject executables located in the current directory, temporary directories, or directories writable by untrusted users. - Validate ownership, permissions, signatures, or an administrator-configured hash before execution. - Document the exact scanner name, resolution order, and trust checks. - Launch the child process with a minimal allowlisted environment rather than inheriting all environment variables. - Apply least-privilege sandboxing and network restrictions to external scanners where supported. - Display the resolved executable path and verified identity before execution. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
INSTALL.md:5
Finding
Declared Binary and Checksum Artifacts Are Missing from the Package<![CDATA[ ## Vulnerability Details **File Location**: `INSTALL.md:5-8` **Vulnerability Type**: Unverifiable package integrity and incomplete release contents **Risk Level**: Medium ### Vulnerable Code ```markdown - Binary: `assets/bin/skillscan` - Skill document: `SKILL.md` - Build metadata: `assets/build/build-info.json` - SHA-256: `assets/build/skillscan.sha256` ``` `SKILL.md:19-25` additionally declares: ```markdown | Property | Value | |----------|-------| | Location | `assets/bin/skillscan` | | Version | `v0.11.1` | | Platform | `Linux x64` | | SHA-256 | `bb3847f3afca734ef0cf6c061f553602b3df5dad23f726215d25812b74d01bf0` | ``` The reviewed package contains only `assets/build/build-info.json` under `assets/`. Neither `assets/bin/skillscan` nor `assets/build/skillscan.sha256` is present. ### Technical Analysis The installation instructions describe a bundled executable and checksum file that do not exist in the reviewed artifact. Although a checksum value appears in documentation and build metadata, it cannot authenticate an absent binary. The scanner's implementation is also unavailable, preventing verification of its documented file access, external-process execution, redaction, upload, and LLM data-handling behavior. This mismatch may cause users to obtain the executable from an unreviewed external source or follow the mutable source-build instructions. In either case, the executable ultimately run by the user is outside the contents validated during this audit. ### Attack Path 1. A user extracts the package and attempts to follow the installation instructions. 2. The documented binary and checksum file are not present. 3. The user searches for or receives a replacement binary from another location, or follows the unpinned remote build instructions. 4. An attacker supplies a binary with the expected name or directs the user to a compromised source. 5. Because the replacement was not part of the reviewed artifact, the user may execute it without ...[truncated 640 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Include `assets/bin/skillscan` and `assets/build/skillscan.sha256` exactly as documented, or remove all claims that they are bundled. - Ensure release manifests are generated from and validated against the final package contents. - Make checksum verification mandatory rather than optional. - Distribute the checksum through a separately authenticated or cryptographically signed channel. - Include complete source code and reproducible build instructions so the binary's behavior can be independently verified. - Add signed provenance or build attestations linking the binary, source commit, version, platform, and checksum. - Add release validation that fails when any documented artifact is absent or when its digest differs from the manifest. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (3)

Credential Access

High
Category
Privilege Escalation
Content
- CMIC does NOT upload reports unless you configure `--upload-url`
- CMIC does NOT configure an LLM endpoint unless you set `--use-llm`
- `auto` may execute a locally resolved external scanner; use `--engine native` to prevent that
- Does NOT access credentials or SSH configs as scan targets unless they are under the path you explicitly scan

## 工作流程
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The top-level description is written in Chinese and the document mixes Chinese section content without stating that the skill is Chinese-only or offering an English/locale choice. This can violate language/locale policy when users are not given an opt-in or justified regional constraint.

Natural-Language Policy Violations

Low
Confidence
96% confidence
Finding
The manifest text in lines L2-L3 is written entirely in Chinese and specifies the skill behavior/output in Chinese without indicating that users may choose another language. This can violate a language/locale policy when no opt-in or alternative is offered.

Static analysis

No suspicious patterns detected.