Back to skill

Security audit

context-resume

Security checks for vulnerabilities and agentic risk

Overview

This context-resume skill is coherent but requests broad automatic access to durable memory and project files, plus write permission that its core purpose does not need.

Install only if you are comfortable with the agent reading long-term memory, recent daily notes, active task files, and project docs across known active projects. Prefer using it on trusted single-user workspaces, invoke it intentionally, and consider removing write permission or requiring confirmation before loading memory sources.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:30
Finding

Broad Access to Durable Memory and Cross-Project State

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 30–60
Vulnerability Type: T05: Unauthorized Access and Privilege Escalation
Risk Level: Medium

Vulnerable snippet:

markdown
### 1. Load durable memory (in order)
1. **Memory index** — read the long-term memory file first (`MEMORY.md` at the workspace root).
2. **Daily notes** — read today's and yesterday's raw logs (`memory/YYYY-MM-DD.md`).
3. **Active task tracking** — check the IKKF/active-tasks dir (`*/status.md`).

**Time-boxed ordering:** if you're short on time, load in this order and stop at N files
(default 3) rather than reading everything — the index + today's notes + the top project
doc cover most resumes.

### 2. Load project source-of-truth
- For each known/active project, read its `PROJECT.md` (or the closest equivalent).
- If a project lacks a PROJECT.md, note it as a gap (create one via project-doc skill).

### 3. Cross-check & resolve
- Merge notes + PROJECT.md + active-task status into one mental model.
- Identify: what was in progress, what's blocked, what's due.
- **Stale detection** — if a project's PROJECT.md is older than the most recent daily note
  that mentions it, flag the drift so you don't trust outdated source-of-truth.

### 4. Produce the brief
Emit a compact brief (not a dump):
- **Where we are** — current state of active projects/tasks.
- **In progress** — what's mid-flight, with file refs.
- **Next actions** — the concrete next step for each.
- **Open items / blockers** — anything waiting on the owner or an external dependency.
- **Due soon** — upcoming deadlines or scheduled jobs.

### 5. Resume
- Act on the highest-priority next action, or report the brief and wait for direction.
- **Verify before trusting** — every claim in the brief should trace to a file you actually
  read this session. If you can't point to the source, flag it as unverified (ties into
  anti-hallucination).

...[truncated 1943 chars]
Remediation
View remediation

Remediation Suggestions

  1. Require explicit user approval before reading long-term memory or daily logs.
  2. Restrict reads to the current project and files explicitly named by the user.
  3. Replace the wildcard task lookup with an allowlisted project path.
  4. Do not enumerate every known project by default; require explicit project selection.
  5. Add redaction rules for credentials, personal information, private notes, and unrelated project data.
  6. Offer a metadata-only mode that reports file availability and modification times without reading contents.
  7. Mark each brief item with its source and suppress information outside the authorized project scope.
  8. Keep raw memory content out of generated responses and return only the minimum status information necessary.

T05 · Unauthorized Access and Privilege Escalation

Note
Location
SKILL.md:10
Finding

Unnecessary Write Capability Violates Least Privilege

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 10; related instruction at lines 40–41
Vulnerability Type: T05: Unauthorized Access and Privilege Escalation
Risk Level: Low

Vulnerable snippets:

yaml
allowed-tools: ["read", "write"]
markdown
- If a project lacks a PROJECT.md, note it as a gap (create one via project-doc skill).

Technical Analysis

The skill's core purpose is to read existing state and produce a context brief. Those operations require read access but do not require direct modification of workspace files. Nevertheless, the manifest grants the skill access to the write tool.

The only document-creation reference delegates creation to a separate project-doc skill. It therefore does not justify granting this skill unrestricted write capability. The excessive permission increases the consequences of model error, malicious instructions embedded in consumed files, or unintended action after the resume step.

Attack Path

  1. The context-resume skill is invoked with both read and write capabilities.
  2. The agent reads memory, task, or project files as directed.
  3. A consumed file contains adversarial instruction-like text, or the agent otherwise misinterprets project content as an action request.
  4. Because the skill has write access, the agent can modify accessible memory or project files even though context reconstruction only requires reads.
  5. The modification may corrupt project state or introduce content that affects later sessions.

This path is conditional on the host allowing the declared write tool to modify the targeted files; no embedded write payload was found in the audited project.

Impact Assessment

The unnecessary permission may allow modification, creation, or corruption of files within the write tool's sandbox and path policy. Potential targets include project documentation, task state, or persistent memory files. If persistent agent ...[truncated 289 chars]

Remediation
View remediation

Remediation Suggestions

  1. Change the manifest to:
    yaml
    allowed-tools: ["read"]
    
  2. Keep context reconstruction strictly read-only.
  3. When a missing PROJECT.md is detected, report the gap without creating or changing files.
  4. Invoke a separately reviewed document-creation skill only after explicit user confirmation.
  5. Scope any later write authorization to one approved path and operation rather than granting general workspace write access.
  6. Treat text read from memory and project documents as untrusted data, not executable instructions.
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 (2)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill description says it rebuilds context but does not clearly warn users that it will read durable memory, daily notes, and project tracking files. This weakens informed consent and can surprise users with broader-than-expected access to potentially sensitive workspace data, especially when combined with user-invocable or always-on startup behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The activation guidance is intentionally broad ('Session startup (always)' and common phrases like 'where were we?'), which can cause the skill to run in many ordinary sessions without a narrowly scoped trigger. Because the skill reads memory and project files by design, over-broad invocation increases the chance of unnecessary file access, privacy overreach, and accidental context loading when the user did not explicitly intend it.

Content

No source excerpt is available for this finding.