Back to skill

Security audit

Qr Generator

Security checks for vulnerabilities and agentic risk

Overview

This QR-code skill is purpose-aligned and local-only, with some documentation and dependency hygiene issues users should understand before use.

Install and run this in a normal isolated Python environment when possible. Do not publish or broadly share WiFi QR images unless they are meant to grant network access, and consider using guest-network credentials. Expect PNG output from the provided implementation despite the broader format claims.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:7
Finding

Unpinned Third-Party Python Dependencies

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 7
Vulnerability Type: Supply-chain risk from mutable dependency resolution
Risk Level: Medium

Vulnerable Code

yaml
dependencies: "pip install qrcode pillow"

Technical Analysis

The skill instructs the environment to install qrcode and pillow from the active Python package index without pinning exact versions, validating cryptographic hashes, or using a reviewed lock file. Consequently, package selection and transitive dependency resolution may change between installations.

Python package installation can execute package-controlled build or installation logic. If a future package release, transitive dependency, configured package index, or distribution artifact is compromised, installation could execute attacker-controlled code. The two package names do not appear to be typographical imitations, and the audit found no evidence that the currently intended packages are malicious; the vulnerability is the absence of dependency integrity controls.

Attack Path

  1. An attacker compromises a dependency release, transitive dependency, package-index account, or package source used by pip.
  2. The agent or operator follows the skill metadata and runs pip install qrcode pillow.
  3. Pip resolves and downloads the mutable, unverified package version or artifact.
  4. Package build or installation logic executes with the privileges of the user running pip.
  5. Malicious code can then act within that user's filesystem, process, network, and credential-access boundaries.

Impact Assessment

Successful exploitation could permit arbitrary code execution with the privileges of the account performing installation. The resulting scope may include reading or modifying files accessible to that account, accessing inherited environment variables or credentials, making network requests, and altering the Python environment.

The reviewed skill itself does not request elevated privileges, esta ...[truncated 238 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin exact, security-reviewed versions of all direct dependencies.
  2. Resolve and lock all transitive dependencies in a committed requirements or lock file.
  3. Record and enforce cryptographic hashes for every permitted distribution artifact, for example:
text
qrcode==REVIEWED_VERSION --hash=sha256:REVIEWED_HASH
Pillow==REVIEWED_VERSION --hash=sha256:REVIEWED_HASH
  1. Install with hash enforcement:
bash
python3 -m pip install --require-hashes -r requirements.txt
  1. Use a trusted, explicitly configured package index or an internally controlled artifact repository.
  2. Prefer pre-reviewed binary wheels where appropriate and prevent unexpected source builds.
  3. Run installation and QR generation as an unprivileged user in an isolated virtual environment or sandbox.
  4. Add automated dependency vulnerability, provenance, and integrity checks to the release process.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest says the skill supports PNG/SVG, and the feature list adds PDF output, but the implementation always creates a StyledPilImage, converts it to RGBA, and saves it with PIL. There is no branch or image factory for SVG generation and no explicit PDF-generation logic in the code.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

WiFi QR codes encode SSID and password in a directly scannable plaintext-derived format, making the resulting image a portable credential artifact. Without a clear warning, users may share, print, or store these QR codes insecurely, unintentionally disclosing network access to unauthorized parties.

Content

No source excerpt is available for this finding.

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · LICENSE.txt (reported line 12)May include surrounding context.

text
permit persons to whom the Software is furnished to do so.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The styling section shows gradient color mask usage as an available option, but the generator's _generate method only accepts fill_color/back_color and always constructs a SolidFillColorMask. This is an active mismatch between documented capability and implemented behavior, not just omitted detail.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.