# vercel-ai-sdk-v2

> vercel-ai-sdk-v2: 8 Keryn rules for typescript, javascript (6 warning, 2 info).

Source: https://keryn.dev/rules/vercel-ai-sdk-v2/

8 rules · Keryn Software Licence · rules 0.8.0 · [all packs](https://keryn.dev/rules/)

**How to read a rule**

- **Severity**: How bad the finding is if it is real: `error` fails a default gate, `warning` and `info` do not.

- **Confidence**: **P0** exploitable as written; **P1** dangerous in context; **P2** a heuristic or a posture check: confirm by reading the code.

- **False-positive risk**: **low**: an exact API or flag, so hits are almost always real; **medium**: the pattern is legitimate in many programs, so check each hit; **high**: it finds a lead to confirm, so expect benign hits.

- **Edge**: The relationship the finding sits on. **reaches**: content or traffic gets to a thing; **calls**: one thing invokes another; **reads**: one thing reads from another; **writes**: one thing writes to another; **sends**: data leaves for another party; **grants**: authority is given or left unchecked; **depends_on**: something relies on a component it does not verify; **trusts**: one party believes another without evidence. The boundary it crosses, when there is one: **user->prompt** (untrusted input reaching a prompt); **model->code** (model output reaching code, a shell, a query or a page); **secret->outside** (a secret leaving the trusted side); **supply-chain** (code, models or prompts pulled in from outside).

- **Taxonomy chips**: References for readers who work in OWASP LLM 2025, OWASP Agentic, CWE or NIST AI RMF. They say where a rule belongs, not that a framework is satisfied.

## seceng.vercelai.streamtext-tools-without-maxsteps

`warning` typescript, javascript vercel-ai-sdk

Vercel AI SDK streamText uses tools without maxSteps. Tool-enabled agents should bound step count to reduce runaway execution.

Confidence **P2**: a heuristic or a posture check: confirm by reading the code. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-770](https://keryn.dev/taxonomies/cwe/#cwe-770-allocation-of-resources-without-limits-or-throttling) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [LLM10](https://keryn.dev/taxonomies/owasp-llm/#llm10-unbounded-consumption) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI08](https://keryn.dev/taxonomies/owasp-agentic/#asi08-cascading-failures)

Also reported under the older id `seceng.loop.vercel-ai-tools-no-maxsteps`.

## seceng.vercelai-tool-without-schema

`warning` typescript, javascript vercel-ai-sdk

Vercel AI SDK tool definition lacks an input schema. Tool arguments from the model may be unchecked or unexpectedly shaped.

Confidence **P2**: a heuristic or a posture check: confirm by reading the code. False-positive risk **medium**: the pattern is legitimate in many programs, so check each hit.

Edge inspected: [reads](https://keryn.dev/docs/edges/edge-kinds/#reads) one thing reads from another.

[CWE-20](https://keryn.dev/taxonomies/cwe/#cwe-20-improper-input-validation) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation)

## seceng.vercelai-dangerous-tool-without-approval

`warning` typescript, javascript vercel-ai-sdk

Vercel AI SDK tool with dangerous side-effect name executes without visible approval gate.

Confidence **P2**: a heuristic or a posture check: confirm by reading the code. False-positive risk **medium**: the pattern is legitimate in many programs, so check each hit.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-862](https://keryn.dev/taxonomies/cwe/#cwe-862-missing-authorization) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation)

## seceng.vercelai-tool-exec-shell-or-file

`warning` typescript, javascript vercel-ai-sdk

Vercel AI SDK tool executes shell, file, or network operation from tool arguments without visible allowlist validation.

Confidence **P2**: a heuristic or a posture check: confirm by reading the code. False-positive risk **medium**: the pattern is legitimate in many programs, so check each hit.

Edge inspected: [calls](https://keryn.dev/docs/edges/edge-kinds/#calls) one thing invokes another.

[CWE-78](https://keryn.dev/taxonomies/cwe/#cwe-78-os-command-injection) [CWE-22](https://keryn.dev/taxonomies/cwe/#cwe-22-path-traversal) [CWE-918](https://keryn.dev/taxonomies/cwe/#cwe-918-server-side-request-forgery) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI05](https://keryn.dev/taxonomies/owasp-agentic/#asi05-unexpected-code-execution) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation)

## seceng.vercelai-telemetry-records-prompts

`warning` typescript, javascript vercel-ai-sdk

Vercel AI SDK experimental\_telemetry appears to record prompts, messages, or metadata that may contain sensitive AI context.

Confidence **P2**: a heuristic or a posture check: confirm by reading the code. False-positive risk **medium**: the pattern is legitimate in many programs, so check each hit.

Edge inspected: [reads](https://keryn.dev/docs/edges/edge-kinds/#reads) one thing reads from another.

[CWE-532](https://keryn.dev/taxonomies/cwe/#cwe-532-insertion-of-sensitive-information-into-log-file) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM07](https://keryn.dev/taxonomies/owasp-llm/#llm07-system-prompt-leakage)

## seceng.vercelai-generateobject-without-schema

`info` typescript, javascript vercel-ai-sdk

Vercel AI SDK generateObject is used without an explicit schema. Unstructured model output may be trusted as structured data.

Confidence **P2**: a heuristic or a posture check: confirm by reading the code. False-positive risk **medium**: the pattern is legitimate in many programs, so check each hit.

Edge inspected: [trusts](https://keryn.dev/docs/edges/edge-kinds/#trusts) one party believes another without evidence.

[CWE-20](https://keryn.dev/taxonomies/cwe/#cwe-20-improper-input-validation) [LLM09](https://keryn.dev/taxonomies/owasp-llm/#llm09-misinformation) [LLM05](https://keryn.dev/taxonomies/owasp-llm/#llm05-improper-output-handling) [ASI09](https://keryn.dev/taxonomies/owasp-agentic/#asi09-human-agent-trust-exploitation)

## seceng.vercelai-output-to-database-without-validation

`warning` typescript, javascript vercel-ai-sdk

Vercel AI SDK generated text or object is written to persistent storage without visible validation.

Confidence **P2**: a heuristic or a posture check: confirm by reading the code. False-positive risk **medium**: the pattern is legitimate in many programs, so check each hit.

Edge inspected: [writes](https://keryn.dev/docs/edges/edge-kinds/#writes) one thing writes to another.

[CWE-20](https://keryn.dev/taxonomies/cwe/#cwe-20-improper-input-validation) [CWE-915](https://keryn.dev/taxonomies/cwe/#cwe-915) [LLM08](https://keryn.dev/taxonomies/owasp-llm/#llm08-vector-and-embedding-weaknesses) [LLM05](https://keryn.dev/taxonomies/owasp-llm/#llm05-improper-output-handling) [ASI06](https://keryn.dev/taxonomies/owasp-agentic/#asi06-memory-and-context-poisoning)

## seceng.vercelai-stream-without-moderation-buffer

`info` typescript, javascript vercel-ai-sdk

Vercel AI SDK streaming result is returned directly without visible moderation, buffering, or output safety filter.

Confidence **P1**: dangerous in context. False-positive risk **high**: it finds a lead to confirm, so expect benign hits.

Edge inspected: [sends](https://keryn.dev/docs/edges/edge-kinds/#sends) data leaves for another party.

[CWE-116](https://keryn.dev/taxonomies/cwe/#cwe-116-improper-encoding-or-escaping-of-output) [LLM05](https://keryn.dev/taxonomies/owasp-llm/#llm05-improper-output-handling) [ASI06](https://keryn.dev/taxonomies/owasp-agentic/#asi06-memory-and-context-poisoning)
