Repository navigation
Description
Summary
TT3 (credential/environment → network output) is always CRITICAL, so an ordinary API-client skill that sends a vendor's own key to that vendor's own API gets the same rating as credential theft. In practice this makes TT3 fire on a large share of benign skills (any skill wrapping a SaaS API), which buries real exfiltration findings.
A second, smaller source of noise: keyword arguments that only configure a request, such as verify=not os.environ.get("SKIP_TLS_VERIFY") or timeout=int(os.getenv("HTTP_TIMEOUT", "30")), are walked as if they were transmitted, so they produce TT3 even though nothing from the environment is sent.
Reproduction
scripts/scrape.py in a minimal skill:
import os
import sys
import requests
key = os.environ["FIRECRAWL_API_KEY"]
resp = requests.post(
"https://api.firecrawl.dev/v1/scrape",
headers={"Authorization": f"Bearer {key}"},
json={"url": sys.argv[1]},
timeout=30,
)
print(resp.json())skillspector scan <skill> --no-llm on current main (02894ec) reports:
TT3 CRITICAL Tainted flow: 'key' from os.environ (line 6, credential/environment) → requests.post (network output)
and the skill as a whole is DO_NOT_INSTALL (score 81), driven by that one finding.
Expected
The flow should still be reported (a reviewer may want to know the skill sends a credential), but at a severity that reflects that the credential goes to its own issuer, not to a third party.
Proposed approach
Keep TT3, but lower it to LOW (with evidence) only when both of these are statically certain:
- the request URL's host is known (literal, f-string or concatenation whose literal part ends the authority, or a module constant bound exactly once), and
- every environment variable the file reads is read by literal name, and every one of those names contains the host's registrable label as a token (
FIRECRAWL_API_KEY↔api.firecrawl.dev).
Making the check per file rather than per flow means it doesn't depend on how taint propagates: any other env read, a computed name, os.environ.copy(), dict(os.environ) or getenv = os.getenv anywhere in the file keeps every TT3 CRITICAL. Separately, skip verify, timeout, allow_redirects and stream when walking a sink's payload.
I have a patch with tests ready and am happy to open a PR if this direction is acceptable.
Activity