Back to skill

Security audit

Pilot Task Template

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly aligned with reusable task templating, but its Bash examples can run unsafe substitutions and may send local template contents to an external Pilot agent without enough guardrails.

Review before installing or using. Only run these examples with trusted template names and trusted variable values, do not put secrets in prompts or templates unless the target Pilot agent is authorized to receive them, and prefer a safer template engine or strict placeholder validation instead of the shown sed and path-concatenation patterns.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:96
Finding

Environment-Controlled Template Values Permit GNU sed Command Execution

Content
View full analysis
/tmp/pilot-template-proof; #|e\n#' ``` The generated `sed` program becomes conceptually equivalent to: ```sed s|{{HEIGHT}}|; id >/tmp/pilot-template-proof; #|e #|g ``` ...[truncated 1639 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:75
Finding

Unvalidated Template Names Allow Directory Traversal and Arbitrary TXT File Disclosure

Content
View full analysis
Remediation
View remediation
&2 exit 1 ;; esac ``` Apply the same validation to `$1` inside `instantiate_template`. Further hardening should include: - Canonicalize the candidate path and verify that it remains beneath the canonical template directory. - Reject absolute paths, `.` and `..` components, slashes, backslashes, control characters, and embedded newlines. - Refuse symbolic links where feasible, or verify the canonical target after link resolution. - Check that the target is a regular file owned by an expected user and has safe permissions. - Use an explicit template registry rather than accepting arbitrary filesystem-derived names. - Present or log the canonical template path before submission. - Do not automatically transmit loaded file contents to an external agent without an explicit trust-boundary and destination check. - Add tests for `../`, absolute paths, nested traversal, encoded separators, and symlink escapes. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The example submits TASK_DESC, which is built from template content and user-supplied parameters such as PROMPT, to an external agent via pilotctl without warning that those values are transmitted off-host. Users may place sensitive prompts, model parameters, or operational data into the template variables and unknowingly disclose them to a remote service or agent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file includes shell examples that create or overwrite template files using redirection and mkdir in user-accessible locations. The skill description explains functionality but does not explicitly warn that using the examples will write files to disk.

Content

No source excerpt is available for this finding.