Back to skill

Security audit

Education

Security checks for vulnerabilities and agentic risk

Overview

This education skill mostly does what it says, but its bash script has a real input-validation flaw that can let crafted numeric options run local commands.

Review this skill before installing or using it with untrusted topics or option values. The publisher should add strict integer validation and bounds for --weeks, --count, --days, and --hours-per-day, and should make progress reset behavior clearer before this is treated as routine-safe.

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 (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/script.sh:26
Finding

Arbitrary Command Execution Through Unvalidated Bash Arithmetic Expressions

Content
View full analysis
Remediation
View remediation
maximum )); then echo "Invalid ${name}: expected an integer from 1 to ${maximum}" >&2 return 1 fi } ``` Apply validation to all affected options: ```bash validate_positive_integer "weeks" "$weeks" 520 || return 1 validate_positive_integer "count" "$count" 1000 || return 1 validate_positive_integer "days" "$days" 3660 || return 1 validate_positive_integer "hours-per-day" "$hours_per_day" 24 || return 1 ``` Additional hardening measures: 1. Use the `10#` prefix only after regex validation to force decimal interpretation and avoid unintended octal handling. 2. Reject zero, negative values, signs, whitespace, arithmetic operators, variable names, brackets, and command-substitution syntax. 3. Add upper bounds to prevent excessive CPU consumption or output generation from extremely large loop counts. 4. Check that every option requiring a value has a following argument before reading `$2`. 5. Consider moving numeric calculations and iteration into Python after strict conversion with `int()` and explicit range checks. 6. Add regression tests asserting that payloads containing `$()`, backticks, brackets, operators, variable names, negative values, and oversized integers are rejected without side effects. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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 (3)

Undeclared Tool Scope

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.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The skill states that progress data is stored in ~/.education/progress.json and supports a --reset action, but it does not clearly warn users that it persists data locally or that reset may delete existing progress. This can lead to unintended data retention or accidental loss, especially when invoked by an agent on a user's behalf.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The progress command persists user data to ~/.education/progress.json and supports destructive reset behavior, but the help text and command descriptions do not clearly warn users that local state will be created, modified, and potentially erased. This is not code execution or privilege escalation, but it can cause unintended data loss or surprise persistence, especially when invoked by an autonomous agent on a user's behalf.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.