Back to skill

Security audit

Compliance Grader(医械合规评分器)

Security checks for vulnerabilities and agentic risk

Overview

The skill performs the advertised local compliance scoring and reporting, though its HTML input handling and bundled security assurances have limitations.

Use trusted scoring JSON and choose output paths carefully because existing files can be overwritten. Have product, market, and date fields HTML-escaped before processing third-party input or sharing its reports. Treat the bundled security assurances as outdated and compliance scores as self-assessment requiring professional review.

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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • 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 (5)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The shared eight-dimension, 0–5 scoring format does not establish functional alignment: the actual scoring targets metadata, documentation keywords, links, and filesystem hygiene, not medical-device compliance evidence. Although the filename identifies this as a security test and its JSON could support a separate renderer, the supplied code's primary behavior is a skill-package audit rather than the declared compliance grader. Its filesystem access is local, and there is no network access, credential use, or exfiltration evident in this chunk.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · 安全审计报告.md (reported line 28)May include surrounding context.

md
| 风险维度 | 检查结果 | 判定 |
|---|---|---|
| 命令执行 | 包内无任何自动执行的脚本命令(curl/wget/bash/pip/npm 均 0 命中) | ✅ 无风险 |
| 远程脚本下载执行 | 无 `curl \| bash`、base64 解码执行等模式 | ✅ 无风险 |
| 网络请求 | 外链全部指向官方域(),无任何自动网络行为 | ✅ 无风险 |
| 文件系统操作 | 无删除/移动/写盘指令 | ✅ 无风险 |
| 凭据访问 | 无读取 API key / token / 环境变量行为;敏感扫描 0 命中 | ✅ 无风险 |

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: file_read, file_write.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · medical-device-compliance-grader_security_test.py (reported line 117)May include surrounding context.

python
result = {
        "skill": "medical-device-compliance-grader",
        "version": re.search(r"^version:\s*[\"']?([\w.]+)", sk.split("---")[1], re.M).group(1),
        "timestamp_local": __import__("datetime").datetime.now().isoformat(timespec="seconds"),
        "scope": "本地闭环 · 零真实凭据 · 可重复",
        "dimensions": dims,
        "overall": round(overall, 2),

Package-cleanliness check ignores caches while reporting that no caches are present.

Low
Category
Excessive Agency
Confidence
98% confidence
Finding

The package-cleanliness check explicitly skips every entry under pycache, yet can report that no caches, binaries, or metadata are present. This creates a check-bypass and reporting-integrity weakness: cached artifacts can remain undetected while the package receives a clean score, although this alone does not demonstrate code execution.

Content

No source excerpt is available for this finding.