rewrite_question
Skill claims to only rewrite queries but secretly connects to an external IP (47.77.199.56), embeds a default admin JWT credential, queries a Milvus database, and executes Python subprocesses — all undeclared.
SKILL.md declares 'network: NONE' yet rewrite_question.py:472 makes HTTP POST requests to an externally hosted Gemini API at the hardcoded IP 47.77.199.56. The skill description says it only 'rephrases questions' with no mention of LLM API calls or external network communication.
rewrite_question.py:472 Why this conclusion was reached
3/4 dimensions flagged3 undeclared or violating capabilities were inferred.
1 high-risk artifacts or egress signals were extracted.
The report includes 0 attack-chain steps and 3 severe findings.
Dependencies are present but no obvious high-risk issue stands out.
What drove the risk score up
47.77.199.56 hardcoded as Gemini API endpoint — no DNS, points to Chinese infrastructure (line 559)
Default admin JWT token (BI-eyJ...Ij8pY) with userId:'admin' and exp 2027-03-13 embedded in code (lines 562-570)
SKILL.md declares network:NONE but code makes HTTP POST to 47.77.199.56 via httpx
Connects to Milvus (pymilvus) to fetch QA pairs — not declared in SKILL.md
index.js uses child_process.spawn to execute Python; SKILL.md declares no shell access
Silent SQL output via QA pair matching (Path A) — not mentioned in skill description
Most important evidence
Network capability declared as NONE but actual traffic exists
SKILL.md declares 'network: NONE' yet rewrite_question.py:472 makes HTTP POST requests to an externally hosted Gemini API at the hardcoded IP 47.77.199.56. The skill description says it only 'rephrases questions' with no mention of LLM API calls or external network communication.
rewrite_question.py:472 Default JWT token embedded in source code
A default JWT token (BI-eyJ...Ij8pY) is hardcoded in _get_gemini_config() containing userId:'admin' and an expiration of March 2027. While this may be an internal service token, embedding credentials in source code is a security risk and could leak in logs or version control.
rewrite_question.py:562 Hardcoded external IP address for all LLM communication
The Gemini API endpoint defaults to a raw IP address (47.77.199.56) rather than a DNS hostname. This IP is in Chinese address space (47.77.x.x). The base URL is not configurable via SKILL.md or documented, and all queries — potentially including user data and conversation context — are sent to this address.
rewrite_question.py:559 Undeclared Milvus database access
The skill connects to a Milvus vector database (rewrite_question.py:584-596) to fetch QA pairs. The connection supports user/password authentication. SKILL.md declares database:NONE and no mention of database access anywhere in the documentation.
rewrite_question.py:584 Undeclared Python subprocess execution via Node.js wrapper
index.js uses child_process.spawn to execute Python code inline, passing the skill directory and JSON payload as arguments. This is shell/code execution that is not declared in SKILL.md (shell:NONE).
index.js:62 Hidden SQL bypass via QA pair matching not documented
Path A (rewrite_question.py:227-237) silently outputs SQL when a user query matches a QA pair in Milvus — bypassing the normal rewriting flow entirely. The rewritten query is unchanged, but matched_sql contains a full SQL statement. This 'shortcut' behavior is not described in SKILL.md.
rewrite_question.py:227 No dependency pinning — uses httpx, pymilvus, python-dotenv without versions
No requirements.txt, pyproject.toml, or package.json exists. The code imports httpx, pymilvus, python-dotenv with no version constraints, making it vulnerable to dependency confusion or supply chain attacks.
rewrite_question.py:1 Declared capability vs actual capability
index.js:61 — writes JSON output to file via Python subprocess rewrite_question.py:472 — httpx.Client POST to http://47.77.199.56; SKILL.md:network:NONE index.js:62 — spawn(PYTHON_BIN, ['-c', script, skillDir]) rewrite_question.py:556 — os.getenv for GEMINI_API_KEY, MILVUS_HOST, MILVUS_PASSWORD No cross-skill invocation found No clipboard access No browser access rewrite_question.py:584-596 — PyMilvusClient query() reads from Milvus; supports user/password auth Suspicious artifacts and egress
47.77.199.56 rewrite_question.py:559
http://47.77.199.56/api/v1beta rewrite_question.py:559
Dependencies and supply chain
| Package | Version | Source | Known vuln | Notes |
|---|---|---|---|---|
| httpx | unpinned | import | No | No requirements.txt or pyproject.toml; httpx version uncontrolled |
| pymilvus | unpinned | import | No | Used for Milvus DB access; optional import with try/except |
| python-dotenv | unpinned | import | No | Used for .env loading; optional import with try/except |
| asyncio | built-in | stdlib | No | Standard library, no risk |
File composition
rewrite_question.py index.js