Back to skill

Security audit

skills-security-scanner

Security checks for vulnerabilities and agentic risk

Overview

This skill is a security scanner, but it can silently upload whole skill directories to local, cloud, or custom endpoints with credentials and without clear user confirmation or file filtering.

Review before installing. Only run this on skill directories you are comfortable uploading, remove secrets and unrelated files first, and verify SCAN_BASE_URL or SCAN_SERVICE_HOST points to a trusted endpoint. Prefer a local-only configuration and scoped temporary credentials if you use it.

Vulnerability Patterns
  • 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
  • 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)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/scan.py:73
Finding
Unrestricted archival and upload of sensitive files to configurable network endpoints## Vulnerability Details **File Location**: `scripts/scan.py:73-78`, `scripts/scan.py:176-184`, `scripts/scan.py:226`, and `scripts/scan.py:316-324` **Vulnerability Type**: Unrestricted sensitive-data collection and network disclosure **Risk Level**: High ### Vulnerable Code ```python with zipfile.ZipFile(temp_zip.name, 'w', zipfile.ZIP_DEFLATED) as zipf: for root, dirs, files in os.walk(dir_path): for file in files: file_path = os.path.join(root, file) # Calculate relative path for the zip archive arcname = os.path.relpath(file_path, dir_path) zipf.write(file_path, arcname) ``` ```python # Prepare multipart upload with open(file_to_upload, 'rb') as f: file_content = f.read() files = { 'File': (os.path.basename(file_to_upload), file_content, 'application/zip') } data = { 'Name': name, 'Description': description, 'IntegrateType': 'file', 'ScanNow': 'true' } ``` ```python response = requests.post(self.upload_url, headers=v_request.headers, data=prepped.body) ``` ```python base_url = os.environ.get("SCAN_BASE_URL", "") ak = os.environ.get("VOLC_ACCESS_KEY") or os.environ.get("VOLC_ACCESSKEY") or os.environ.get("SCAN_AK") sk = os.environ.get("VOLC_SECRET_KEY") or os.environ.get("VOLC_SECRETKEY") or os.environ.get("SCAN_SK") region = os.environ.get("VOLC_REGION", DEFAULT_REGION) host = os.environ.get("SCAN_SERVICE_HOST", DEFAULT_HOST) service = os.environ.get("VOLC_SERVICE", DEFAULT_SERVICE) session_token = os.environ.get("VOLC_SESSION_TOKEN", "") user_id = os.environ.get("VOLC_USERID", "") ``` ### Technical Analysis The directory-packaging routine recursively includes every file reachable through `os.walk()` without applying exclusions, validating file types, checking for secrets, presenting a manifest, or imposing file-count and archive-size limits. The resulting archive is read in full and t ...[truncated 2778 chars]
Remediation
## Remediation Suggestions 1. Default strictly to a loopback analysis service and require explicit, informed user consent before uploading any content to a remote service. 2. Enforce HTTPS for every non-loopback endpoint. Reject plaintext remote URLs rather than relying on user configuration. 3. Maintain an allowlist of trusted service origins and reject arbitrary `SCAN_BASE_URL` and `SCAN_SERVICE_HOST` values. 4. Build archives from an explicit allowlist of required source and metadata files rather than recursively including all files. 5. Exclude sensitive and unnecessary content by default, including `.env*`, private-key formats, credential files, VCS metadata, caches, build output, sockets, and symlinks. 6. Perform secret detection before packaging and stop the upload when likely credentials or private keys are found. 7. Display the exact destination and a complete archive manifest, including total size, before remote transmission. 8. Add configurable limits for individual file size, total archive size, recursion depth, and file count. 9. Stream uploads instead of reading the complete archive into memory. 10. Avoid forwarding signed authorization headers to any destination that has not passed strict origin validation. 11. Update `SKILL.md` to disclose cloud and configurable remote-upload behavior accurately, including what files are collected and where they are sent. 12. Implement the documented `config.json` behavior securely or remove that claim from the documentation.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The skill is presented as a security scanner, but its documented behavior includes packaging local skill files/directories and uploading them to an external service while using cloud credentials and creating remote resources. That is a significant behavior mismatch because a user may expect local passive analysis, yet the skill can exfiltrate source content and metadata off-host, potentially including proprietary code, embedded secrets, or sensitive workspace information.

Ae1

High
Category
analysis-evasion
Content
- **要求**:必须确保目标技能包含 `SKILL.md` 文件,因为它是扫描的主要输入。
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The code packages the provided local file or directory and uploads it to a remote HTTP/API endpoint for scanning, despite the skill being described as a local security auditing/scanning tool. This creates a clear data exfiltration path for source code, secrets, and proprietary content, and the risk is amplified because users may reasonably expect analysis to stay local based on the skill description.

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill describes capabilities that imply reading local files, packaging directories, using credentials from config or environment variables, and sending data to a local/remote analysis service, but it declares no explicit tool scope or permissions. This creates a transparency and policy-enforcement gap: users and runtime controls cannot accurately assess that the skill can access files, secrets, write artifacts, and perform network operations.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The markdown instructs the agent to present results to the user in Chinese, which imposes a specific language choice. This is a natural-language policy concern because no user opt-in or alternative locale option is provided.

Natural-Language Policy Violations

Medium
Confidence
98% confidence
Finding
The file states that results must use the specified format in Chinese, again forcing a locale on all users. The document does not indicate that this is a region-specific tool or that users may choose another language.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The upload_and_scan flow accepts a path, zips directories or repackages archives, and proceeds to upload the contents without any user-facing warning, confirmation, or disclosure at the point of use. Because the skill context is security auditing, users are more likely to supply sensitive codebases, making silent remote transfer particularly risky.

Context-Inappropriate Capability

Medium
Confidence
89% confidence
Finding
The script reads cloud credentials and related identifiers from environment variables to authenticate outbound requests, which exceeds the narrow expectation of a simple local audit helper. In the context of a scanning skill, this broadens the trust boundary and enables use of sensitive credentials for remote operations without making that capability clear to the user.

Static analysis

No suspicious patterns detected.