Back to skill

Security audit

Lovefromio Continuous Learning

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for continuous learning, but it encourages persistent reuse of session and client/project-specific construction data without clear consent, redaction, retention, or scope controls.

Review this skill before installing in environments with customer, bid, contract, credential, or proprietary project data. It should only be used with explicit approval to save learnings, sanitized/generalized entries, project or tenant isolation, provenance, review and deletion controls, and a rule that stored patterns are reference material rather than future instructions.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:180
Finding
Unsanitized Session Content Can Poison the Persistent Knowledge Base<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 180-242 **Vulnerability Type**: Persistent storage and reuse of insufficiently sanitized session-derived content **Risk Level**: Medium ### Vulnerable Code ```python class ConstructionLearningPipeline: """Continuous learning pipeline for construction automation""" def __init__(self, knowledge_base_path: str): self.kb_path = knowledge_base_path self.patterns = self._load_patterns() def learn_from_session(self, session: dict) -> list: """Extract and store learnings from session""" # Analyze session analyzer = ConstructionSessionAnalyzer() new_patterns = analyzer.analyze_session(session['log']) # Validate patterns validated = [] for pattern in new_patterns['successful_solutions']: if self._validate_pattern(pattern): # Check if similar pattern exists existing = self._find_similar_pattern(pattern) if existing: # Reinforce existing pattern self._reinforce_pattern(existing, pattern) else: # Add new pattern self._add_pattern(pattern) validated.append(pattern) # Persist to knowledge base self._save_patterns() return validated ``` The documented validation logic is: ```python def _validate_pattern(self, pattern: dict) -> bool: """Validate pattern before adding to knowledge base""" # Check minimum confidence if pattern.get('confidence', 0) < 0.6: return False # Check for code quality (if code snippet) if code := pattern.get('code_snippet'): if not self._is_valid_code(code): return False # Check for completeness required_fields = ['name', 'category', 'context', 'solution'] if not all(f in pattern for f in required_fields): return False return T ...[truncated 3800 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Restrict the extraction boundary** - Do not process complete session logs by default. - Extract only explicitly approved fields and messages. - Exclude system prompts, hidden instructions, credentials, authentication tokens, and unrelated conversation content. 2. **Require explicit approval before persistence** - Present every proposed pattern to an authorized user before writing it to persistent storage. - Display the complete normalized content, provenance, destination scope, and any code snippets during review. - Do not automatically reinforce existing patterns with unreviewed content. 3. **Add prompt-injection and policy validation** - Reject patterns containing instructions that attempt to alter agent identity, priorities, tool permissions, safety requirements, or future system behavior. - Treat imported documents, API responses, and user-controlled session entries as untrusted. - Separate factual knowledge from executable or imperative instructions. 4. **Detect and remove sensitive information** - Scan for credentials, API keys, access tokens, personal information, customer identifiers, contract data, and proprietary project details. - Redact or reject sensitive values before persistence. - Apply data-retention periods and secure deletion procedures. 5. **Enforce provenance and isolation** - Record the source session, user, tenant, project, extraction time, reviewer, and validation status for each pattern. - Isolate knowledge bases by tenant and project unless cross-scope sharing is explicitly authorized. - Prevent patterns from untrusted sources from being promoted to globally shared knowledge. 6. **Strengthen code validation** - Treat stored code snippets as untrusted data. - Perform semantic security analysis rather than syntax-only validation. - Reject dangerous process execution, dynamic evaluation, unsafe deserialization, unrestricted file access, and un ...[truncated 840 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill is explicitly designed to extract information from prior sessions and persist it into a knowledge base, but the description and usage guidance do not clearly warn users that session-derived content may be stored long term. In a construction automation context, sessions may contain estimates, client details, proprietary workflows, API data, or project-sensitive information, so silent persistence creates a meaningful confidentiality and data-governance risk.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The template instructs the agent to preserve client/project-specific adaptations, which directly encourages retention of potentially confidential customer information, internal processes, and project-specific constraints without any warning, minimization, or sanitization step. Because this material is then positioned for reuse in future sessions, the skill increases the risk of cross-client data leakage and long-term storage of sensitive business information.

Static analysis

No suspicious patterns detected.