Back to skill

Security audit

Beamer Slide

Security checks for vulnerabilities and agentic risk

Overview

The Beamer skill is coherent and not malicious, but it needs review because it combines broad activation, shell compilation, file mutation, and a few under-scoped instructions.

Install only if you are comfortable with an agent editing Beamer projects and running LaTeX/PDF commands. Prefer explicit Beamer requests, confirm presenter/institute metadata, use safe filenames, avoid raw shell metacharacters in paths, and review any extracted files before they overwrite existing figures.

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)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:122
Finding
Command Injection Through Unsanitized File Arguments<![CDATA[ ## Vulnerability Details **File Locations**: - `SKILL.md:122-129` - `SKILL.md:785` - `AGENTS.md:91-97` - `references/review-actions.md:124-145` **Vulnerability Type**: Shell command injection through unquoted, unvalidated filename interpolation **Risk Level**: High ### Vulnerable Code From `SKILL.md:122-129`: ```bash # Adapt TEXINPUTS/BIBINPUTS to your project's preamble/bib locations xelatex -interaction=nonstopmode FILE.tex bibtex FILE xelatex -interaction=nonstopmode FILE.tex xelatex -interaction=nonstopmode FILE.tex ``` From `SKILL.md:785`: ```bash xelatex -interaction=nonstopmode FILE.tex ``` From `AGENTS.md:91-97`: ```bash xelatex -interaction=nonstopmode FILE.tex bibtex FILE xelatex -interaction=nonstopmode FILE.tex xelatex -interaction=nonstopmode FILE.tex ``` From `references/review-actions.md:124-145`: ```bash pdfinfo FILE.pdf | grep "Pages:" ``` ```bash pdfinfo FILE.pdf | grep "Page size:" ``` ```bash grep -c "Overfull \\\\hbox" FILE.log grep -c "Undefined control sequence" FILE.log grep -c "Citation.*undefined" FILE.log grep -c "multiply defined" FILE.log ``` ### Technical Analysis The `compile`, `visual-check`, and `validate` workflows place the user-provided `FILE` argument directly into shell command templates. The instructions do not require: - Validation that the path belongs to the intended workspace. - Rejection of shell metacharacters. - Shell-safe argument quoting. - Rejection of leading option characters. - Invocation through a structured argument array rather than a command string. If an agent implements these templates by textual substitution into a shell command, shell metacharacters embedded in the supplied argument can be interpreted as command syntax rather than as part of a filename. Quoting only selected suffixes would not be sufficient if the underlying filename remains concatenated into a shell expression. The issue affects several independently documented execution paths, including LaTeX compilation, PDF ...[truncated 1608 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Treat action arguments as untrusted data and resolve them through trusted file-selection or filesystem APIs before command execution. 2. Canonicalize the requested path and verify that it remains inside the intended project workspace. 3. Require the expected extension for each action, such as `.tex`, `.pdf`, or `.log`, rather than constructing paths from arbitrary shell text. 4. Reject control characters, shell metacharacters, and unexpected leading option characters. 5. Invoke tools through structured argument arrays without a shell whenever the runtime supports it. For example, pass `["xelatex", "-interaction=nonstopmode", file]` directly to the process API. 6. If a shell is unavoidable, place the complete variable inside robust quotes and use an option terminator where supported: ```bash xelatex -interaction=nonstopmode -- "$tex_file" bibtex -- "$bib_base" pdfinfo -- "$pdf_file" grep -c -- 'Undefined control sequence' "$log_file" ``` 7. Do not concatenate extensions after an unquoted variable. Construct and validate the complete path before invoking the command. 8. Use a dedicated temporary build directory with restricted permissions and prevent output paths from escaping it. 9. Document that agents must not substitute raw user input into the shown command templates. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:28
Finding
Unpinned Python Dependency Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:28-30` **Vulnerability Type**: Unpinned third-party dependency installation **Risk Level**: Medium ### Vulnerable Code ```yaml - name: PyMuPDF type: pip required: false description: "Python PDF renderer for visual-check action. Install via: pip install PyMuPDF" ``` ### Technical Analysis The skill recommends installing `PyMuPDF` without specifying a reviewed version, integrity hash, locked dependency set, or trusted package-index configuration: ```bash pip install PyMuPDF ``` This resolves to whichever release and transitive dependencies the configured package index serves at installation time. Consequently, the code installed in the user's environment can change after the skill has been audited. The package name is not identified in the audited content as a typosquat, and no malicious package behavior was observed. The confirmed weakness is the absence of reproducible version and integrity controls, which increases exposure to package-index compromise, maintainer compromise, dependency substitution, or incompatible future releases. ### Attack Path 1. A user attempts to use the optional `visual-check` action without PyMuPDF installed. 2. The user or agent follows the documented command `pip install PyMuPDF`. 3. Pip resolves the latest available package from its configured index without enforcing an audited version or artifact hash. 4. If the selected release, its build artifact, a transitive dependency, or the configured index has been compromised, attacker-controlled installation or runtime code is introduced. 5. That code executes with the privileges of the Python installation process or when the visual-check workflow imports `fitz`. ### Impact Assessment A compromised dependency can execute code with the privileges of the user or agent environment during installation or import. Potential impact includes: - Reading or modifying files accessible to that environment. - Accessing pr ...[truncated 310 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin PyMuPDF to a specific reviewed version rather than installing the latest release: ```text PyMuPDF==<reviewed-version> ``` 2. Store the dependency in a lock file or requirements file with hashes and install it using integrity enforcement: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 3. Record hashes for every supported distribution artifact and transitive dependency. 4. Explicitly configure the approved official package index and disable unintended extra indexes to reduce dependency-confusion exposure. 5. Install the package in an isolated virtual environment with only the permissions required for PDF rendering. 6. Periodically review and deliberately update the pinned version after checking release provenance, security advisories, and compatibility. 7. Prefer a prebuilt, trusted execution environment when available so the skill does not install dependencies dynamically during task execution. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The skill instructs the agent to default to a specific presenter format and institutional affiliation unless the user overrides it. This can cause the agent to insert false or unauthorized attribution into academic slides, creating reputational, misrepresentation, or policy/compliance issues when users do not explicitly request that affiliation.

Vague Triggers

Medium
Confidence
96% confidence
Finding
The trigger phrases are broad enough to match many generic presentation requests, which can cause the skill to activate outside its intended Beamer-only scope. Because this skill enables powerful tools including Bash, Write, Edit, Agent, and task orchestration, accidental invocation can lead to unnecessary file modification, command execution, or workflow hijacking in unrelated contexts. The risk is elevated by the large trigger surface and the skill's strong automation behavior.

Scope Creep

Medium
Confidence
96% confidence
Finding
The manifest declares allowed tools only as Read, Write, Edit, Bash, Grep, Glob, Agent, AskUserQuestion, and task tools, but the `extract-figures` workflow later instructs use of `mcp__pdf-mcp__pdf_get_toc`, `mcp__pdf-mcp__pdf_read_pages`, and `mcp__pdf-mcp__pdf_extract_images`. That is a concrete capability beyond the declared permission/tool surface.

Vague Triggers

Medium
Confidence
87% confidence
Finding
The invocation pattern '`review [file]` or `proofread [file]`' is described without any limiting context, negative examples, or scope constraints. In a markdown rules file, this can be considered an ambiguous trigger because terms like 'review' and 'audit' are common requests and the document does not clarify when these action names should or should not activate the skill.

Vague Triggers

Medium
Confidence
84% confidence
Finding
The file introduces action names like '`audit [file]`' as standalone commands, but does not document boundaries for activation beyond the placeholder syntax. Because this is a markdown file and the trigger guidance is sparse, users or systems may interpret everyday uses of 'audit', 'validate', or 'review' as skill invocations.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The `extract-figures` workflow explicitly instructs saving decoded images into the project's `figures/` directory, which is a filesystem-modifying action, but it does not require user confirmation or prominently warn that local files will be created or overwritten. In an agent setting, this can lead to unexpected workspace mutation, accidental overwrite of existing assets, or unauthorized file creation when a user expected analysis-only behavior.

Static analysis

No suspicious patterns detected.