Back to skill

Security audit

Context Compactor

Security checks for vulnerabilities and agentic risk

Overview

This is a local transcript-compaction skill with clear user consent requirements, but its best-effort credential redaction can miss parts of some quoted multi-word secrets.

Install is reasonable if you use the reviewed local Python file and only run it on transcript files you intentionally select. Review generated memos before sharing, especially if transcripts may contain passwords, tokens, private URLs, or quoted multi-word secrets; do not rely on strict mode as a complete secret scrubber.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
compactor.py:97
Finding

Partial disclosure of multi-word quoted credentials

Content
View full analysis
[^\s,;)\]}}]+)", re.I) ``` ```python # 2) "key: value" (EQ — always) and "key value" (SP — secret-like only) for rx, eq_sep in ((_CRED_EQ, True), (_CRED_SP, False)): def _repl_cred(m, eq_sep=eq_sep): nonlocal found kw = m.group(1) val = m.group("val") # placeholder <...> or an already-inserted marker — never re-redact if val.startswith("<"): return m.group(0) if not eq_sep and not _is_secretlike(val): return m.group(0) found = True head = m.group(0)[:m.group(0).rfind(val)] return f"{head}" out = rx.sub(_repl_cred, out) # 3) lone keyword on a short line ("pass:", "token: ...") — hide the tail if not found and _CRED_LABEL.search(out) and len(re.sub(r"\s+", "", out)) < 40: def _repl_short(m): nonlocal found found = True return f"" out = re.sub(r"\b(password|парол[ья]|токен|token|secret)\b.*$", _repl_short, out, flags=re.I) if out != line: found = True # 4) strict mode: a credential marker with an unextractable value -> drop the whole line if strict and not found and _CRED_LABEL.search(out): return "", True ``` ### Technical Analysis The `_CRED_EQ` regular expression captures a credential value only until the first whitespace or listed delimiter. It does not recognize quoted values as a single unit. For example, this input: ```text decided: password="correct horse battery staple" for production ``` causes only `"correct` to be replaced. The remainder, `horse battery staple"`, stays in the sanitized line. This issue also affects strict mode. On ...[truncated 1418 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
README.md:52
Finding

Documentation recommends execution of an unaudited external npm artifact

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (6)

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · compactor.py (reported line 59)May include surrounding context.

python
LINK = re.compile(r"https?://[^\s)\]>\"']+|(?<![\w.])@[A-Za-z0-9_]{2,30}\b", re.I)

NOISE = re.compile(
    r"^\s*(```|{|}|\[tool|\]|\| *[-:]+ *\|$|<\?xml|import |const |let |function |def |class |return |print\(|curl |git |sudo |scp |ssh |npm |pip |docker |node |python)",
    re.I)
SKIP_WORDS = {"а", "и", "но", "в", "на", "с", "по", "к", "у", "не", "да", "нет", "ок", "окей", "давай",
              "the", "and", "but", "of", "to", "in", "on", "for", "with", "ok", "yes", "no", "well"}

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · compactor.py (reported line 59)May include surrounding context.

python
LINK = re.compile(r"https?://[^\s)\]>\"']+|(?<![\w.])@[A-Za-z0-9_]{2,30}\b", re.I)

NOISE = re.compile(
    r"^\s*(```|{|}|\[tool|\]|\| *[-:]+ *\|$|<\?xml|import |const |let |function |def |class |return |print\(|curl |git |sudo |scp |ssh |npm |pip |docker |node |python)",
    re.I)
SKIP_WORDS = {"а", "и", "но", "в", "на", "с", "по", "к", "у", "не", "да", "нет", "ок", "окей", "давай",
              "the", "and", "but", "of", "to", "in", "on", "for", "with", "ok", "yes", "no", "well"}

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The phrase "reads a raw transcript ... any language mix of Russian/English" presents an explicit language scope in natural-language documentation. Because the file does not frame this as an optional capability or provide a user choice, it can be read as a locale/language constraint without opt-in.

Content

No source excerpt is available for this finding.