Back to skill

Security audit

当用户希望“通过建表语句 + 慢 SQL 自动优化索引”时使用此 Skill,支持 MySQL、Oracle、PostgreSQL。脚本使用 Python,自动解析 DDL 与慢 SQL 中的 WHERE/JOIN/ORDER BY 列,生成候选索引及对应数据库的 CREATE INDEX 语句,并输出到文件。

Security checks for vulnerabilities and agentic risk

Overview

This skill runs a local Python helper to read user-provided SQL files and write index recommendations, with no evidence of hidden network access, persistence, or destructive behavior.

Install only if you are comfortable giving the agent local paths to schema and slow-query files. Use non-sensitive copies when possible, and choose an output path that is safe to create or overwrite. Review the generated index DDL with a DBA or execution-plan tooling before using it in production.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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
Findings (2)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill instructs use of a Python script that reads user-supplied input files and writes output files, but the manifest declares no explicit tool scope or permissions. This creates an avoidable trust gap: an agent may be allowed broader file access than the skill actually needs, increasing the chance of unintended file reads/writes or abuse if the skill is invoked with sensitive paths.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest description and the main heading/content are written in Chinese, which imposes a specific language presentation on users without any opt-in or stated regional constraint. Under the policy rule, language-specific behavior should either be optional or clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.