Back to skill

Security audit

Principal Agent Audit

Security checks for vulnerabilities and agentic risk

Overview

This is a local audit helper, but it can be invoked implicitly and may read or write sensitive agent memory and notes without a clear confirmation step.

Install only if you want an audit skill that can inspect sensitive local agent memory and operational notes. Prefer disabling implicit invocation or requiring an explicit audit request with an approved source list before use, and require confirmation before it writes durable memories or notes.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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
agents/openai.yaml:7
Finding

Implicit Invocation Permits Broad Inspection of Sensitive Local Agent Data

Content
View full analysis

Vulnerability Details

File Locations: agents/openai.yaml:7; SKILL.md:20-21; SKILL.md:31-37
Vulnerability Type: T05: Unauthorized Access and Privilege Escalation
Risk Level: Medium

Relevant code from agents/openai.yaml:7:

yaml
policy:
  allow_implicit_invocation: true

Relevant code from SKILL.md:20-25:

markdown
- Read local memory, daily notes, learnings, skill files, and relevant workspace context.
- Do not use network access unless the user explicitly asks for external lookup.
- Do not publish skills, install packages, alter schedulers, change authentication, or edit critical config unless explicitly requested.
- Do not auto-modify personality, memory policy, routing policy, delegation rules, or coordination behavior. Propose changes first.
- Prefer reversible edits and written rationale.
- Treat private user data as sensitive. Summarize patterns; do not quote secrets or full private logs.

Relevant code from SKILL.md:31-37:

markdown
- Durable memory files: operating preferences, identity, durable user instructions.
- Daily notes: recent raw events, decisions, and repeated themes.
- Learning/error logs: recurring failures, corrections, known tool issues, missing capabilities.
- Tool notes: local assumptions, integration gotchas, device or host specifics.
- Installed skills: overlap, risk, permissions posture, maintenance state, and suitability for a principal agent.
- Agent/team structure: whether delegation boundaries and handoff rules are clear.

Technical Analysis

The skill's legitimate audit function requires access to local operational data, but its configured permission model allows implicit invocation. The permitted review targets include identity data, durable user instructions, daily activity, error history, host-specific assumptions, installed capabilities, and agent topology.

The instructions include privacy safeguards and d ...[truncated 2047 chars]

Remediation
View remediation

Remediation Suggestions

  1. Disable implicit activation:
    yaml
    policy:
      allow_implicit_invocation: false
    
  2. Require an explicit user request before beginning an audit of memory, notes, logs, or workspace data.
  3. Ask the user to approve a concrete source list and review objective before reading sensitive files.
  4. Use a default-deny path policy and permit only individually approved files or directories.
  5. Explicitly exclude credentials, authentication material, private conversation archives, and unrelated workspace content.
  6. Redact secrets, identifiers, and unnecessary personal details before placing source material in model context or output.
  7. Record which sources were inspected so the audit remains reviewable and attributable.
  8. Preserve the existing restrictions against network access, publishing, package installation, scheduler changes, and authentication changes.

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:66
Finding

Pre-Response Persistence Can Write Unverified Content into Agent Memory

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:66-76
Vulnerability Type: T02: Agent Memory Poisoning
Risk Level: Medium

Relevant code:

markdown
### Write-Ahead Logging

Before responding, preserve details that would be expensive to lose:

- User corrections.
- Durable preferences or operating rules.
- Decisions, names, IDs, URLs, dates, or published artifacts.
- Trial windows, scheduled reports, or future obligations.

Prefer raw daily notes for event capture and curated long-term memory only for distilled rules.

Technical Analysis

The write-ahead logging instruction tells the agent to persist selected information before responding. The eligible content includes operating rules, corrections, identifiers, URLs, and future obligations. These data types can influence future decisions or direct the agent toward attacker-selected resources.

The instruction does not require explicit approval for each write, validate whether the information came directly from the user, distinguish trusted instructions from quoted or retrieved content, or define sanitization and retention controls. It also does not require provenance metadata for persisted entries.

An attacker-controlled document, delegated-agent response, quoted message, or misleading conversational statement could therefore be misclassified as a durable correction, preference, rule, URL, or obligation. If written into persistent memory, that content could continue affecting later sessions after the original context has ended.

Attack Path

  1. An attacker places a malicious instruction, false correction, deceptive URL, identifier, or fabricated obligation into content processed by the agent.
  2. The skill is active while the agent reviews or discusses that content.
  3. The agent interprets the content as expensive-to-lose information, a user correction, a durable rule, or a future obligation.
  4. Following the write-ahead logging instruc ...[truncated 1257 chars]
Remediation
View remediation

Remediation Suggestions

  1. Change write-ahead logging to proposal-only behavior unless the user has explicitly authorized memory updates.
  2. Require confirmation before storing durable preferences, operating rules, URLs, identifiers, or future obligations.
  3. Persist durable instructions only when they originate directly from an authenticated user statement, not from quoted text, retrieved documents, tool output, or delegated-agent responses.
  4. Store provenance with every entry, including source, timestamp, confidence, and whether user confirmation was obtained.
  5. Separate untrusted event notes from curated long-term memory and prevent unreviewed promotion between them.
  6. Sanitize entries by removing secrets and minimizing personal identifiers.
  7. Define expiration periods for event records, URLs, trial windows, and temporary obligations.
  8. Provide users with mechanisms to inspect, correct, and delete stored entries.
  9. Before using stored content for consequential action, revalidate it against the current user request and trusted sources.
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • 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
Findings (3)

Self-Modification

High
Category
Rogue Agent
Confidence
90% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

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

md
## Proactive Reliability Patterns

Use these patterns selectively. They are guardrails for a trusted principal agent, not permission to self-modify.

### Write-Ahead Logging

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- For skill edits: read the updated `SKILL.md`, validate frontmatter, and confirm metadata still matches behavior.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The default prompt and short description are broad enough to match ordinary audit, review, help, or coordination requests, which can cause this skill to be invoked in contexts beyond a narrowly intended principal-agent audit. Because the skill is designed to inspect memory, learnings, skills, scheduled work, and operational risks, accidental or overly broad invocation could expose sensitive internal state or trigger higher-risk review behaviors without sufficiently explicit user intent.

Content

No source excerpt is available for this finding.