Back to skill

Security audit

Telegram-Bot-managerj

Security checks for vulnerabilities and agentic risk

Overview

The skill openly implements a local full-drive file browser, but its broad default access and authentication/UI weaknesses make it risky enough for review before use.

Install only if you intentionally need a local high-privilege file server. Use a narrow GOD_MODE_ROOT instead of C:\, keep GOD_MODE_HOST on 127.0.0.1, use a strong unique token, do not put tokens in URLs, and patch the UI rendering and symlink containment issues before handling sensitive files.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
assets/index.html:88
Finding

Stored DOM XSS Through Unescaped Filesystem Names and Paths

Content
View full analysis
..dir---`; rowsEl.appendChild(tr); } for (const e of data.entries) { const itemPath = p ? `${p}\\${e.name}` : e.name; const tr = document.createElement('tr'); const action = e.isDirectory ? `Open` : `Download`; tr.innerHTML = ` ${e.isDirectory ? '📁' : '📄'} ${e.name} ${e.isDirectory ? 'dir' : 'file'} ${e.isDirectory ? '-' : fmtSize(e.size)} ${e.modified || '-'} ${action}`; rowsEl.appendChild(tr); } ``` ### Technical Analysis Filesystem-derived values such as `e.name` and `itemPath`, as well as the user-controlled path value used to construct `up`, are interpolated directly into HTML and attribute contexts before being assigned to `innerHTML`. Neither HTML text escaping nor attribute escaping is applied. A maliciously constructed filename or directory name containing HTML markup can therefore alter the generated document structure and introduce executable event handlers or other active content. This is a stored DOM XSS condition because the payload can persist as a filesystem entry and execute whenever an authenticated operator browses the affected directory. The injected script runs under the local server's origin. It can access the token input and URL, issue same-origin authenticated requests, inspect directory listings, and retrieve files available through the service. ### Attack P ...[truncated 1329 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
assets/index.html:59
Finding

Bearer-Equivalent Authentication Token Exposed in URLs and Browser History

Content
View full analysis
Open` : `Download`; history.replaceState(null, '', `/?${q(p, t)}`); ``` ### Technical Analysis The token grants access to all file-listing, reading, and download operations beneath the configured root. It is therefore a bearer-equivalent secret. The server unnecessarily accepts this secret from the `token` query parameter, while the UI includes it in `/list` requests, download links, and the page URL through `history.replaceState`. Consequently, th ...[truncated 1915 chars]
Remediation
View remediation
` or the existing `x-god-mode-token` header. 3. Change UI requests to pass the token in a request header: ```javascript const res = await fetch(`/list?${pathParams}`, { headers: { Authorization: `Bearer ${t}` } }); ``` 4. Do not include the token in `location.search`, generated links, or `history.replaceState`. 5. Implement downloads with an authenticated `fetch` request, convert the response to a `Blob`, and initiate a local object-URL download. This avoids placing credentials in the download URL. 6. If an old URL contains a token, remove it from the address bar immediately without reusing or persisting it. 7. Return `Cache-Control: no-store` for authenticated API and UI responses. 8. Add `Referrer-Policy: no-referrer` as defense in depth. 9. Use high-entropy, randomly generated tokens and rotate any token that may already have appeared in a URL, history entry, or log. 10. Continue binding to loopback by default and require explicit operator confirmation before allowing network-accessible binding. ]]>

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/server.cjs:74
Finding

Configured Root Boundary Can Be Bypassed Through Symbolic Links or Junctions

Content
View full analysis
mapEntry(fullPath, d)); return sendJSON(res, 200, { path: fullPath, entries }); } catch (err) { return sendJSON(res, 500, { error: `List failed: ${err.message}` }); } } if (route === '/read' && req.method === 'GET') { const rawPath = parsedUrl.searchParams.get('path') || ''; const { safe, fullPath } = resolveSafePath(rawPath); if (!safe) return sendJSON(res, 403, { error: 'Path traversal detected' }); try { const st = fs.statSync(fullPath); if (!st.isFile()) return sendJSON(res, 400, { error: 'Target path is not a file' }); if (st.size > MAX_READ_BYTES) { return sendJSON(res, 413, { error: `File too large for /read (${st.size} bytes > ${MAX_READ_BYTES} bytes). Use /download.`, }); } const content = fs.readFileSync(fullPath, 'utf8'); return sendJSON(r ...[truncated 2840 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (11)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 20)May include surrounding context.

md
node scripts/server.cjs

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 40)May include surrounding context.

md
node scripts/server.cjs

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 28)May include surrounding context.

md
- `GOD_MODE_ROOT`: root path to expose (default `C:\`).
- `GOD_MODE_HOST`: bind host (default `127.0.0.1`).
- `GOD_MODE_PORT`: bind port (default `8888`).
- `GOD_MODE_TOKEN`: access token.
- `GOD_MODE_TOKEN_REQUIRED`: `true` by default.

## Operational Rules

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/ops.md (reported line 1)May include surrounding context.

Ops Runbook

Start (PowerShell)

powershell

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly documents a server that can expose a root path with a default of C:\, but it does not prominently warn users that this configuration serves an entire drive, creating substantial risk of accidental overexposure. In a high-privilege storage-serving skill, omission of a clear warning increases the likelihood that operators launch a dangerous configuration without understanding the sensitivity of the data being exposed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The page reads the token from the query string, sends it in GET requests, embeds it into download URLs, and writes it back into browser history via history.replaceState. This exposes the credential through browser history, screenshots, copied links, logs, bookmarks, referrer leakage to other origins in some navigation flows, and any local monitoring around a tool explicitly intended to manage high-privilege storage.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The runbook explicitly instructs operators to read and download sensitive local files such as the Windows hosts file from a service rooted at C:, but it does not provide an explicit warning about the data-exposure implications of serving the full drive over HTTP. In the context of a 'god-mode' high-privilege file server, this normalizes powerful file exfiltration workflows and increases the chance that operators expose credentials, system files, or other sensitive data through misuse, misconfiguration, or token leakage.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The implementation exposes a live HTTP service that can enumerate, read, and download files from a configurable root, which in this skill defaults to the entire C:\ drive. In a 'high-privilege storage' context, that is a materially dangerous capability because compromise or misuse of the token immediately turns the service into a broad local data exfiltration interface.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The service provides broad filesystem listing plus direct file read and download operations over HTTP, enabling access to potentially sensitive local data. In this skill's context of managing high-privilege storage, the danger is elevated because the configured root may encompass highly sensitive system and user files, making the service an attractive exfiltration target.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The document is explicitly marked with lang="en" and all visible UI text is English-only. Under the policy, forcing a specific language without user opt-in or documented justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The HTML UI is reachable before authentication, which leaks the existence and behavior of a privileged local file service to any party that can connect. While it does not itself expose file contents here, unauthenticated surface area increases reconnaissance value and may expose future client-side flaws or operational details.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.