Catch hallucinated dependencies before your agent installs them
AI agents invent package names and cannot reason about real-world exploitation risk from CVSS numbers alone. They need deterministic signals for CVE risk, supply chain compromise, and package name integrity, including when the model hallucinated the dependency name itself.
the request
bash
curl "https://api.attestd.io/v1/check?product=redis&version=6.0.9" \
-H "Authorization: Bearer $ATTESTD_API_KEY"integration
agent_tool.py
import os
import attestd
client = attestd.Client(api_key=os.environ["ATTESTD_API_KEY"])
def check_software_safety(product: str, version: str) -> dict:
"""
Tool available to the agent for checking software risk state.
Returns structured, deterministic data. No interpretation needed.
"""
try:
risk = client.check(product, version)
except attestd.AttestdUnsupportedProductError as e:
if e.typosquat and e.typosquat.detected:
return {
"safe_to_deploy": False,
"action": "block_deployment",
"typosquat_kind": e.typosquat.kind,
"prefer": e.typosquat.resembles,
}
return {"safe_to_deploy": False, "action": "unknown_risk"}
return {
"safe_to_deploy": risk.risk_state == "none",
"risk_state": risk.risk_state,
"actively_exploited": risk.actively_exploited,
"recommended_version": risk.fixed_version or version,
"action": (
"block_deployment"
if risk.risk_state == "critical"
else "warn"
if risk.risk_state == "high"
else "proceed"
),
}
# Agent receives structured output. No ambiguity in the signal
result = check_software_safety("redis", "6.0.9")
# result["action"] → "block_deployment" | "warn" | "proceed"operational outcome
▸
Agents make deployment decisions with ground truth, not guesses.
Attestd returns the same answer every time for the same inputs. There is no probability and no scoring interpretation. When an agent invents a package name, typosquat.kind hallucination tells it what to install instead. An agent calling Attestd either gets proceed, block, or a corrected package name.