Back to skill

Security audit

context-surfing

Security checks for vulnerabilities and agentic risk

Overview

This skill is not clearly malicious, but it adds automatic workflow control, persistent handoff files, and an optional per-prompt hook that users should review before installing.

Install only if you intentionally want automatic context-continuity behavior. Review the hook before enabling it, avoid storing secrets or proprietary details in handoff files, pin the installer/source revision where possible, and treat any existing .context-surfing handoff file as untrusted until the user confirms it should be loaded.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

T01 · Skill Instruction Hijacking

Error
Location
scripts/handoff-checker.sh:14
Finding

Persistent Handoff Files Enable Cross-Session Instruction Injection

Content
View full analysis
/dev/null) if [ -z "$HANDOFF_FILES" ]; then exit 0 fi # Count handoff files COUNT=$(echo "$HANDOFF_FILES" | wc -l | tr -d ' ') cat << EOF Found ${COUNT} unread handoff file(s) from a previous context-surfing session: $(echo "$HANDOFF_FILES" | while read -r f; do echo "- $f"; done) Before starting new work, you MUST: 1. Read the handoff file(s) completely 2. Ask the user if they want to resume from the handoff or start fresh 3. If resuming: run plan-interview with the handoff as input, re-establish the intent frame, then pick up context-surfing 4. If starting fresh: confirm with the user, then delete or archive the handoff file(s) Do not ignore handoff files — they contain session state from a previous context exit. EOF ``` The Skill also mandates creation of handoff files containing task and session state: ```markdown Create a file named `.context-surfing/handoff-[slug]-[timestamp].md` (create the `.context-surfing/` directory if it doesn't exist). Add `.context-surfing/` to `.gitignore` ``` ### Technical Analysis The hook treats every non-empty file matching `.context-surfing/handoff-*.md` as trusted session state. It does not verify file ownership, provenance, integrity, permissions, or whether the file was generated by a legitimate prior session. The emitted hook message then uses mandatory language requiring the agent to read these files completely. A repository contributor, compromised local process, or other actor able to write into the project can therefore create a hand ...[truncated 1875 chars]
Remediation
View remediation

T06 · System Persistence

Error
Location
SKILL.md:341
Finding

Repository-Controlled Script Is Installed as a Persistent Per-Prompt Hook

Content
View full analysis
Remediation
View remediation

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:49
Finding

Skill Self-Activation and Precedence Rules Can Override the Current Workflow

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:10
Finding

Installation Command Uses Unpinned Remote Dependencies

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The skill is described as passive context-quality monitoring, but it also prescribes filesystem inspection, persistent handoff storage, and prompt-hook execution. That mismatch is security-relevant because operators may authorize it under a narrower trust model than its actual behavior, causing unintended local-state access and automation to be enabled without informed consent.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill declares itself active automatically for broadly defined multi-step tasks, even without explicit user invocation. Overly broad activation is dangerous in agent systems because it can silently introduce extra behaviors—filesystem scanning, transcript persistence, hook guidance, and handoff creation—into ordinary workflows where the user did not intend those data-handling or automation steps.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `SKILL.md` files for any skill being invoked alongside this one

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The handoff protocol explicitly tells the agent to copy task descriptions, intent frames, plans, completed work, and active context file details verbatim into persistent local files. That is dangerous because these artifacts can contain sensitive instructions, internal architecture, code details, credentials accidentally present in prompts, or other confidential project context, all of which become durable and discoverable on disk.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file states the skill is live as soon as intent frame and plan are established, but also provides a standalone mode when neither exists. This blurs the distinction between required and optional prerequisites, so the effective activation boundary is unclear.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill encourages persistent capture and reuse of session artifacts via Entire CLI transcripts and handoff files, including prompts, tool calls, file modifications, and checkpoints. In a security context, that creates a real data leakage risk because sensitive user input, secrets, proprietary code context, or operational details may be recorded and later surfaced to other sessions, tools, or agents beyond the original need-to-know boundary.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The manifest frames this skill as monitoring context quality, staying active through execution, and handing off cleanly on drift. Directing the agent to spawn a context-monitor subagent introduces an additional orchestration capability that is not an obvious requirement of passive context monitoring or handoff, and it is not declared in the manifest scope.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs users to install an automatic UserPromptSubmit hook that runs a local script on every prompt, which is a persistent execution surface not clearly bounded by the core context-monitoring description. Hook-based automation can process every future interaction, creating an ongoing opportunity for over-collection, unintended command execution, or abuse if the script is modified or replaced.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.