Is @earendil-works/pi-ai safe?
- Node.js network egress
- Delegated authentication (OAuth 2.0 / OIDC)
@earendil-works/pi-ai is an AI npm_package analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators, though 2 risky constructs are reported for review. It can: delegated authentication and network egress — capabilities are what the code can do, not a verdict on intent. Risk score 0/100 (low).
@earendil-works/pi-ai 0.99.1
Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of @earendil-works/pi-ai's authors. Report a false positive.
Behavioral traits
How this component maps to the CSA agentic threat model. Descriptive — it never affects the risk score.
Findings (2)
The component makes outbound network requests.
* passthrough (`env.AI.fetch()`), which serves the gateway's provider passthrough at
* The only thing this module adds over calling `env.AI.fetch()` yourself is a type: `Ai#fetch`
* passthrough (`env.AI.fetch()`), which serves the gateway's provider passthrough at
* The only thing this module adds over calling `env.AI.fetch()` yourself is a type: `Ai#fetch`
throw new TypeError("createAiBindingFetch: the AI binding does not expose fetch()");const response = await fetch(url, {import { createServer } from "node:http";const response = await fetch(url, {const response = await fetch(url, init);
const response = await fetch(`${oauthHost}/api/oauth/device_authorization`, {const response = await fetch(`${oauthHost}/api/oauth/token`, {response = await fetch(`${oauthHost}/api/oauth/token`, {const response = await fetch(DEVICE_AUTHORIZATION_URL, {const response = await fetch(DEVICE_TOKEN_URL, {const response = await fetch(API_KEY_MINT_URL, {import { createServer } from "node:http";const response = await fetch(TOKEN_URL, {return await fetch(input, init);
response = await fetch(TOKEN_URL, {response = await fetch(TOKEN_URL, {const response = await fetch(new URL("/v1/oauth", gateway), {response = await fetch(new URL("/v1/oauth/token", gateway), {response = await fetch(new URL("/v1/oauth/device", gateway), {response = await fetch(url, {const response = await fetch(new URL("/v1/config", gateway), { headers, signal });Why it matters: Usually legitimate, but confirm the destinations are expected and no sensitive data leaves.
Fix: Confirm the destination hosts are expected and that no sensitive data is sent off-host.
An OAuth 2.0 / OpenID Connect delegated-authentication flow was detected (authorization-code / refresh-token / token-exchange grant, an OIDC authorize/discovery endpoint or id_token, or a delegation library). Tools authenticate with the end user's delegated, scoped credentials rather than a long-lived embedded service credential. (15 occurrence(s) shown as evidence).
const AUTHORIZE_URL = "https://claude.ai/oauth/authorize";
grant_type: "authorization_code",
grant_type: "refresh_token",
grant_type: "refresh_token",
* (auth.meta.com answers grant_type=refresh_token with 404 and issues no
* (auth.meta.com answers grant_type=refresh_token with 404 and issues no
grant_type: "authorization_code",
if (typeof token.id_token !== "string" || token.id_token.trim().length === 0) {grant_type: "refresh_token",
const AUTHORIZE_URL = `${AUTH_BASE_URL}/oauth/authorize`;grant_type: "authorization_code",
grant_type: "refresh_token",
grant_type: "authorization_code",
grant_type: "refresh_token",
grant_type: "refresh_token",
Fix: Delegated auth is a lower-blast-radius execution context than an embedded static credential. Confirm the requested scopes are minimal and that tokens are never logged or forwarded off-host.
Check your own component
Run the same evidence-backed scan on any MCP server, agent skill, or package.
Scan your own componentHow we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →