Back to skill

Security audit

Agent Context System

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed local memory template, but it includes risky repository-publishing and persistent-instruction workflows that deserve manual review before installation.

Install only if you want agents to maintain persistent project memory in your repository. Review proposed .agents.local.md entries before writing, avoid storing secrets or private incident details, manually review any AGENTS.md promotion, and do not run scripts/publish-template.sh from a working tree that may contain credentials or private files.

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

Warning
Location
scripts/publish-template.sh:23
Finding

Sensitive Files Can Be Staged 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 attempts to identify sensitive files, including environment files, PEM files, private keys, secrets, and SSH private-key filenames. It does not write to or modify SSH keys; the pre-scan warning is caused by filename matching. The security issue is that detection only produces a warning. A user can continue despite detected secrets, after which `git add -A` stages all non-ignored content and `gh repo create --push` uploads the resulting commit. The scan is also incomplete: - It only searches to a maximum depth of two directories. - It relies on a limited set of filename patterns. - It does not inspect the actual staged file set. - It does not scan file contents for tokens or credentials. - It does not explicitly verify that `.agents.local.md` is ignored. - It stages the entire working tree instead of an allowlist of intended template files. Creating the repository as private reduces public exposure, but uploaded secrets remain available to repository collaborators, installed GitHub applications, automation, backups, and anyone who later receives access. Se ...[truncated 1372 chars]
Remediation
View remediation

T02 · Agent Memory Poisoning

Note
Location
AGENTS.md:74
Finding

Persistent Agent Memory Can Be Updated Without Consistent User Approval

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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (29)

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

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

git clone https://github.com/AndreaGriffiths11/agent-context-system.git /tmp/acs cp /tmp/acs/AGENTS.md /tmp/acs/agent-context . cp -r /tmp/acs/agent_docs /tmp/acs/scripts . rm -rf /tmp/acs ./agent-context init

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

git clone https://github.com/AndreaGriffiths11/agent-context-system.git /tmp/acs cp /tmp/acs/AGENTS.md /tmp/acs/agent-context . cp -r /tmp/acs/agent_docs /tmp/acs/scripts . rm -rf /tmp/acs ./agent-context init

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

git clone https://github.com/AndreaGriffiths11/agent-context-system.git /tmp/acs cp /tmp/acs/AGENTS.md /tmp/acs/agent-context . cp -r /tmp/acs/agent_docs /tmp/acs/scripts . rm -rf /tmp/acs ./agent-context init

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

git clone https://github.com/AndreaGriffiths11/agent-context-system.git /tmp/acs cp /tmp/acs/AGENTS.md /tmp/acs/agent-context . cp -r /tmp/acs/agent_docs /tmp/acs/scripts . rm -rf /tmp/acs ./agent-context init

text

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is presented as a 'local-only' memory system with 'no plugins, no infrastructure,' yet it also documents publishing workflows that create and modify GitHub repositories via gh. That mismatch can mislead users and agents about the trust boundary, increasing the chance that remote/network-affecting actions are invoked under a local-only mental model.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest describes a 'persistent local-only memory system' with 'no plugins, no infrastructure, no background processes,' implying the skill operates locally. This script uses GitHub CLI to create a remote repository, push local contents, and modify repository settings, which is materially broader than local-only operation.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The core design instructs agents to persist what they learn from each session into .agents.local.md, creating a durable natural-language memory store. That can accumulate sensitive prompts, credentials, code fragments, incident details, or personal data unless there are clear data-minimization and redaction controls.

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 79)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`.

## CLI Commands

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 · SKILL.md (reported line 267)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`.

## CLI Commands

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documented --autopromote behavior can auto-append content into AGENTS.md, a committed shared file, without an explicit high-visibility warning about modifying version-controlled instructions. That creates risk of unintended persistence, propagation to teammates, and prompt-surface contamination if inaccurate or sensitive patterns are promoted automatically.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The workflow repeatedly normalizes logging session learnings and updating the scratchpad, reinforcing long-term retention of conversation-derived data. In practice, users may ask agents to summarize work that includes confidential implementation details or sensitive operational context, which can later be resurfaced or promoted.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The session-logging guidance explicitly tells users to prompt the agent to update the scratchpad after meaningful work, which operationalizes a natural-language retention channel. Because users may do this after debugging, security work, or production incidents, the scratchpad can become an unstructured repository of sensitive derived data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The file broadly describes what the system does but does not clearly define when the skill should activate, under what user intent, or which actions require explicit confirmation. For agent-integrated tooling, ambiguous invocation boundaries can cause the skill to be applied too broadly, including reading/writing memory files or wiring agent configs in contexts the user did not intend.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill markets itself as a simple two-file local memory system, but its documented behavior includes modifying .gitignore and agent-specific config files such as symlinks or rules files. That mismatch can mislead users or downstream agents into granting broader trust than warranted, increasing the chance of unauthorized or unexpected repository changes.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The skill directs the agent to run a shell script that does more than maintain the two documented memory files: it also ensures gitignore state and wires multiple agent tool configurations. That expands the write surface from local notes into repository configuration, which can cause unintended file changes or tool behavior changes if executed without clear user consent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger phrase 'When a user asks about setting up agent context' is broad enough that an agent may activate this skill in loosely related conversations and begin checking or modifying project files. Overbroad activation increases the chance of unnecessary file access and setup actions outside the user's precise intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The instructions tell the agent to run setup, add .agents.local.md to .gitignore, and wire agent tool configurations without an explicit warning that repository files will be changed. Silent modification guidance is risky because users may believe they are only receiving advice while the agent is actually altering tracked project state.

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.

Static analysis

No suspicious patterns detected.