Back to skill

Security audit

萤火蓝二维码工具

Security checks for vulnerabilities and agentic risk

Overview

This QR-code skill does the advertised job, but it automatically installs unpinned Python packages and can overwrite any writable file path the agent is told to use.

Review before installing. Use this only in an isolated or managed Python environment, preinstall reviewed dependencies yourself, and avoid letting untrusted instructions choose the output path. Treat any requested save location as a real filesystem write that may create directories or replace an existing file.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T08 · Insecure Dependencies

Warning
Location
scripts/agent.py:7
Finding

Unpinned Dependency Installation Through pip

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/agent.py:50
Finding

User-Controlled Save Path Permits Arbitrary Writable-File Overwrite

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This skill performs automatic package installation for a basic QR utility, which is unnecessary for core functionality and increases attack surface. In an agent/skill context, silently modifying the environment and pulling code from package repositories can expose the host to supply-chain compromise, unexpected network access, and persistence of unreviewed code.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Executing pip automatically without prior warning or consent is unsafe because it performs network-enabled code acquisition and changes the local Python environment as a side effect of loading the skill. In a security-sensitive agent ecosystem, such hidden installation behavior is especially dangerous because users may not expect a QR generator to reach out to external repositories or alter the host.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Comments, docstrings, and all returned user-facing status/error messages are written in Chinese, with no indication that the user can choose another language. This creates a language/locale policy concern because the skill implicitly forces a specific language without opt-in or documented justification.

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 · scripts/agent.py (reported line 13)May include surrounding context.

python
required_packages = ["qrcode", "pillow"]
    for package in required_packages:
        try:
            __import__(package)  # 检查库是否已安装
        except ImportError:
            # 自动安装缺失的库
            subprocess.check_call([sys.executable, "-m", "pip", "install", package])

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
95% confidence
Finding

The script invokes pip automatically via subprocess at import/initialization time, causing code from external packages to be fetched and installed without user confirmation. Even though shell injection is not present because arguments are passed as a list, this still expands the skill's privileges and creates a supply-chain and unauthorized system modification risk inappropriate for a simple QR generator.

Content

Scanner excerpt · scripts/agent.py (reported line 16)May include surrounding context.

python
__import__(package)  # 检查库是否已安装
        except ImportError:
            # 自动安装缺失的库
            subprocess.check_call([sys.executable, "-m", "pip", "install", package])

# 初始化:安装依赖库
install_dependencies()