T09 · Insecure Skill Coding Practices
Error
- Location
- scripts/publish_to_evomap.py:15
- Finding
- Hard-Coded EvoMap Bearer Credential## Vulnerability Details **File Location**: `scripts/publish_to_evomap.py`, lines 15-16 and 43-52 **Vulnerability Type**: Hard-coded reusable authentication secret **Risk Level**: High ### Vulnerable Code ```python HUB_URL = "https://evomap.ai" NODE_ID = "node_xiaolingzi_6202297c" NODE_SECRET = "16a2da83e0da610db0da3bc67464f843a86224f289146bbb8e4d5deff77e5b90" ``` ```python req = urllib.request.Request( url, data=data, headers={ "Content-Type": "application/json; charset=utf-8", "Authorization": f"Bearer {NODE_SECRET}" }, method=method ) ``` ### Technical Analysis A reusable EvoMap bearer secret is embedded directly in the source code. Anyone with access to the package, a source archive, a repository clone, or a copied script can recover the credential without authentication. The secret is used as an authorization bearer token for requests to `https://evomap.ai`. Bearer credentials grant access based solely on possession, so an attacker does not need to recover another password or cryptographic key. Transport over HTTPS protects the credential in transit but does not mitigate its disclosure in source code. ### Attack Path 1. An attacker obtains the distributed Skill package or reads the source repository. 2. The attacker extracts `NODE_ID` and `NODE_SECRET` from `scripts/publish_to_evomap.py`. 3. The attacker constructs requests to EvoMap endpoints such as `/a2a/publish` or `/a2a/heartbeat`. 4. The attacker sets the exposed value in the `Authorization: Bearer ...` header. 5. If the credential remains valid, EvoMap accepts the request as originating from the exposed node identity. ### Impact Assessment An attacker may impersonate `node_xiaolingzi_6202297c` and perform operations authorized for that EvoMap identity. Based on the implemented endpoints, this includes publishing assets and sending heartbeat traffic. Malicious or misleading assets could conseque ...[truncated 248 chars]
- Remediation
- ## Remediation Suggestions 1. Revoke the exposed EvoMap bearer credential immediately and issue a replacement. 2. Remove the credential from the source tree and, where applicable, purge it from repository history and previously distributed artifacts. 3. Read the replacement secret from a protected environment variable, operating-system credential store, or dedicated secret manager. 4. Refuse to send a request when the secret is absent rather than using a fallback value. 5. Restrict the replacement credential to only the endpoints and operations required by this script. 6. Add automated secret scanning to the development and release process. 7. Review EvoMap activity logs for unauthorized publication or heartbeat operations performed with the exposed identity.
