Back to skill

Security audit

iwork2md

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward local iWork-to-Markdown converter, with the main risk being resource exhaustion on malicious or very large documents.

Install only if you need local conversion of Apple iWork files. Use it on files you intentionally provide, avoid untrusted oversized documents unless your agent runner enforces memory and time limits, and prefer --stdout or an explicit output path so you know where converted content is written.

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

Warning
Location
scripts/iwa.py:82
Finding

Unbounded Archive and Snappy Decompression Enables Denial of Service

Content
View full analysis
bytes: """Decompress a *raw* Snappy stream (uncompressed-length varint prefix).""" if not raw: return b"" pos = 0 length, pos = read_varint(raw, pos) out = bytearray() n = len(raw) while pos < n: tag = raw[pos] pos += 1 typ = tag & 0x03 if typ == 0: # literal lenfield = tag >> 2 if lenfield < 60: l = lenfield + 1 else: num = lenfield - 59 # 1..4 bytes for the length l = 0 for i in range(num): l |= raw[pos] << (8 * i) pos += 1 l += 1 out += raw[pos:pos + l] pos += l else: # copy (back-reference) if typ == 1: # 1-byte offset cplen = ((tag >> 2) & 0x07) + 4 offset = ((tag >> 5) << 8) | raw[pos] pos += 1 elif typ == 2: # 2-byte offset cplen = (tag >> 2) + 1 offset = raw[pos] | (raw[pos + 1] << 8) pos += 2 else: # typ == 3: 4-byte offset cplen = (tag >> 2) + 1 offset = (raw[pos] | (raw[pos + 1] << 8) | (raw[pos + 2] << 16) | (raw[pos + 3] << 24)) pos += 4 if offset == 0 or offset > len(out): raise ValueError("invalid Snappy copy offset") start = len(out) - offset for i in range(cplen): out.append(out[start + i]) if len(out) != length: ...[truncated 4697 chars]
Remediation
View remediation
MAX_SNAPPY_OUTPUT: raise ValueError("Snappy output exceeds configured limit") ``` The implementation must additionally check growth before every append because the declared length itself is attacker-controlled and malform ...[truncated 53 chars]
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
Findings (14)

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 53)May include surrounding context.

python3 scripts/iwork2md.py path/to/document.numbers

text

Write to a specific output path:

```bash
python3 scripts/iwork2md.py path/to/deck.key output.md

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README advertises very broad trigger phrases like 'read that Keynote file' and 'extract text from my Numbers sheet', which can match common user language and cause the skill to activate when the user did not intend this specific converter. In an agent environment, unintended invocation can expose document contents to the skill pipeline or cause surprising file processing behavior.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill instructs use of local file reads and writes but does not declare any explicit tool scope or permission boundaries. In an agent environment, undeclared file access can lead to over-broad execution, accidental exposure of unrelated local files, or writing output to unintended locations if the runtime grants more access than the skill documents.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 52)May include surrounding context.

md
├── Data/                   (embedded media: images, video, etc.)
│   └── 143917994_2881x1992-small.jpg
├── Metadata/
│   ├── Properties.plist    (title / metadata)
│   ├── DocumentIdentifier
│   └── BuildVersionHistory.plist
├── preview.jpg             (preview thumbnails, top level)

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 64)May include surrounding context.

md
├── Data/                   (embedded media: images, video, etc.)
│   └── 143917994_2881x1992-small.jpg
├── Metadata/
│   ├── Properties.plist    (title / metadata)
│   ├── DocumentIdentifier
│   └── BuildVersionHistory.plist
├── preview.jpg             (preview thumbnails, top level)

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/FORMAT.md (reported line 16)May include surrounding context.

md
├── Data/                   (embedded media: images, video, etc.)
│   └── 143917994_2881x1992-small.jpg
├── Metadata/
│   ├── Properties.plist    (title / metadata)
│   ├── DocumentIdentifier
│   └── BuildVersionHistory.plist
├── preview.jpg             (preview thumbnails, top level)

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/FORMAT.md (reported line 18)May include surrounding context.

md
├── Data/                   (embedded media: images, video, etc.)
│   └── 143917994_2881x1992-small.jpg
├── Metadata/
│   ├── Properties.plist    (title / metadata)
│   ├── DocumentIdentifier
│   └── BuildVersionHistory.plist
├── preview.jpg             (preview thumbnails, top level)

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/iwa.py (reported line 40)May include surrounding context.

python
├── Data/                   (embedded media: images, video, etc.)
│   └── 143917994_2881x1992-small.jpg
├── Metadata/
│   ├── Properties.plist    (title / metadata)
│   ├── DocumentIdentifier
│   └── BuildVersionHistory.plist
├── preview.jpg             (preview thumbnails, top level)

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/iwa.py (reported line 515)May include surrounding context.

python
├── Data/                   (embedded media: images, video, etc.)
│   └── 143917994_2881x1992-small.jpg
├── Metadata/
│   ├── Properties.plist    (title / metadata)
│   ├── DocumentIdentifier
│   └── BuildVersionHistory.plist
├── preview.jpg             (preview thumbnails, top level)

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/iwa.py (reported line 517)May include surrounding context.

python
├── Data/                   (embedded media: images, video, etc.)
│   └── 143917994_2881x1992-small.jpg
├── Metadata/
│   ├── Properties.plist    (title / metadata)
│   ├── DocumentIdentifier
│   └── BuildVersionHistory.plist
├── preview.jpg             (preview thumbnails, top level)

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/iwa.py (reported line 520)May include surrounding context.

python
├── Data/                   (embedded media: images, video, etc.)
│   └── 143917994_2881x1992-small.jpg
├── Metadata/
│   ├── Properties.plist    (title / metadata)
│   ├── DocumentIdentifier
│   └── BuildVersionHistory.plist
├── preview.jpg             (preview thumbnails, top level)

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/iwa.py (reported line 527)May include surrounding context.

python
├── Data/                   (embedded media: images, video, etc.)
│   └── 143917994_2881x1992-small.jpg
├── Metadata/
│   ├── Properties.plist    (title / metadata)
│   ├── DocumentIdentifier
│   └── BuildVersionHistory.plist
├── preview.jpg             (preview thumbnails, top level)

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/iwa.py (reported line 532)May include surrounding context.

python
├── Data/                   (embedded media: images, video, etc.)
│   └── 143917994_2881x1992-small.jpg
├── Metadata/
│   ├── Properties.plist    (title / metadata)
│   ├── DocumentIdentifier
│   └── BuildVersionHistory.plist
├── preview.jpg             (preview thumbnails, top level)

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/iwa.py (reported line 534)May include surrounding context.

python
├── Data/                   (embedded media: images, video, etc.)
│   └── 143917994_2881x1992-small.jpg
├── Metadata/
│   ├── Properties.plist    (title / metadata)
│   ├── DocumentIdentifier
│   └── BuildVersionHistory.plist
├── preview.jpg             (preview thumbnails, top level)

Static analysis

No suspicious patterns detected.