Clojure 1.12

Last reviewed Sep 5, 2026

Export as PDF

Prompt Details

Prompt Composition

2prompts
  1. Java 25113 lines · 2.8K tokens
  2. Clojure 1.1247 lines · 919 tokens
Total160 lines · 3.7K tokens

CWE Coverage

  • 20
  • 22
  • 59
  • 78
  • 79
  • 88
  • 89
  • 95
  • 117
  • 190
  • 208
  • 209
  • 214
  • 295
  • 297
  • 323
  • 327
  • 338
  • 347
  • 362
  • 367
  • 378
  • 427
  • 470
  • 471
  • 494
  • 502
  • 532
  • 611
  • 653
  • 681
  • 732
  • 770
  • 772
  • 776
  • 789
  • 807
  • 829
  • 863
  • 915
  • 916
  • 918
  • 922
  • 942
  • 1333

Prompt Preview

Apply the Java 25 prompt first. These rules cover Clojure 1.12 readers, evaluation, macros, Java interop, concurrency, and deployment, and were checked against 1.12.5.

Reader and evaluation boundaries

  • Parse external data with clojure.edn/read or clojure.edn/read-string or a format-specific data reader and never pass it to eval, load-string, clojure.core/read, or clojure.core/read-string.
  • Disable or tightly allowlist tagged-literal readers when parsing untrusted EDN; use :readers overrides to reject unwanted built-in tags because :default and :readers {} do not disable them.
  • Bind *read-eval* to false if Clojure reader entry points could encounter external input; it defaults to true and does not control tagged-literal reader functions.
  • Treat macros, compiler forms, and dynamically loaded namespaces as trusted build or deployment inputs.

Data validation and authorization

  • Validate map keys, value types, collection sizes, nesting, namespaced identifiers, and semantic invariants at entry.
  • Distinguish keywords from user-provided symbols and never resolve attacker-controlled names into Vars or classes.
  • Authorize the concrete resource after canonicalizing identifiers and before invoking a side-effecting function.
  • Avoid keywordizing unlimited user strings because allocating or retaining unbounded identifiers can create memory pressure.

Java interop and reflection

  • Allowlist classes, constructors, methods, fields, and protocols reachable through dynamic interop.
  • Add type hints or explicit wrappers where reflective dispatch could