Back to skill

Security audit

DeepWiki Ask

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it advertises, but its command templates and file-input behavior create real risks of unintended local command execution or sending local file contents to DeepWiki.

Review before installing. Use this only for repositories and questions you are comfortable sending to DeepWiki. Do not pass untrusted owner/repo, question, or topic text into the documented shell commands; invoke the script with a shell-free argument array when possible. Avoid the @file question feature unless the file is intentionally prepared for external submission and contains no secrets, credentials, private source, or internal notes.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:32
Finding

Shell Command Injection Through Unsafe User-Controlled Argument Interpolation

Content
View full analysis
/deepwiki_ask.py -r -q "" --json ``` ```text python /deepwiki_ask.py -r --structure --json ``` ```text python /deepwiki_ask.py -r --contents --json python /deepwiki_ask.py -r --contents --topic "" --json ``` ### Technical Analysis The Skill instructs an Agent to construct shell commands by inserting user-controlled repository names, questions, and topics directly into command strings. The `` value is not quoted at all. Although the question and topic values are enclosed in double quotes, embedded quotation marks, command substitutions, and other shell metacharacters are not escaped. Consequently, quoting alone does not provide a reliable security boundary. The Python code validates the repository only after process startup. Any shell metacharacters are interpreted before `deepwiki_ask.py` receives the argument, so application-level validation cannot prevent command injection at that stage. The vulnerable behavior depends on the Agent or runtime executing these templates through a command shell. Invocation through a shell-free process API with a separately constructed argument array would not have the same flaw. ### Attack Path 1. An attacker supplies a repository name, question, or topic containing shell control syntax. 2. The Agent extracts that value and substitutes it into one of the command templates from `SKILL.md`. 3. The resulting command is passed to a shell. 4. The shell interprets the injected metacharacters before starting the Python script. 5. The attacker-controlled command runs with the operating-system permissions of the Agent process. ### Impact Assessment Successful exploitation provides arbitrary local command execution ...[truncated 575 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
deepwiki_ask.py:351
Finding

Arbitrary Local File Read and Disclosure to an External MCP Service

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Confidence
85% confidence
Finding

os.system() and os exec-family calls run shell commands with the process's full privileges, enabling arbitrary command execution.

Content

Scanner excerpt · deepwiki_ask.py (reported line 23)May include surrounding context.

python
if sys.platform == 'win32':
    try:
        os.system('chcp 65001 >nul 2>&1')
        sys.stdout.reconfigure(encoding='utf-8')
        sys.stderr.reconfigure(encoding='utf-8')
    except Exception:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill invokes Python, shell-style commands, file I/O, MCP, and outbound network access but does not declare any explicit tool scope or permission boundaries. That makes the skill over-privileged by default and increases the chance of unintended tool use, data exfiltration, or dangerous command execution if the skill is auto-invoked or its parameters are influenced by untrusted input.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill does not warn users that repository names, topics, and questions will be transmitted to DeepWiki MCP over the network. This reduces informed consent and can expose sensitive repo identifiers or private investigative context to a third party, especially if users assume the analysis is local.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The trigger conditions are broad enough to activate on ordinary repository-related questions, which can cause the agent to send data to external services or use powerful tools when the user did not clearly request that behavior. In a skill that performs networked repository queries, ambiguous activation raises the risk of unintended disclosure and unnecessary tool execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This skill sends user-supplied repository names, topics, and freeform questions to https://mcp.deepwiki.com/mcp, which may include sensitive internal repository identifiers, source-related context, or proprietary questions. In an agent setting, users may not realize their inputs are being transmitted to a third-party service, creating a privacy and data-governance risk rather than a memory-safety flaw.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The description is presented bilingually and the remainder of the document is primarily Chinese, but there is no statement that users may choose their preferred language. This can create a locale-policy concern if the skill implicitly defaults to a specific language without documenting user choice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

On startup, main() calls save_default_config(), which can create config.json in the script directory via a file write. There is no prompt, visible message, or help text informing the user that executing the tool may modify the local filesystem.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.