Skip to content

fix: remove local filesystem reads from flaunch and zora providers - #1432

Open
CarsonRoscoe wants to merge 3 commits into
mainfrom
fix/remove-local-file-reads-flaunch-zora
Open

fix: remove local filesystem reads from flaunch and zora providers#1432
CarsonRoscoe wants to merge 3 commits into
mainfrom
fix/remove-local-file-reads-flaunch-zora

Conversation

@CarsonRoscoe

@CarsonRoscoe CarsonRoscoe commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

Both providers treated any non-URL image string as a local filesystem path, read it with fs.readFile, and uploaded the bytes to a third-party IPFS pinning service (web2-api.flaunch.gg and Pinata respectively), which pins them publicly. Because image is an LLM-supplied tool argument whose description explicitly advertised "Local image file path", an agent could be induced to read an arbitrary file off the host and publish it.

The local-file affordance is not useful to an agent, which has no knowledge of the host filesystem. It only ever served direct programmatic SDK callers, who can perform the read themselves.

  • flaunch: image accepts http(s):// URLs or data: URIs
  • zora: image accepts https:///ipfs:// URIs or data: URIs
  • Anything else is rejected before any file or network access
  • Zod schemas reject non-URL values, so the constraint is also visible to the model rather than surfacing only as a runtime error
  • Tool/schema descriptions and READMEs no longer advertise local paths

Callers publishing a local file now pass a data URI:

image: `data:image/png;base64,${fs.readFileSync(p, "base64")}`

Tests

Manually tested and verified

Checklist

A couple of things to include in your PR for completeness:

  • Added documentation to all relevant README.md files
  • Added a changelog entry

Both providers treated any non-URL `image` string as a local filesystem
path, read it with `fs.readFile`, and uploaded the bytes to a third-party
IPFS pinning service (web2-api.flaunch.gg and Pinata respectively), which
pins them publicly. Because `image` is an LLM-supplied tool argument whose
description explicitly advertised "Local image file path", an agent could
be induced to read an arbitrary file off the host and publish it.

The local-file affordance is not useful to an agent, which has no
knowledge of the host filesystem. It only ever served direct programmatic
SDK callers, who can perform the read themselves.

- flaunch: `image` accepts `http(s)://` URLs or `data:` URIs
- zora: `image` accepts `https://`/`ipfs://` URIs or `data:` URIs
- Anything else is rejected before any file or network access
- Zod schemas reject non-URL values, so the constraint is also visible
  to the model rather than surfacing only as a runtime error
- Tool/schema descriptions and READMEs no longer advertise local paths

Callers publishing a local file now pass a data URI:

    image: `data:image/png;base64,${fs.readFileSync(p, "base64")}`

Co-Authored-By: Claude <noreply@anthropic.com>
@cb-heimdall

Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

Per CONTRIBUTING-TYPESCRIPT.md, breaking changes take a minor bump.
Restricting `image` to remote URLs and data URIs breaks callers that
currently pass a local file path, so this is not a patch. Also added the
data URI migration snippet to the changeset so it lands in the published
changelog rather than only in the PR description.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation action provider New action provider typescript labels Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action provider New action provider documentation Improvements or additions to documentation typescript

Development

Successfully merging this pull request may close these issues.

2 participants