T03 · Remote Payload Retrieval and Execution
- Location
guides/01-installation.md:78- Finding
Mutable Remote Homebrew Installer Is Downloaded and Executed Directly
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This HTTPie skill is a coherent command-line API helper, but it asks agents to perform network requests, installations, credential use, and persistent session handling with several under-scoped safety controls.
Install only if you are comfortable reviewing commands before execution. Prefer user-scoped or pinned installations, avoid curl-to-shell and mutable binary downloads, do not put real secrets directly in commands, keep TLS verification enabled except in isolated testing, and treat HTTPie session files as sensitive credentials.
guides/01-installation.md:78Mutable Remote Homebrew Installer Is Downloaded and Executed Directly
guides/01-installation.md:172Unpinned Executable Binaries Are Installed Without Integrity Verification
guides/01-installation.md:91Unpinned Python Packages and Optional Plugins Expand the Supply-Chain Attack Surface
The binary installation method downloads a remote file with curl and writes it directly into /usr/local/bin/http, then marks it executable, with no integrity verification, overwrite warning, or privilege/scope warning. In an agent-driven workflow this creates a high-risk path for replacing executables or installing unverified code into a trusted system location.
The configuration example recommends setting --verify=no as a default option, which disables TLS certificate validation for all future requests. This normalizes insecure transport and enables man-in-the-middle interception or spoofing of API endpoints, including theft of credentials and session data.
The curl-to-HTTPie mapping includes curl -k to http --verify=no without a strong warning, normalizing a dangerous way to bypass TLS certificate validation. In documentation, especially configuration-rich CLI guidance, this can lead users to disable HTTPS protections and become vulnerable to man-in-the-middle attacks.
| `curl -H "Key: Val"` | `http "Key: Val"` | 请求头 |
| `curl -d '{"k":"v"}'` | `http k=v` | JSON 请求体 |
| `curl -u user:pass` | `http -a user:pass` | Basic 认证 |
| `curl -k` | `http --verify=no` | 跳过 SSL 验证 |
| `curl -L` | `http --follow` | 跟随重定向 |
| `curl -o file` | `http -d -o file` | 保存到文件 |
| `curl -v` | `http -v` | 详细输出 |
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
# Ubuntu/Debian
sudo apt update && sudo apt install ca-certificates
sudo update-ca-certificates
# macOS
The rm ~/.config/httpie/sessions/api.example.com/my-session.json example permanently deletes session state and may remove saved cookies, headers, or authentication material without recovery. In documentation, destructive commands are risky when presented without a clear warning, backup step, or confirmation-safe alternative.
cat ~/.config/httpie/sessions/*/my-session.json
rm ~/.config/httpie/sessions/api.example.com/my-session.json
### 参考资源
The skill includes example commands for POST, PUT, PATCH, and DELETE requests and also shows redirecting downloaded content to a local file, but it does not warn users that these examples can modify remote systems or persist untrusted data locally. In an agent context, this omission increases the chance that a user or automation executes destructive requests against real endpoints or writes unsafe content to disk without review.
The guide explicitly tells an AI to directly execute installation and verification commands, including package installation and a live network request, without requiring user confirmation or warning about system changes and external connectivity. In an agent context, this can cause unintended software installation, environment modification, and outbound traffic on the user's machine.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Ubuntu / Debian:
sudo apt update
sudo apt install httpie
http --version
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Ubuntu / Debian:
sudo apt update
sudo apt install httpie
http --version
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Ubuntu / Debian:
sudo apt update
sudo apt install httpie
http --version
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Ubuntu / Debian:
sudo apt update
sudo apt install httpie
http --version
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Ubuntu / Debian:
sudo apt update
sudo apt install httpie
http --version
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Ubuntu / Debian:
sudo apt update
sudo apt install httpie
http --version
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Ubuntu / Debian:
sudo apt update
sudo apt install httpie
http --version
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Ubuntu / Debian:
sudo apt update
sudo apt install httpie
http --version
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Ubuntu / Debian:
sudo apt update
sudo apt install httpie
http --version
The uninstall section provides destructive removal commands without warning that software will be removed and workflows depending on HTTPie may break. In an autonomous agent setting, these commands could be run without the user's informed consent, causing avoidable disruption.
The guide includes examples that embed secrets directly in commands (API keys, bearer tokens, and username:password) and later demonstrates file downloads, but it does not explicitly warn users that shell history, logs, screenshots, or verbose output may expose credentials, and that downloads write files to the local filesystem. In an AI/agent context, the earlier 'AI 可以直接执行以下命令并返回响应' language increases risk because an agent may execute these examples against real endpoints with substituted secrets or create local files without the user fully appreciating the side effects.
This example shows sending a custom API key header to an external endpoint. In isolation the endpoint is illustrative, but the pattern normalizes putting secrets directly on the command line, which can leak via shell history, process listings in some environments, transcripts, or copied output; in an agent setting, it may also encourage automatic exfiltration of credentials to remote services.
# 添加自定义请求头(使用 : 语法)
http https://api.example.com/users "X-API-Key: abc123" "Accept: application/json"
# 发送带认证头的 POST 请求
http POST https://api.example.com/data \
This command includes a bearer token in an Authorization header for a remote POST request. Even though the token is truncated, the example teaches a pattern that can expose live tokens in command history, logs, AI transcripts, or verbose output, and it sends data externally to an arbitrary endpoint.
http https://api.example.com/users "X-API-Key: abc123" "Accept: application/json"
# 发送带认证头的 POST 请求
http POST https://api.example.com/data \
"Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..." \
"Content-Type: application/json" \
name="测试"
The Basic auth example embeds a literal username and password in a command sent to an external service. This is a well-known unsafe pattern because credentials can be exposed through shell history, copied terminal output, AI execution logs, and documentation reuse with real values substituted by users.
# -a 或 --auth 指定用户名:密码
http -a admin:secret123 https://api.example.com/protected
# 只指定用户名(会提示输入密码)
http -a admin https://api.example.com/protected
This example places a bearer token directly in the command while contacting an external API. Such tokens are sensitive and can be leaked via shell history, logs, screenshots, terminal recording, or agent transcripts; the surrounding guide does not warn about these exposures.
# 直接在请求头中传入 Token
http https://api.example.com/me "Authorization: Bearer my-access-token"
This Digest auth example includes inline credentials for an external request. Although Digest avoids sending a plaintext password over the network, putting credentials in the shell command still risks local disclosure through history, logs, and agent observation.
http --auth-type=digest -a user:pass https://api.example.com/digest
This example shows a bearer token used against a real external service endpoint (GitHub API). Even with a placeholder token, it encourages sending sensitive credentials to a remote service and may be copied verbatim with real tokens, exposing them in shell history, notebooks, CI logs, or agent traces.
# 查询当前用户信息(Bearer Token)
http https://api.github.com/user "Authorization: Bearer ghp_xxxxx"
The session guidance explicitly stores cookies and authentication state on disk and even encourages inspecting the session file, but it does not warn that these files may contain bearer-equivalent credentials. In a CLI skill used for API testing, local credential persistence is expected functionality, yet omission of handling guidance can lead to credential theft from shared machines, backups, or permissive file permissions.