Back to skill

Security audit

Agent Context

Security checks for vulnerabilities and agentic risk

Overview

This skill’s local memory workflow is mostly coherent, but it also includes under-scoped publishing and auto-promotion paths that can persist or upload sensitive project context.

Install only if you are comfortable with a persistent local scratchpad being read by future agent sessions. Review scratchpad entries before saving them, do not store secrets or private customer data, avoid --autopromote, and do not run publish-template.sh from any directory containing unrelated files or credentials.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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/publish-template.sh:23
Finding

Sensitive Files Can Be Committed and Uploaded to GitHub

Content
View full analysis
/dev/null || true) if [ -n "$sensitive_files" ]; then echo "⚠️ Potentially sensitive files detected:" echo "$sensitive_files" echo "" read -rp "Continue anyway? (y/N) " confirm [[ "$confirm" =~ ^[Yy]$ ]] || exit 1 fi git add -A git commit -m "Initial commit: agent context system template" 2>/dev/null || true gh repo create "$GH_USER/$REPO_NAME" \ --private \ --source=. \ --remote=origin \ --description "Template: persistent local-only memory for AI coding agents" \ --push ``` ### Technical Analysis The script searches for several sensitive filename patterns, but detection only produces an overridable warning. If the user confirms, `git add -A` stages the entire working tree, including the files that triggered the warning. The resulting commit is then uploaded through `gh repo create --push`. The check is also incomplete: - It only searches to a maximum depth of two directories. - It relies on a limited list of filename patterns. - It does not inspect file contents for credentials or tokens. - It does not verify the final staged-file list. - It does not enforce an allowlist of files required for the template. - It suppresses commit errors, making the resulting repository state less transparent. Creating a private repository does not eliminate the exposure. The files are still transferred to GitHub, become accessible to authorized repository users and integrations, and remain in Git history unless the history is explicitly rewritten. The static pre-scan characterized this behavior as writing to SSH key files. That characterization is inaccurate: th ...[truncated 1656 chars]
Remediation
View remediation

T02 · Agent Memory Poisoning

Warning
Location
AGENTS.md:68
Finding

Mutable Scratchpad Content Can Be Persisted into Always-Loaded Agent Instructions

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (25)

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · AGENTS.md (reported line 3)May include surrounding context.

md
# AGENTS.md

<!-- Keep this file under 120 lines. Every line loads into every session. -->
<!-- Passive context > active retrieval. Put critical knowledge HERE, not in separate files. -->

## Project

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is marketed as a 'local-only' system with no infrastructure, yet it also documents a publish workflow that creates and pushes a GitHub repository and marks it as a template. That mismatch can mislead users and downstream agents into treating the skill as non-networking and low-risk, reducing scrutiny around commands that perform remote actions and potentially publish local content.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The design instructs agents to persist 'what it learns each session' into a personal scratchpad, which creates a clear pathway for storing sensitive prompts, credentials, proprietary code details, or personal preferences beyond the original interaction. Because the memory is intended for reuse, any sensitive content captured once may later be reintroduced unexpectedly in unrelated tasks.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

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

bash .agents/skills/agent-context-system/scripts/init-agent-context.sh

text

Or copy `github-copilot/SKILL.md` to `.github/skills/agent-context-system/SKILL.md`.

### GitHub Template

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Presenting agent-context promote --autopromote as auto-appending recurring patterns into AGENTS.md is risky because AGENTS.md is committed shared instruction context. Without a prominent warning and review gate, mistakes or sensitive local notes could be transformed into durable project instructions and propagated to collaborators and future agents.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The write/compress/flag/promote workflow creates an escalation path from private local notes into a shared committed file. If session logs contain sensitive implementation details, credentials, incident data, or internal business context, repeated mentions could cause that information to be promoted into AGENTS.md and broadly exposed to teammates, future agents, and version control history.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The operational loop 'agent reads both files, works, updates scratchpad' reinforces persistent collection and reuse of user and project context without clear privacy boundaries or consent checkpoints. In a memory-oriented skill, that increases the likelihood of over-collection and unintended resurfacing of sensitive information in future sessions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill describes persistent memory behavior but does not prominently warn that the agent may automatically append project/session information to a local scratchpad. In a security-sensitive repo, that can capture secrets, proprietary code details, or user instructions into a durable file that may later be read by future agent sessions or accidentally exposed.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Repository creation and publishing are outside the narrow purpose of a local agent memory system, so bundling them without strong justification broadens the capability and attack surface. In context, the extra capability increases the chance of accidental remote disclosure of code or sensitive project material if a user or agent follows the documentation uncritically.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest-level claim of 'local-only' and 'no background processes' is materially undermined by documented behavior that creates a remote GitHub repo and pushes content. Even if optional, this inconsistency can cause users or agents to underestimate data egress risk and execute publication steps without appropriate review.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill directs the agent to run a setup script and modify .gitignore without explicitly requiring user-facing notice or confirmation before repository changes. In an agent context, silent edits to version-controlled files can violate user expectations, introduce unwanted config drift, and normalize unauthorized workspace modification.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · AGENTS.md (reported line 74)May include surrounding context.

md
1. Read `AGENTS.md` and `.agents.local.md` (if it exists) before starting any task
2. Follow project conventions and boundaries defined in compressed format
3. **At session end, append to `.agents.local.md` Session Log.** This is the most commonly missed step. If the user appears to be ending the session without asking you to log, proactively offer to update the scratchpad.
   - Done: (what changed)
   - Worked: (reuse this)
   - Didn't work: (avoid this)

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · github-copilot/SKILL.md (reported line 72)May include surrounding context.

md
1. Read `AGENTS.md` and `.agents.local.md` (if it exists) before starting any task
2. Follow project conventions and boundaries defined in compressed format
3. **At session end, append to `.agents.local.md` Session Log.** This is the most commonly missed step. If the user appears to be ending the session without asking you to log, proactively offer to update the scratchpad.
   - Done: (what changed)
   - Worked: (reuse this)
   - Didn't work: (avoid this)

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.

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.

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.

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.

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.

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.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest describes the skill as a "persistent local-only memory system" with "no plugins, no infrastructure, no background processes." This script creates a GitHub repository, pushes local contents to it, and modifies repository settings via the GitHub API, which goes beyond purely local-only operation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The README normalizes automatic reads and writes to .agents.local.md without clearly warning that session-derived content may persist across future interactions. In an agent memory system, this can cause accidental retention of secrets, personal data, or sensitive project context that later gets surfaced to the model or copied elsewhere.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The instruction says session-end logging may depend on the user saying "log this session," but it does not define whether that exact phrase is required, when it applies, or what nearby phrases should not trigger the behavior. In a markdown skill description, this kind of broad natural-language invocation can cause unintended activation because it resembles normal conversational text rather than a narrowly scoped command.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The manifest describes a local-only persistent memory system centered on two markdown files, but the instructions also tell the agent to run an initialization script that 'wire[s] up agent tool configs.' Invoking terminal-driven setup and modifying multiple agent configuration files is a broader capability than the narrow memory-purpose description suggests.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The instruction 'When a user asks about setting up agent context' is a natural-language trigger description in a markdown file, but it does not define specific trigger phrases, scope boundaries, or negative examples. Because 'setting up agent context' is broad and could overlap with general discussion or planning, the skill may be invoked in situations where the user did not intend to run this workflow.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The stated purpose is a persistent local-only memory pattern using AGENTS.md and .agents.local.md, but the documented resources advertise a broader script suite including validate and publish operations. 'Publish' especially implies capabilities beyond maintaining local session memory and could lead agents to perform repo-wide or distribution actions outside the core purpose.

Content

No source excerpt is available for this finding.