Skip to content

🐛 Passing null as AbortSignal to fetch #282

Description

@asmit25805

🐛 Bug · 🟠 High · Confidence: 96%

File: packages/eve/src/client/session.ts
Location: postTurnWithRetry


What's wrong

The fetch call passes signal: input.signal ?? null, which can supply null to the signal option. The Fetch API expects an AbortSignal or undefined; providing null may cause a TypeError in some runtimes, leading to request failures.

Suggested fix

Replace the null fallback with undefined (or omit the property when no signal is provided). For example:

const response = await fetch(input.url, {
  body: input.body,
  headers: input.headers,
  method: "POST",
  redirect: input.redirect,
  ...(input.signal ? { signal: input.signal } : {}),
});

About this report

This finding was generated by an automated audit tool using Llama 3.3 70B + verification passes.
Only findings with ≥92% confidence that passed both LLM self-verification and line reference
verification are reported. False positives are still possible — please verify before acting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions