T09 · Insecure Skill Coding Practices
- Location
scripts/http_client.py:86- Finding
Authentication Headers May Be Disclosed Through Unintended Cross-Origin Redirects
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a mostly coherent command-line HTTP client, but its credential-handling and redirect behavior create review-worthy risk before installation.
Review before installing or using with real credentials. Avoid --verbose with secrets, avoid --no-verify except in controlled local testing, do not pass production tokens directly on the command line, and treat redirects/output files carefully because authenticated requests or saved responses may expose sensitive data.
scripts/http_client.py:86Authentication Headers May Be Disclosed Through Unintended Cross-Origin Redirects
scripts/http_client.py:228Verbose Output Can Expose Authentication Tokens and API Keys
SKILL.md:25Documentation Encourages Supplying Secrets Through Process Arguments
The code substantially matches the declared HTTP client purpose: it makes HTTP requests from the command line, supports Bearer and Basic auth plus API-key headers, custom headers, JSON and form bodies, response formatting, timing, and agent-friendly output. However, the description explicitly claims 'history logging,' and there is no implementation of request/response history storage or logging beyond immediate console output. This is a description-behavior mismatch due to an overclaimed feature, though the primary purpose is otherwise accurate.
The skill enables network access and file writing but does not declare any tool scope or permissions boundary in the skill manifest. In an agent environment, this increases the chance that the skill is invoked with broader-than-expected capabilities, allowing unreviewed outbound requests and response persistence.
The documentation encourages sending authenticated requests and optionally writing responses to files, but it does not warn that credentials, secrets, request bodies, and returned data may be sensitive. In agent-driven use, this omission can lead users to transmit or persist tokens, passwords, or confidential API responses without adequate caution.
Documenting a --no-verify option without a strong warning normalizes disabling TLS certificate validation, which exposes requests to man-in-the-middle interception and credential theft. This is especially risky because the same tool supports Bearer tokens, Basic auth, and API keys, all of which may be sent over compromised connections.
Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
return text
def build_request(method, url, headers=None, body=None, no_verify=False):
"""Build a urllib Request object."""
req = urllib.request.Request(url, method=method.upper())
if headers:
When --no-verify is used, the client disables certificate validation and hostname checking, allowing man-in-the-middle interception or tampering of HTTPS traffic. This is especially dangerous because the tool handles credentials and API tokens, so an attacker on the network path could capture secrets or alter responses.
return req
def do_request(req, timeout=30, follow_redirects=False, no_verify=False):
"""Execute the HTTP request and return (response_code, headers, body, elapsed_ms)."""
ctx = None
if no_verify:
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
Examples:
python3 http_client.py GET https://httpbin.org/get
python3 http_client.py POST https://httpbin.org/post --json '{"key": "value"}'
python3 http_client.py GET https://api.example.com/me --bearer mytoken123
python3 http_client.py GET https://api.example.com/ --auth user:pass
python3 http_client.py POST https://api.example.com/ --form "name=test&val=1"
python3 http_client.py GET https://httpbin.org/get --output-json
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
Examples:
python3 http_client.py GET https://httpbin.org/get
python3 http_client.py POST https://httpbin.org/post --json '{"key": "value"}'
python3 http_client.py GET https://api.example.com/me --bearer mytoken123
python3 http_client.py GET https://api.example.com/ --auth user:pass
python3 http_client.py POST https://api.example.com/ --form "name=test&val=1"
python3 http_client.py GET https://httpbin.org/get --output-json
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
Examples:
python3 http_client.py GET https://httpbin.org/get
python3 http_client.py POST https://httpbin.org/post --json '{"key": "value"}'
python3 http_client.py GET https://api.example.com/me --bearer mytoken123
python3 http_client.py GET https://api.example.com/ --auth user:pass
python3 http_client.py POST https://api.example.com/ --form "name=test&val=1"
python3 http_client.py GET https://httpbin.org/get --output-json
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
Examples:
python3 http_client.py GET https://httpbin.org/get
python3 http_client.py POST https://httpbin.org/post --json '{"key": "value"}'
python3 http_client.py GET https://api.example.com/me --bearer mytoken123
python3 http_client.py GET https://api.example.com/ --auth user:pass
python3 http_client.py POST https://api.example.com/ --form "name=test&val=1"
python3 http_client.py GET https://httpbin.org/get --output-json
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
Examples:
python3 http_client.py GET https://httpbin.org/get
python3 http_client.py POST https://httpbin.org/post --json '{"key": "value"}'
python3 http_client.py GET https://api.example.com/me --bearer mytoken123
python3 http_client.py GET https://api.example.com/ --auth user:pass
python3 http_client.py POST https://api.example.com/ --form "name=test&val=1"
python3 http_client.py GET https://httpbin.org/get --output-json
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
Examples:
python3 http_client.py GET https://httpbin.org/get
python3 http_client.py POST https://httpbin.org/post --json '{"key": "value"}'
python3 http_client.py GET https://api.example.com/me --bearer mytoken123
python3 http_client.py GET https://api.example.com/ --auth user:pass
python3 http_client.py POST https://api.example.com/ --form "name=test&val=1"
python3 http_client.py GET https://httpbin.org/get --output-json
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
Examples:
python3 http_client.py GET https://httpbin.org/get
python3 http_client.py POST https://httpbin.org/post --json '{"key": "value"}'
python3 http_client.py GET https://api.example.com/me --bearer mytoken123
python3 http_client.py GET https://api.example.com/ --auth user:pass
python3 http_client.py POST https://api.example.com/ --form "name=test&val=1"
python3 http_client.py GET https://httpbin.org/get --output-json
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
Examples:
python3 http_client.py GET https://httpbin.org/get
python3 http_client.py POST https://httpbin.org/post --json '{"key": "value"}'
python3 http_client.py GET https://api.example.com/me --bearer mytoken123
python3 http_client.py GET https://api.example.com/ --auth user:pass
python3 http_client.py POST https://api.example.com/ --form "name=test&val=1"
python3 http_client.py GET https://httpbin.org/get --output-json
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
Examples:
python3 http_client.py GET https://httpbin.org/get
python3 http_client.py POST https://httpbin.org/post --json '{"key": "value"}'
python3 http_client.py GET https://api.example.com/me --bearer mytoken123
python3 http_client.py GET https://api.example.com/ --auth user:pass
python3 http_client.py POST https://api.example.com/ --form "name=test&val=1"
python3 http_client.py GET https://httpbin.org/get --output-json
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
Examples:
python3 http_client.py GET https://httpbin.org/get
python3 http_client.py POST https://httpbin.org/post --json '{"key": "value"}'
python3 http_client.py GET https://api.example.com/me --bearer mytoken123
python3 http_client.py GET https://api.example.com/ --auth user:pass
python3 http_client.py POST https://api.example.com/ --form "name=test&val=1"
python3 http_client.py GET https://httpbin.org/get --output-json
The script writes HTTP response data to a user-specified file via --output, which can overwrite local files, but there is no pre-write confirmation or explicit warning comment/docstring about that file write behavior. Although file output is a normal feature of an HTTP client, this code path lacks any disclosure before performing the write.
No suspicious patterns detected.