Back to skill

Security audit

ontology (bidirectional default)

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed local memory/ontology tool, but it needs Review because broad activation and persistent shared state are paired with a verified validation gap.

Install only if you are comfortable with a skill maintaining shared persistent workspace memory. Avoid storing secrets or highly sensitive personal data in the ontology graph, and run validation before relying on the data because invalid records may already have been persisted.

Vulnerability Patterns
  • 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
  • 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
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/ontology.py:112
Finding

Graph Mutations Bypass Schema Validation Before Persistence

Content
View full analysis
dict: """Create a new entity.""" entity_id = entity_id or generate_id(type_name) timestamp = datetime.now(timezone.utc).isoformat() entity = { "id": entity_id, "type": type_name, "properties": properties, "created": timestamp, "updated": timestamp } record = {"op": "create", "entity": entity, "timestamp": timestamp} append_op(graph_path, record) return entity ``` The command dispatcher also invokes mutation functions directly after parsing JSON, without loading the schema or calling `validate_graph()`: ```python if args.command == "create": props = json.loads(args.props) entity = create_entity(args.type, props, args.graph, args.id) print(json.dumps(entity, indent=2)) ``` ### Technical Analysis The Skill documentation states that every mutation is validated against type constraints before being committed. The implementation instead appends create, update, and relation operations directly to the persistent JSONL graph. `validate_graph()` is only available through a separate, post-hoc `validate` command and does not roll back invalid records. Consequently, callers can persist: - Entities missing required properties. - `Credential` entities containing forbidden properties such as `password`, `secret`, or `token`. - Unknown or unrestricted entity types. - Duplicate entity IDs that replace the effective in-memory representation when the graph is loaded. - Properties whose JSON value is not an object, potentially causing later operations to fail. - Relations whose source or destination does not exist. - ...[truncated 1917 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
Findings (4)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/schema.md (reported line 165)May include surrounding context.

forbidden_properties: [password, secret, token, key, api_key] properties: service: string secret_ref: string # Reference to secret store (e.g., "keychain:github-token") expires: datetime? scope: string[]?

text

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill explicitly instructs reading and writing local workspace files, creating directories, and mutating shared memory, but it does not declare any tool or permission scope. That mismatch weakens least-privilege controls and makes it easier for an agent to invoke file-writing behavior without clear review boundaries, especially because this skill manages shared state used by other skills.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger language is very broad, including phrases like 'remember', entity CRUD, and cross-skill data access, which can match many ordinary requests unrelated to this skill's safe intended use. Overbroad activation increases the chance the skill is selected in inappropriate contexts, causing unintended persistence, linkage of sensitive data, or writes to shared memory from loosely related prompts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The 'When to Use' table includes generic actions like planning multi-step work and shared state access without clear boundaries, making the skill eligible for a wide range of requests. In a skill that can write append-only history and schema data, ambiguous activation is more dangerous because misuse can pollute long-lived memory, create incorrect relations, or expose information across workflows.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.