Skip to content

cloudflare

Cloudflare Pages and Workers: valid headers and redirects files, current binding types, and security rules for worker code. It requires javascript.

Check Stage Level What it does
cloudflare/headers commit recommended Checks that _headers holds only blocks of a path followed by indented name-value lines, and that the block for every path sets the content type, referrer, and framing headers.
cloudflare/redirects commit recommended Checks each redirect source, destination, and optional status: 200, 301, 302, 303, 307, or 308, without a force suffix.
cloudflare/stale-types push recommended Checks that a tracked environment types file matches what wrangler writes.
Setting What it sets
cloudflare.types_file Tracked Worker environment types file, relative to the repository root.
cloudflare.types_interface Environment interface name passed to wrangler types; OpenNext uses CloudflareEnv.

gspot selects it in a scope with filenames wrangler.toml, wrangler.json, wrangler.jsonc, _worker.js, or dependencies wrangler, @opennextjs/cloudflare, or file paths **/functions/_middleware.{js,ts}.

Rule file Installed when
.gspot/configurations/platform/cloudflare/rules/CLOUDFLARE.md Always
Tool Version
wrangler Any

gspot writes .gspot/configurations/platform/cloudflare/semgrep.yml (with the security configuration).