Back to skill

Security audit

Policy Lawyer 1.0.0

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly searches a local policy file, but that file tells agents to write sensitive activity into persistent memory and update shared state, so it should be reviewed before use.

Review and edit references/policies.md before installing. Treat output from this skill as reference text only, and do not let an agent write to memory files, update HEARTBEAT.md, or run Memory Keeper based solely on returned policy text unless the user explicitly authorizes that action and the logging scope is clear.

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

T02 · Agent Memory Poisoning

Warning
Location
references/policies.md:8
Finding

Persistent Agent-State Manipulation Through Policy Directives

Content
View full analysis
Remediation
View remediation

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:11
Finding

Repository-Controlled Text Is Elevated to Authoritative Agent Policy

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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 (2)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill documentation defines a CLI that can read local files and invoke shell-capable code, but the manifest does not declare any tool scope such as permissions or allowed-tools. This creates an authorization gap where the runtime may grant broader capabilities than users expect, increasing the risk of unintended file access or command execution through the skill.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · tests/test_policy_lawyer.py (reported line 11)May include surrounding context.

python
def run_cli(args):
    return subprocess.run(
        [sys.executable, str(SCRIPT_PATH)] + args,
        capture_output=True,
        text=True,

Static analysis

No suspicious patterns detected.