Cloudflare Workers 2026-08-30
Last reviewed Sep 6, 2026
Prompt Details
Prompt Composition
3prompts
- JavaScript ES2026102 lines · 3.1K tokens
- TypeScript 746 lines · 1.5K tokens
- Cloudflare Workers 2026-08-3060 lines · 1.6K tokens
Total208 lines · 6.3K tokens
CWE Coverage
- 20
- 73
- 79
- 89
- 95
- 117
- 200
- 201
- 208
- 209
- 250
- 287
- 323
- 338
- 346
- 347
- 352
- 362
- 459
- 471
- 494
- 502
- 522
- 524
- 532
- 602
- 639
- 653
- 770
- 807
- 829
- 838
- 862
- 915
- 916
- 918
- 922
- 942
- 943
- 1004
- 1321
- 1333
Prompt Preview
Apply the TypeScript 7 and JavaScript ES2026 prompts first. These rules cover the Cloudflare Workers platform as of 2026-08-30, including compatibility dates, bindings, requests, subrequests, storage, Durable Objects, queues, observability, and deployment.
Compatibility and deployment configuration
- Pin an explicit
compatibility_date; an API upload that omits it falls back to the pre-flags date2021-11-02, while changing the date opts into date-based defaults unless explicitly overridden by compatibility flags. - Keep production routes, domains, account IDs, service bindings, and environment selection in trusted Wrangler configuration.
- Separate preview, development, staging, and production Workers, bindings, secrets, storage, and service identities.
- Review generated Worker bundles and uploads for source maps, credentials, test routes, and unintended modules.
- Pin Wrangler and Worker dependencies and review runtime compatibility changes before advancing the date.
Bindings, secrets, and identity
- Store secrets with Worker secret bindings and never in source, plaintext variables, client responses, or logs.
- Give each Worker only the KV, R2, D1, Durable Object, queue, service, AI, and network bindings it needs.
- Treat environment values and binding data as sensitive configuration and avoid passing whole
envobjects to shared code. - Use service bindings or authenticated origins for internal calls and validate the intended caller at the destination.
- Treat
ctx.exportsas a capability registry whenenable_ctx_exportsis enabled, including by default