Back to skill

Security audit

Publish Wiki Pages

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its Wiki.js publishing purpose, but it uses a wiki API token to read and change wiki content without strong endpoint, locale, or destructive-operation safeguards.

Install only if you trust the publisher and will configure WIKI_URL to a trusted HTTPS Wiki.js endpoint. Use a Wiki.js token scoped to the minimum pages and actions needed, verify the path before publishing because existing pages may be updated, and be aware that the examples force the zh locale unless changed.

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
scripts/publish_to_wiki.py:48
Finding

Unvalidated Wiki Endpoint Can Expose Bearer Credentials and Published Content

Content
View full analysis
dict: response = requests.post( wiki_url, headers={ "Content-Type": "application/json", "Authorization": f"Bearer {wiki_key}" }, data=payload ) return response.json() ``` ### Technical Analysis The script obtains `WIKI_URL` from an environment variable and uses it directly as the destination of an authenticated HTTP request. It does not parse or validate the URL, require HTTPS, restrict the destination hostname, or reject URL user information and unexpected schemes. Every request includes the Wiki.js API token in an `Authorization: Bearer` header. Publishing requests also include the complete Markdown document, title, description, tags, and destination path. If `WIKI_URL` is configured with an `http://` URL, these values may be intercepted or modified in transit. If an attacker can influence the environment variable or induce a configuration error, the credential and content can be sent directly to an attacker-controlled server. Network access and use of the Wiki.js token are necessary for the declared publishing functionality. The risk arises because the implementation permits a broader se ...[truncated 2104 chars]
Remediation
View remediation
str: parsed = urlparse(wiki_url) if parsed.scheme != "https": raise ValueError("WIKI_URL must use HTTPS") if not parsed.hostname or parsed.username or parsed.password: raise ValueError("WIKI_URL is malformed or contains user information") if allowed_hosts and parsed.hostname not in allowed_hosts: raise ValueError("WIKI_URL hostname is not approved") return wiki_url def _post(wiki_url: str, wiki_key: str, payload: str) -> dict: validated_url = validate_wiki_url(wiki_url) response = requests.post( validated_url, headers={ "Content-Type": "application/json", "Authorization": f"Bearer {wiki_key}", }, data=payload, timeout=(5, 30), ) response.raise_for_status() return ...[truncated 23 chars]
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (11)

Tainted flow: 'wiki_url' from os.environ.get (line 22, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/publish_to_wiki.py (reported line 49)May include surrounding context.

python
def _post(wiki_url: str, wiki_key: str, payload: str) -> dict:
    response = requests.post(
        wiki_url,
        headers={
            "Content-Type": "application/json",

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The skill description claims bounded publish/update behavior with automatic tagging and path suggestions, but the content also includes page enumeration via pages.list and does not actually implement some advertised safeguards/features. This mismatch can mislead operators about the real data-access surface, causing them to approve a skill that can browse broader wiki contents than expected.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill uses sensitive capabilities including environment secrets, file reads, and outbound network access, but does not declare any explicit tool scope or allowed-tools boundary. This weakens least-privilege controls and can let a runtime grant broader access than users or reviewers expect, increasing the risk of unintended secret use or data exfiltration during publishing operations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The example mutation sets locale: "zh" unconditionally, which imposes a specific language/locale on published pages. The file does not present this as an optional or region-specific setting, nor does it offer user opt-in or a configurable alternative.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documented CreatePage mutation hard-codes locale: "zh", which directs all created pages to a specific locale regardless of user preference. This is a natural-language policy concern because the skill documentation instructs a fixed locale without opt-in or a stated regional requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The full Python example includes locale: "zh" inside the page-creation mutation, again enforcing a single locale choice. Because the file presents this as standard usage rather than an optional setting, it violates the requirement to avoid forcing a language/locale without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The Create Page examples explicitly set locale: "zh", which forces a specific language/locale in the documented behavior. The file does not explain why Chinese is required or offer any user opt-in or alternative locale choice, which conflicts with the language/locale policy guidance.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file includes a Delete Page mutation example, which is a destructive operation affecting user data. The surrounding documentation provides no warning, confirmation guidance, or note about irreversibility, so readers are not alerted to the risk before using it.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The Python example sets locale: "zh" directly in the mutation, enforcing a specific locale in code. Because the document gives no explanation for this restriction and does not show how a user can choose another locale, it presents a natural-language locale policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The page creation mutation forces locale: "zh", which imposes a specific language/locale policy in the skill behavior. The file does not offer a user opt-in or configuration mechanism for locale, and no region-specific justification is documented here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The page lookup query uses locale: "zh", which means the skill only searches within a fixed locale regardless of user intent. This is a natural-language policy concern because it silently constrains language/locale behavior without opt-in or explanation.

Content

No source excerpt is available for this finding.