Back to skill

Security audit

Log Analyzer

Security checks for vulnerabilities and agentic risk

Overview

This skill is a simple local log analyzer with one report-formatting caution around untrusted log text.

Install only if you are comfortable with a local tool reading log files you explicitly provide and writing a Markdown report. Treat any copied log samples in the report as untrusted data, especially if logs may contain attacker-controlled strings, links, HTML, or instruction-like text.

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
index.js:13
Finding

Untrusted Log Content Embedded Verbatim in Generated Markdown

Content
View full analysis
s.replace(/\d+/g,'').replace(/[a-f0-9]{8,}/gi,'').replace(/\s+/g,' ').trim(); const groups=new Map(); for(const m of matches){const key=`${m.severity}|${normalize(m.line)}`; if(!groups.has(key)) groups.set(key,{severity:m.severity,count:0,sample:m.line}); groups.get(key).count++;} const ordered=[...groups.values()].sort((a,b)=>b.count-a.count); const counts=matches.reduce((m,x)=>(m[x.severity]=(m[x.severity]||0)+1,m),{}); const report=[]; report.push('# Log Analysis Report','',`- Total scanned lines: ${lines.length}`,`- WARN: ${counts.WARN||0}`,`- ERROR: ${counts.ERROR||0}`,`- CRITICAL: ${counts.CRITICAL||0}`,'','## Grouped findings'); if(!ordered.length) report.push('- No WARN/ERROR/CRITICAL lines found.'); else ordered.slice(0,50).forEach((g,i)=>report.push(`- ${i+1}. [${g.severity}] x${g.count} — ${g.sample}`)); ``` ### Technical Analysis The `sample` property is populated directly from `m.line`, which originates from the user-selected log file. Although a normalized version of the line is used as the grouping key, the original untrusted line is retained as the sample and inserted into the Markdown report without Markdown or HTML escaping. An attacker who can influence the analyzed log can include Markdown links, remote images, raw HTML, deceptive headings, or instruction-like text in any line containing `WARN`, `ERROR`, or `CRITICAL`. The generated report preserves that content verbatim. When the report is opened in a permissive Markdown renderer, injected markup may alter its presentation or request remote resources. If an AI agent reviews the report, instruction-like log content may also become an indirect prompt-injection surface unless the report is explicitly handled as untrusted data. ### Attack Path ...[truncated 1643 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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

Static analysis

No suspicious patterns detected.