T09 · Insecure Skill Coding Practices
- Location
search_ent_simple.py:5- Finding
Enterprise lookup data transmitted over unencrypted HTTP
- Content
View full analysis
Vulnerability Details
File Location:
search_ent_simple.py:5-8, 26-27;ent_uniform_code.py:5-8, 36-42
Vulnerability Type: Plaintext external API communication
Risk Level: HighVulnerable Code
search_ent_simple.py:5-8, 26-27python config = { "host": "http://agent-data.ihdwork.com", "base_path": "/handi-ai", "endpoint": "/common-api/search-ent" } response = requests.get(url, params=params, timeout=10)ent_uniform_code.py:5-8, 36-42python config = { "host": "http://agent-data.ihdwork.com", "base_path": "/handi-ai", "endpoint": "/ent-analysis/uniform-code" } response = requests.post( url=url, headers=headers, data=json.dumps(payload, ensure_ascii=False), timeout=10 )Technical Analysis
Both scripts send enterprise lookup information to
agent-data.ihdwork.comusing plaintext HTTP. The transmitted information includes enterprise names, internal enterprise identifiers, and returned corporate records.HTTP does not provide transport confidentiality, endpoint authentication, or message integrity. An attacker with access to the network path—such as a malicious wireless access point, compromised proxy, local network attacker, or upstream network operator—can inspect or modify requests and responses.
Because this service supplies data used for enterprise identification and due diligence, response integrity is security-relevant. An attacker could replace the selected enterprise ID or returned uniform credit code without breaking any transport security control.
Attack Path
- A user asks the skill to look up an enterprise.
search_ent_simple.pysends the enterprise name as an HTTP query parameter.- A network-positioned attacker intercepts the plaintext request and learns which organization is being investigated.
- The attacker modifies the search response to return an attacker-selected enterpris ...[truncated 898 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace the HTTP endpoint with an approved HTTPS production endpoint:
python config = { "host": "https://agent-data.example.com", "base_path": "/handi-ai", "endpoint": "/common-api/search-ent" } - Retain certificate verification and never set
verify=False. - Fail closed if HTTPS is unavailable; do not downgrade automatically to HTTP.
- Confirm that the endpoint certificate matches the expected service hostname.
- Consider certificate or public-key pinning where the deployment and certificate-rotation model permit it.
- Document the external data recipient and ensure transmitting enterprise queries complies with applicable privacy and organizational policies.
- Use an approved production service rather than the test-environment address identified by the source-code comment.
- Add integration tests that reject non-HTTPS endpoint configurations.
- Replace the HTTP endpoint with an approved HTTPS production endpoint:
