Skip to content

Replace jsonista with charred to drop jackson-core - #5

Merged
ericdallo merged 1 commit into
ericdallo:masterfrom
emerson-matos:replace-jsonista-with-charred
Oct 6, 2026
Merged

ericdallo merged 1 commit into
ericdallo:masterfrom
emerson-matos:replace-jsonista-with-charred

Conversation

@emerson-matos

Copy link
Copy Markdown
Contributor

Closes #4

Context

jsonista 0.3.13 transitively pulls jackson-core 2.18.2, flagged by CVE-2026-89425 / GHSA-7hhh-6rmp-j9qf (unbounded StringBuilder in UTF8DataInputJsonParser, DoS). Every consumer of metrepl gets flagged by dependency scanners. metrepl's only jsonista use is one write-value-as-string call on simple metric maps.

Solution

Swap jsonista for charred, a jackson-free JSON lib. This removes jackson-core from metrepl's dependency graph entirely. write-json-str with :escape-slash false produces byte-identical output to jsonista for these payloads (namespaced keywords, strings, numbers, booleans, nested maps/vectors).

Adds format_test.clj covering :json, :edn, :summary (previously uncovered). Verified: the same tests pass against both jsonista and charred, confirming identical behavior.

🤖 Generated with Claude Code

jsonista 0.3.13 pulls jackson-core 2.18.2, flagged by CVE-2026-89425
(GHSA-7hhh-6rmp-j9qf). charred is jackson-free and produces identical
output for metrepl's metric payloads (keywords, strings, numbers,
booleans, nested maps/vectors) with :escape-slash false to match
jsonista's default of not escaping forward slashes.

Adds format_test.clj covering :json, :edn, and :summary paths; the
format namespace previously had no test coverage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@ericdallo ericdallo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good! thanks

@ericdallo
ericdallo merged commit 2f5c807 into ericdallo:master Oct 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace jsonista with charred to drop jackson-core (CVE-2026-89425)

2 participants