SKY-D356 · Security in code
Cleartext outbound HTTP
A URL that starts with http:// is sent without encryption. SKY-D356 reports Python requests, httpx and urllib calls whose URL has an explicit http:// scheme and a host other than the local machine. In Rust it reports a dispatched reqwest request that targets a cleartext URL and sets Basic, Bearer or Authorization credentials.
- Languages
- Python, Rust
- Quality gate
- counted toward the gate limits (full and diff scans)
- Finding type
- review
Why it matters
Anyone on the network path, such as a shared Wi-Fi, a compromised router or a cloud neighbour, can read the request and the reply, including tokens, cookies and personal data, and can change the reply, for example to send back wrong prices or a malicious download.
What Skylos flags
import requests def fetch_rates(currency): response = requests.get(f"http://rates.example.com/v1/{currency}", timeout=10) response.raise_for_status() return response.json()What Skylos leaves alone
import requests def sidecar_ready(): response = requests.get("http://127.0.0.1:15000/ready", timeout=2) return response.okWhy Skylos leaves it alone
The request goes to a loopback address, so it never leaves the machine. Skylos skips localhost and loopback IP addresses when the host part of the URL is complete.
More languages
Rust
Flagged
use reqwest::blocking::Client;pub fn status(token: &str) { let client = Client::new(); let _ = client.get("http://api.example.org/status").bearer_auth(token).send();}Not flagged
use reqwest::blocking::Client;pub fn status(token: &str) { let client = Client::new(); let _ = client.get("https://api.example.org/status").bearer_auth(token).send();}Why Skylos leaves it alone
The client uses HTTPS for the authenticated request.
How Skylos decides
- Rust requires a literal HTTP destination, a recognized reqwest client, an authentication API or Authorization header, and a blocking send or an async request that is polled. A caller-supplied client can still reject the URL at runtime. Local HTTPS-only builders, loopback addresses and unpolled request futures stay quiet.
- Finds
get,post,put,patch,delete,head,optionsandrequeston therequestsandhttpxmodules, andurllib.request.urlopen()andurllib.request.Request(), resolved through imports. - Reads the URL: the first argument (the second for
request(method, url)), orurl=. It uses the literal value, or the fixed text at the start of an f-string,+expression or local name. - Reports MEDIUM when that text starts with
http://and names a host, or when it is a fixedhttp://prefix followed by unknown text. - Skips
localhostand loopback addresses such as127.0.0.1and[::1], once the host part is complete. The finding records a transport choice; it does not claim that sensitive data is sent.
How to fix it
Use https://. If the other side only speaks HTTP inside a private network, put it behind TLS or keep the traffic on the local machine.
import requests def fetch_rates(currency):Removed: response = requests.get(f"http://rates.example.com/v1/{currency}", timeout=10)Added: response = requests.get(f"https://rates.example.com/v1/{currency}", timeout=10) response.raise_for_status() return response.json()When it can be wrong
- A call to a service on a private network or a container next to yours, such as
http://redis-proxy:8080/, is reported; only loopback hosts are skipped. - Public data fetched over HTTP on purpose, such as a test fixture server, is reported the same way.
Seeing a case that isn't listed here? Report the wrong result so the rule can be fixed. Don't paste company code: describe the shape of it.
How to silence it
Mark a reviewed line and say why. Only the listed rule is hidden.
Python requests.get(url) # skylos: ignore[SKY-D356] mesh sidecar adds mTLSAccept the findings you already have with
skylos baseline ., then scan with--baselineso only new ones are listed.[tool.skylos] ignore = ["SKY-D356"]turns the rule off for the whole project.