T09 · Insecure Skill Coding Practices
- Location
SKILL.md:154- Finding
Agent Secret May Be Transmitted over Plaintext HTTP
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a coherent game-platform integration skill with expected network and credential use, but users should use it only with trusted endpoints and HTTPS outside localhost.
Install only if you intend to connect an agent to this games platform. Treat secret_key as a credential, avoid logging it, and use HTTPS for any non-local base_url. Be aware that the included sample code is mostly Gobang-oriented and Chinese-language output is assumed by the documentation.
SKILL.md:154Agent Secret May Be Transmitted over Plaintext HTTP
Using a DELETE endpoint that accepts agent_id in the request body creates a parameter-abuse risk because callers may be able to target queue entries by supplying arbitrary identifiers instead of binding the action solely to the authenticated principal. In this skill context, the API already uses X-Agent-ID and X-Agent-Secret, so documenting a separate body-level agent_id increases the chance of confused-deputy behavior or accidental insecure server implementations.
DELETE /api/v1/matchmaking/queue
Body: {"agent_id": "uuid"}
The primary descriptive text is presented in Chinese, and the document does not indicate that language selection is optional or that the skill is intentionally limited to a Chinese-speaking or region-specific audience. The policy requires flagging language or locale constraints when they are imposed without user opt-in or clear justification.
The skill is explicitly designed to communicate over HTTP and transmit authentication material (X-Agent-ID, X-Agent-Secret) but does not warn users about network exposure, trust boundaries, or the risks of using insecure transport. In context, the sample even uses http://localhost:8080, which may normalize non-TLS usage and increase the chance of credential leakage if adapted to non-local deployments.
The registration flow sends agent metadata to an external service and receives sensitive credentials, but the skill provides no validation of transport security, server trust, or safe storage practices. This becomes dangerous if users point base_url at a remote or untrusted endpoint, as credentials and agent endpoint details could be intercepted or misused.
"""注册 Agent"""
url = f"{self.base_url}/api/v1/agents/register"
data = {"name": name, "skill_id": skill_id, "endpoint_url": endpoint_url, "game_types": game_types}
resp = requests.post(url, json=data)
result = resp.json()
if resp.status_code == 200:
return result["agent_id"], result["secret_key"]
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"""提交落子"""
url = f"{self.base_url}/api/v1/games/{game_id}/moves"
data = {"move": move, "agent_id": agent_id}
resp = requests.post(url, json=data, headers=self.headers)
return resp.json()
def list_games(self):
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"""提交落子"""
url = f"{self.base_url}/api/v1/games/{game_id}/moves"
data = {"move": move, "agent_id": agent_id}
resp = requests.post(url, json=data, headers=self.headers)
return resp.json()
def list_games(self):
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"""提交落子"""
url = f"{self.base_url}/api/v1/games/{game_id}/moves"
data = {"move": move, "agent_id": agent_id}
resp = requests.post(url, json=data, headers=self.headers)
return resp.json()
def list_games(self):
The behavior specification mandates that the agent 'must' output feedback in the provided Chinese format after every move, and all required examples are Chinese-only. This imposes a specific language on the user without opt-in or documented justification, which violates the language/locale policy for natural-language behavior.
The description and installed prompt are entirely in Chinese, which imposes a specific language on users without any indication of locale scoping, user preference, or opt-in. Under the policy, language constraints should either be optional or clearly documented as region-specific and justified.
The markdown instructs users to register an agent and obtain an agent_id and secret_key, but it does not include any warning that the secret_key is sensitive credential material. For markdown files, SQP-2 applies when the description omits warnings about behaviors that could affect privacy or system integrity, and credential handling fits that scope.
The skill documentation states the platform supports Gobang, Chinese Chess, and Go, and explicitly documents Chinese Chess move format as a from/to structure. However, the only agent loop example always constructs move = {"position": {"x": 7, "y": 7}}, which contradicts the implied generic game support in the code example and would not work for Chinese Chess as documented.