Back to skill

Security audit

Error Log Analyzer

Security checks for vulnerabilities and agentic risk

Overview

The skill is a real error-log analyzer, but it can send sensitive log contents to external AI providers despite local-only privacy claims and has an unsafe web display path.

Review before installing in any environment with production, customer, credential, or private logs. Use only sanitized logs unless you are comfortable sending error messages and stack traces to the configured AI provider. Do not rely on the local-only privacy statement, and avoid the optional web UI with untrusted logs until output escaping is fixed.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
src/analyzers/__init__.py:54
Finding
Potentially Sensitive Log Data Is Transmitted to External AI Providers Without Accurate Disclosure<![CDATA[ ## Vulnerability Details **File Location**: `src/analyzers/__init__.py:54-57, 91-162` **Vulnerability Type**: Sensitive information exposure to third-party services **Risk Level**: High ### Vulnerable Code ```python # Use AI for unknown errors if self.api_key: analysis = self._analyze_with_ai(error_message, stack_trace) self.cache[cache_key] = analysis return analysis ``` ```python def _build_prompt(self, error_message: str, stack_trace: Optional[str]) -> str: """Build the AI prompt.""" prompt = f"""You are a senior software engineer helping debug an application error. Analyze this error and provide a clear, actionable response: ERROR MESSAGE: {error_message} """ if stack_trace: prompt += f""" STACK TRACE: {stack_trace[:2000]} # Limit stack trace length """ prompt += """ Please provide your analysis in this exact JSON format: { "error_type": "Brief error type (e.g., Database Connection Error)", "severity": "CRITICAL|HIGH|MEDIUM|LOW", "explanation": "Plain English explanation of what happened (2-3 sentences)", "root_cause": "The underlying cause (1-2 sentences)", "suggestions": [ "Step 1 to fix", "Step 2 to fix", "Step 3 to fix" ], "code_examples": [ "// Optional code example" ] } Guidelines: - Be specific and actionable - Use simple language (avoid jargon when possible) - Provide numbered steps - Include commands/code when relevant - Be helpful and encouraging """ return prompt ``` ```python def _call_claude(self, prompt: str) -> str: """Call Claude API.""" try: import anthropic client = anthropic.Anthropic(api_key=self.api_key) message = client.messages.create( model="claude-3-5-sonnet-20241022", max_tokens=1024, messages=[{"role": "user", "content": prompt}] ) return message.content[0].text except ImportError: raise ImportError("Please insta ...[truncated 2582 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Correct the documentation to state clearly that unknown errors may be transmitted to Anthropic or OpenAI. 2. Require explicit opt-in before enabling external AI analysis; do not activate it merely because an environment variable exists. 3. Add a guaranteed local-only mode that cannot invoke external providers. 4. Redact secrets and personal data before prompt construction. At minimum, detect API keys, authorization headers, cookies, private keys, connection strings, email addresses, and common token formats. 5. Show users the exact redacted payload and destination provider before the first external request. 6. Allow administrators to configure data-classification and provider restrictions. 7. Document applicable provider retention, training, privacy, and regional-processing policies. 8. Avoid logging prompts, API responses, or exceptions that may reproduce sensitive content. 9. Add tests confirming that representative credentials and personal data never appear in outbound request payloads. ]]>

T01 · Skill Instruction Hijacking

Warning
Location
src/analyzers/__init__.py:91
Finding
Untrusted Log Content Can Perform Indirect Prompt Injection Against AI Analysis<![CDATA[ ## Vulnerability Details **File Location**: `src/analyzers/__init__.py:91-130` **Vulnerability Type**: Indirect prompt injection **Risk Level**: Medium ### Vulnerable Code ```python def _build_prompt(self, error_message: str, stack_trace: Optional[str]) -> str: """Build the AI prompt.""" prompt = f"""You are a senior software engineer helping debug an application error. Analyze this error and provide a clear, actionable response: ERROR MESSAGE: {error_message} """ if stack_trace: prompt += f""" STACK TRACE: {stack_trace[:2000]} # Limit stack trace length """ prompt += """ Please provide your analysis in this exact JSON format: { "error_type": "Brief error type (e.g., Database Connection Error)", "severity": "CRITICAL|HIGH|MEDIUM|LOW", "explanation": "Plain English explanation of what happened (2-3 sentences)", "root_cause": "The underlying cause (1-2 sentences)", "suggestions": [ "Step 1 to fix", "Step 2 to fix", "Step 3 to fix" ], "code_examples": [ "// Optional code example" ] } Guidelines: - Be specific and actionable - Use simple language (avoid jargon when possible) - Provide numbered steps - Include commands/code when relevant - Be helpful and encouraging """ return prompt ``` ### Technical Analysis The application concatenates attacker-influenced error messages and stack traces directly into the same user prompt that contains the analyzer's operational instructions. It does not establish a strong trust boundary or explicitly instruct the model that content inside the log must be treated only as inert evidence. An attacker who can cause controlled text to be written to a log can include instruction-like content, such as directions to ignore the requested JSON schema, misclassify an error, hide an indicator of compromise, or recommend a dangerous remediation command. Large language models do not reliably distinguish such embedded instructions from the surroundi ...[truncated 1512 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Explicitly identify all log content as untrusted data and instruct the model never to follow instructions found inside it. 2. Place log data inside clear, randomized or strongly defined delimiters and state that delimited content is evidence only. 3. Where supported, separate stable system instructions from untrusted user content using appropriate message roles and structured fields. 4. Validate the model response against a strict JSON schema: - Restrict severity to the documented enumeration. - Enforce string and array length limits. - Reject unexpected properties and malformed output. 5. Label generated commands and code as untrusted suggestions requiring independent verification. 6. Consider filtering instruction-like phrases from logs before external analysis, while preserving an original local copy for forensic use. 7. Add adversarial tests containing prompt-injection strings in error messages and stack traces. 8. Do not connect generated suggestions to automatic shell execution, deployment, ticket actions, or remediation systems without an independent policy layer and human approval. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
web/templates/index.html:458
Finding
Unescaped AI and Log-Derived Fields Allow DOM-Based Cross-Site Scripting<![CDATA[ ## Vulnerability Details **File Location**: `web/templates/index.html:458-496` **Vulnerability Type**: DOM-based cross-site scripting **Risk Level**: High ### Vulnerable Code ```javascript const summaryHtml = ` <h2>📊 Analysis Summary</h2> <div class="stats"> <div class="stat-box"> <div class="stat-label">Total Errors</div> <div class="stat-value">${results.total_errors}</div> </div> <div class="stat-box"> <div class="stat-label">Unique Errors</div> <div class="stat-value">${results.unique_errors}</div> </div> <div class="stat-box"> <div class="stat-label">Trend</div> <div class="stat-value">${results.trends.trend}</div> </div> </div> <p style="margin-top: 15px; white-space: pre-line;">${results.summary}</p> `; document.getElementById('summary').innerHTML = summaryHtml; // Display error cards const cardsHtml = results.analyses.map(error => ` <div class="error-card ${error.severity.toLowerCase()}"> <div class="error-header"> <div class="error-type">${error.error_type}</div> <span class="severity-badge ${error.severity.toLowerCase()}">${error.severity}</span> </div> <div class="error-section"> <h3>What happened</h3> <p>${error.explanation}</p> </div> <div class="error-section"> <h3>Occurrences</h3> <p>${error.occurrence_count} time(s)</p> </div> <div class="error-section"> <h3>How to fix</h3> <ul class="suggestion-list"> ${error.suggestions.map(s => `<li>${s}</li>`).join('')} </ul> </div> ${error.code_examples && error.code_examples.length > 0 ? ` <div class="error-section"> <h3>Code Example</h3> <pre style="background: #f5f5f5; padding: 10p ...[truncated 2254 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not use `innerHTML` for untrusted or AI-generated values. 2. Construct static DOM elements with `document.createElement()` and assign all dynamic strings through `textContent`. 3. If rich HTML is an explicit requirement, sanitize it with a well-maintained allowlist sanitizer such as DOMPurify before insertion. 4. Validate response fields on the server: - Enforce expected primitive types. - Restrict severity to known values. - Apply reasonable length limits. - Reject unexpected nested structures. 5. Treat AI output as attacker-controlled even when the submitted log appears benign. 6. Deploy a restrictive Content Security Policy that blocks inline scripts and event handlers, for example by using nonces for approved scripts and omitting `unsafe-inline`. 7. Add automated browser tests using payloads in every displayed field, including `error_type`, `explanation`, suggestions, code examples, trend, and summary. 8. Encode dynamic values according to their exact context, including text nodes and CSS class attributes. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (53)

Natural-Language Policy Violations

High
Confidence
98% confidence
Finding
This is an overbroad and likely inaccurate privacy claim: the README says all processing happens locally and logs are never stored on external servers, yet the skill explicitly supports cloud AI providers. False privacy guarantees are especially dangerous for a log-analysis tool because users may trust it with highly sensitive logs under incorrect assumptions.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
If the skill exposes test, benchmark, feedback, or CLI orchestration modes unrelated to end-user log analysis, that expands behavior beyond the stated purpose and may trigger local command execution or file operations users did not expect. Undocumented execution paths increase attack surface and make it harder for users to assess operational risk.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
If the skill exposes test, benchmark, feedback, or CLI orchestration modes unrelated to end-user log analysis, that expands behavior beyond the stated purpose and may trigger local command execution or file operations users did not expect. Undocumented execution paths increase attack surface and make it harder for users to assess operational risk.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
If the skill exposes test, benchmark, feedback, or CLI orchestration modes unrelated to end-user log analysis, that expands behavior beyond the stated purpose and may trigger local command execution or file operations users did not expect. Undocumented execution paths increase attack surface and make it harder for users to assess operational risk.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
If the skill exposes test, benchmark, feedback, or CLI orchestration modes unrelated to end-user log analysis, that expands behavior beyond the stated purpose and may trigger local command execution or file operations users did not expect. Undocumented execution paths increase attack surface and make it harder for users to assess operational risk.

Credential Access

High
Category
Privilege Escalation
Content
2. Start the database if it's stopped:
   sudo systemctl start postgresql

3. Verify the connection settings in your .env file:
   DATABASE_URL=postgresql://user:password@localhost:5432/dbname

4. Test the connection manually:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Intent-Code Divergence

High
Confidence
98% confidence
Finding
The FAQ claims that all processing happens locally and that logs are never stored on external servers, yet the same document requires API keys for AI analysis and supports external model providers. This is a materially misleading privacy statement because users may submit sensitive logs under the false assumption that no external disclosure occurs.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
- Be helpful and encouraging
"""
        
        return prompt
    
    def _call_claude(self, prompt: str) -> str:
        """Call Claude API."""
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The guide instructs users to set third-party AI API keys and enables AI-backed analysis, but it does not disclose that submitted log data may be sent to external providers. Error logs often contain sensitive material such as tokens, stack traces, internal hostnames, file paths, or user data, so this omission can lead to unintended data exposure and compliance/privacy issues.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The setup and quick-start sections encourage users to configure external AI APIs but do not warn that submitted logs may be transmitted to external providers. Since error logs often contain credentials, tokens, stack traces, hostnames, and PII, this omission can cause users to unknowingly disclose sensitive information.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
How to fix it:
1. Check if PostgreSQL is running:
   sudo systemctl status postgresql

2. Start the database:
   sudo systemctl start postgresql
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
How to fix it:
1. Check if PostgreSQL is running:
   sudo systemctl status postgresql

2. Start the database:
   sudo systemctl start postgresql
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
How to fix it:
1. Check if PostgreSQL is running:
   sudo systemctl status postgresql

2. Start the database:
   sudo systemctl start postgresql
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
How to fix it:
1. Check if PostgreSQL is running:
   sudo systemctl status postgresql

2. Start the database:
   sudo systemctl start postgresql
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
How to fix it:
1. Check if PostgreSQL is running:
   sudo systemctl status postgresql

2. Start the database:
   sudo systemctl start postgresql
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
How to fix it:
1. Check if PostgreSQL is running:
   sudo systemctl status postgresql

2. Start the database:
   sudo systemctl start postgresql
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
How to fix it:
1. Check if PostgreSQL is running:
   sudo systemctl status postgresql

2. Start the database:
   sudo systemctl start postgresql
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
How to fix it:
1. Check if PostgreSQL is running:
   sudo systemctl status postgresql

2. Start the database:
   sudo systemctl start postgresql
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
How to fix it:
1. Check if PostgreSQL is running:
   sudo systemctl status postgresql

2. Start the database:
   sudo systemctl start postgresql
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
How to fix it:
1. Check if PostgreSQL is running:
   sudo systemctl status postgresql

2. Start the database:
   sudo systemctl start postgresql
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
How to fix it:
1. Check if PostgreSQL is running:
   sudo systemctl status postgresql

2. Start the database:
   sudo systemctl start postgresql
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Intent-Code Divergence

Medium
Confidence
96% confidence
Finding
The README states that logs are 'never stored on external servers' while the skill also advertises use of Claude, OpenAI, and OpenAI-compatible APIs for AI analysis. That creates a misleading privacy assurance because log contents may be transmitted to third-party services, exposing sensitive operational data or secrets contained in logs.

Lp3

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding
The skill advertises capabilities that imply reading files, accessing environment variables, making network calls, and possibly invoking shell commands, but it does not declare any explicit tool scope or permissions. This makes the operational boundary opaque and increases the chance of over-privileged execution, especially when handling sensitive log files and API keys.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill description promotes AI analysis but omits a warning that enabling those features may transmit log contents to third-party model providers. Because logs often contain secrets, internal hostnames, stack traces, and personal data, lack of disclosure can lead to accidental data exfiltration.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
Real-time monitoring of application logs implies ongoing access to potentially sensitive files, and alerting may further disclose excerpts to external systems such as chat or notification platforms. Without an explicit warning, users may enable continuous collection and forwarding without understanding the privacy and security implications.