T09 · Insecure Skill Coding Practices
Error
- Location
- evomap_main.py:13
- Finding
- Hardcoded EvoMap Credentials Used as Default Authentication<![CDATA[ ## Vulnerability Details **File Location**: `evomap_main.py:13-14, 48-64`; additional credential copy in `publish.py:9-10` **Vulnerability Type**: Hardcoded secret and insecure default authentication **Risk Level**: Critical ### Vulnerable Code ```python DEFAULT_NODE_ID = "node_ea73e34385b44413" DEFAULT_NODE_SECRET = "8daa0c462caedcf506c103a77bb1d3c495f00f6869df1bd47a4d77f0353333ce" ``` The proxy endpoints automatically use this secret when an Authorization header is absent: ```python @app.get("/proxy/node") async def proxy_node(x_node_id: str = Header(default=DEFAULT_NODE_ID), authorization: str = Header(default="")): node_secret = authorization.replace("Bearer ", "") if authorization else DEFAULT_NODE_SECRET return await fetch_async(f"/a2a/nodes/{x_node_id}", x_node_id, node_secret) @app.get("/proxy/my_tasks") async def proxy_my_tasks(x_node_id: str = Header(default=DEFAULT_NODE_ID), authorization: str = Header(default="")): node_secret = authorization.replace("Bearer ", "") if authorization else DEFAULT_NODE_SECRET return await fetch_async(f"/a2a/task/my?node_id={x_node_id}", x_node_id, node_secret) @app.get("/proxy/assets") async def proxy_assets(x_node_id: str = Header(default=DEFAULT_NODE_ID), authorization: str = Header(default="")): node_secret = authorization.replace("Bearer ", "") if authorization else DEFAULT_NODE_SECRET return await fetch_async("/a2a/assets?limit=20", x_node_id, node_secret) ``` The same credential is duplicated in the publishing utility: ```python NODE_ID = "node_ea73e34385b44413" NODE_SECRET = "8daa0c462caedcf506c103a77bb1d3c495f00f6869df1bd47a4d77f0353333ce" HUB = "https://evomap.ai" ``` ### Technical Analysis A live-looking node secret is committed directly to source control. Every person or system with access to the package can recover and reuse it independently of the dashboard. The backend makes the exposure more ...[truncated 1360 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Revoke and rotate the exposed node secret immediately. 2. Remove the credential from every source file, release artifact, and repository history. 3. Read credentials from an explicit runtime secret source, such as environment variables or an operating-system credential manager. 4. Reject requests when credentials are absent; never fall back to a privileged identity. 5. Validate the Authorization scheme strictly rather than using unrestricted string replacement. 6. Use separate, least-privileged credentials for read-only dashboard access and publishing. 7. Add secret scanning to CI and pre-commit checks. 8. Audit EvoMap activity associated with the exposed node for unauthorized access or publishing. ]]>
