T02 · Agent Memory Poisoning
- Location
scripts/ontology_sync.py:275- Finding
Hard-Coded Personal Identity and Relationships Are Injected into Persistent Agent Memory
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a local ontology memory tool, but its auto-sync script silently adds a hard-coded person, organizations, and ownership links to persistent memory.
Review before installing. The ordinary ontology CLI is local and mostly understandable, but the sync feature is not generic: it can permanently add someone else's identity and organization data to your memory graph and attribute projects to that person. Use only after removing or disabling those defaults, narrowing activation/write rules, and fixing validation and ID-collision behavior.
scripts/ontology_sync.py:275Hard-Coded Personal Identity and Relationships Are Injected into Persistent Agent Memory
scripts/ontology_sync.py:33Resetting Deterministic ID Counters Can Silently Replace Existing Ontology Entities
scripts/ontology.py:127Entity and Relation Mutations Bypass Advertised Pre-Commit Schema Validation
The code substantially matches the core ontology/knowledge-graph portion of the description: it can create, read, update, delete, query, and relate entities, and it can validate the graph against schema constraints. However, the declared description includes several capabilities not present in the supplied code chunk. There is no automatic synchronization from memory files, no backup-memory fallback logic, and no special cross-skill access layer beyond reading/writing local graph/schema files. Also, constraints are not enforced transactionally during writes; instead they are checked later via a separate validate command. Finally, the description suggests a typed ontology centered on specific entity classes, but the code accepts any arbitrary type string. These are material omissions/differences, so this should be flagged as a mismatch, albeit a partial one because the primary purpose is broadly aligned.
Referenced artifact was not completely inspected
python scripts/ontology.py create --type Person --props '{"name":"Alice","email":"alice@example.com"}'
Referenced artifact was not completely inspected
python scripts/ontology.py create --type Person --props '{"name":"Alice","email":"alice@example.com"}'
Referenced artifact was not completely inspected
python scripts/ontology.py create --type Person --props '{"name":"Alice","email":"alice@example.com"}'
Referenced artifact was not completely inspected
python scripts/ontology.py create --type Person --props '{"name":"Alice","email":"alice@example.com"}'
Referenced artifact was not completely inspected
python scripts/ontology.py create --type Person --props '{"name":"Alice","email":"alice@example.com"}'
Referenced artifact was not completely inspected
python scripts/ontology.py create --type Person --props '{"name":"Alice","email":"alice@example.com"}'
Referenced artifact was not completely inspected
python scripts/ontology.py create --type Person --props '{"name":"Alice","email":"alice@example.com"}'
Referenced artifact was not completely inspected
python scripts/ontology.py create --type Person --props '{"name":"Alice","email":"alice@example.com"}'
Referenced artifact was not completely inspected
python scripts/ontology.py create --type Person --props '{"name":"Alice","email":"alice@example.com"}'
Referenced artifact was not completely inspected
python scripts/ontology.py create --type Person --props '{"name":"Alice","email":"alice@example.com"}'
Referenced artifact was not completely inspected
python scripts/ontology.py create --type Person --props '{"name":"Alice","email":"alice@example.com"}'
Referenced artifact was not completely inspected
python scripts/ontology.py create --type Person --props '{"name":"Alice","email":"alice@example.com"}'
Referenced artifact was not completely inspected
python scripts/ontology.py create --type Person --props '{"name":"Alice","email":"alice@example.com"}'
Referenced artifact was not completely inspected
python scripts/ontology_sync.py
Referenced artifact was not completely inspected
python scripts/ontology_sync.py
Referenced artifact was not completely inspected
python scripts/ontology_sync.py
Referenced artifact was not completely inspected
python scripts/ontology_sync.py
Referenced artifact was not completely inspected
python scripts/ontology_sync.py
Referenced artifact was not completely inspected
python scripts/ontology_sync.py
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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[]?
The skill clearly describes reading and writing workspace files (memory/ontology/graph.jsonl, schema.yaml) but does not declare an explicit tool scope such as permissions or allowed-tools. That creates an authorization gap where a host agent may invoke file operations more broadly than intended, increasing the chance of unintended file access or mutation.
The trigger phrases include broad natural-language cues like 'remember', 'what do I know about', and entity CRUD patterns, which can cause the skill to activate during unrelated conversations. In a memory-writing skill, unintended invocation is risky because it can persist incorrect, sensitive, or adversarially injected data into long-lived storage.
The 'When to Use' section expands activation to vague conditions like planning work, shared state, and backup memory fallback without clear boundaries. That ambiguity increases the likelihood of over-invocation and cross-context data access, especially when other skills or routine dialogue mention related concepts.
This code appends operations to memory/ontology/graph.jsonl, creating persistent changes to the knowledge graph. Although there is progress logging, there is no explicit user disclosure that running the script will modify stored memory data, and the header only documents usage rather than warning about the write effect.
No suspicious patterns detected.