Back to skill

Security audit

Divination

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent divination toolkit, but its shell scripts can run unintended commands when given crafted numeric inputs, so it needs review before installation.

Install only if you are comfortable with a skill that runs local shell scripts, and avoid passing user-supplied dice sizes or impulse counts until the scripts validate integers before arithmetic use. Treat the readings as spiritual or entertainment content, not medical, mental-health, legal, or financial advice; also expect much of the reference material and output to be in German.

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
scripts/divine.sh:7
Finding

Command Injection Through Unvalidated Dice Argument

Content
View full analysis
&2; exit 1 fi local result=$(($(rand $n) + 1)) echo "🎲 Würfel (1-${n}): ${result}" } ``` ### Technical Analysis The `dice` function accepts its first argument from the command line and uses it directly in Bash arithmetic contexts: ```bash [[ $n -lt 1 ]] ``` The value is subsequently passed to `rand`, assigned to `max`, and evaluated again: ```bash $(( ... % max )) ``` Bash arithmetic operands are expressions rather than strictly parsed integers. Arithmetic evaluation can recursively resolve variable names and array subscripts. A malicious expression containing an array reference with a command substitution in its subscript can therefore cause Bash to execute that substitution while evaluating the expression. The minimum-value check does not provide input validation because it is itself an arithmetic evaluation sink. The payload may consequently be evaluated before the script decides whether the requested number of dice sides is valid. ### Attack Path 1. An attacker influences the arguments used when the Agent invokes the documented `dice` operation. 2. The attacker supplies an arithmetic expression instead of a decimal integer as the second command-line argument: ```bash bash scripts/divine.sh dice '' ``` 3. `divine.sh` assigns the expression to `n` without validating its syntax. 4. Bash evaluates the attacker-controlled value in `[[ $n -lt 1 ]]`. 5. If the expression contains a command substitution through a recursively evaluated arithmetic construct, that command runs with the privi ...[truncated 1114 chars]
Remediation
View remediation
&2 return 1 fi if (( n < 1 || n > 1000000 )); then echo "Dice size must be between 1 and 1000000." >&2 return 1 fi local result result=$(( $(rand "$n") + 1 )) printf '🎲 Dice (1-%d): %d\n' "$n" "$result" } ``` Harden `rand` independently so it remains safe if called from another function: ```bash rand() { local max=${1-} if [[ ! $max =~ ^[0-9]+$ ]] || (( max < 1 || max > 1000000 )); then echo "Invalid random-number bound." >&2 return 1 fi local value value=$(od -An -tu4 -N4 /dev/urandom | tr -d ' ') printf '%d\n' "$(( value % max ))" } ``` Additional hardening measures: 1. Enforce a reasonable maximum to prevent overflow and unexpected resource use. 2. Use `return 1` inside functions rather than terminating the entire calling process with `exit`. 3. Add regression tests covering alphabetic input, signs, whitespace, arithmetic operators, array syntax, command-substitution syntax, zero, and excessively large values. 4. Treat all values entering Bash arithmetic expansion as untrusted until they pass strict lexical validation. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/intuition.sh:87
Finding

Command Injection Through Unvalidated Impulse Count

Content
View full analysis
' ``` 3. The script stores the expression in `count` without lexical validation. 4. The first comparison, `[[ $count -gt 5 ]]`, invokes Bash arithmetic evaluation. 5. A command substitution embedded through a recursively evaluated arithmetic construct e ...[truncated 1206 chars]
Remediation
View remediation
&2 exit 1 fi if (( count > 5 )); then count=5 elif (( count < 1 )); then count=1 fi ``` Alternatively, reject out-of-range values instead of silently clamping them: ```bash if [[ ! $count =~ ^[1-5]$ ]]; then echo "Count must be an integer from 1 through 5." >&2 exit 1 fi ``` The `rand` helper should also validate its input independently: ```bash rand() { local max=${1-} if [[ ! $max =~ ^[0-9]+$ ]] || (( max < 1 )); then echo "Invalid random-number bound." >&2 return 1 fi local value value=$(od -An -tu4 -N4 /dev/urandom | tr -d ' ') printf '%d\n' "$(( value % max ))" } ``` Additional hardening measures: 1. Never rely on arithmetic comparisons as input validators. 2. Reject signs, whitespace, operators, variable names, array syntax, and command-substitution syntax. 3. Add automated tests for malformed values and shell metacharacters. 4. Keep internal arithmetic operands separate from raw positional parameters. 5. Run the Skill with least privilege so exploitation cannot access unrelated files or credentials. ]]>
Vulnerability Patterns
  • 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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (9)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file presents spiritual and healing-oriented guidance, including invoking 'The Healer' for physical, emotional, or spiritual healing, without any disclaimer that this is not medical or mental-health advice. In a user-facing skill, this can cause vulnerable users to substitute ritual or spiritual practices for professional care, especially when the language is framed as practical help rather than fiction or entertainment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file presents all user-facing content exclusively in German, and there is no indication that users can opt into another language or that the skill is intentionally limited to German-speaking contexts. The policy explicitly flags language or locale constraints when they are forced without user choice or clear justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The entire skill content is written in German and does not indicate that users may choose another language or that the skill is intentionally restricted to a German-speaking audience. Under the policy rule, forcing a specific language without opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file presents all user-facing content in a single language, which can violate language/locale policy when no opt-in or alternative is provided. There is no indication that the skill is intentionally region-specific or that users can select another language.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The 'The Guru' invocation uses vague language like needing guidance or applying spiritual insights in daily life, which can match many ordinary user requests. While not inherently harmful, underspecified routing may cause the skill to respond in esoteric terms where practical, domain-appropriate advice is expected.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The invocation for 'The Healer' is broad enough to overlap with common user requests for help with illness, distress, or recovery. Because it is not scoped to symbolic or spiritual practice, an agent could inappropriately route everyday health-seeking behavior into occult or non-professional guidance.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The 'The Messenger' trigger is framed around needing clear communication or paying attention to signs and messages, which is broad and could capture routine requests about relationships, work, or decision-making. In an agent setting, this increases the chance of inappropriate invocation of mystical framing for normal assistance requests.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This file contains user-facing natural language exclusively in German, and there is no indication that the skill is region-specific or that users can opt into that language. Under the language/locale policy rule, forcing a specific language without opt-in can be a policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file's comments and all user-facing output strings are in German, which effectively forces a specific language on users. The policy allows locale constraints only when they are explicitly justified or when users are offered a language choice, neither of which appears here.

Content

No source excerpt is available for this finding.