• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

microlinkhq / keyvhq / 40745992793
97%

Build:
DEFAULT BRANCH: master
Ran 28 Oct 2026 06:34PM UTC
Jobs 14
Files 14
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Oct 2026 06:31PM UTC coverage: 97.149% (-0.2%) from 97.374%
40745992793

push

github

web-flow
fix(sql): escape backslashes in MySQL keys and patterns (#290)

* test(mysql): round-trip special keys and namespaces, reject injection

Covers keys containing ', \, \', %, _ and a literal backslash-n, a key
that closes the string literal with a backslash, numeric keys passed
to the store, and namespaces containing \, % and _ next to look-alike
namespaces. On master, set() throws a syntax error for a key ending
in a backslash, get("nope\\') OR 1=1 -- ") returns another key's
value, delete() with the same key removes every row, and iterator()
returns nothing for namespace a\b.

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

* fix(sql): escape backslashes in MySQL keys and patterns

sql-ts inlines literals and only doubles single quotes. MySQL also
treats backslash as an escape character, so a key containing \' ended
the string literal early and the rest of the key ran as SQL: get()
could read another row and delete() could remove the whole table. A
key ending in a backslash made set() fail with a syntax error, and
sequences like \n were stored as control characters.

set() already escaped backslashes in the value for MySQL. Apply the
same escaping to the key in get, set and delete. Non-string keys pass
through unchanged, as before.

The LIKE pattern in clear and iterator is read twice by MySQL: once as
a string literal, then as a LIKE pattern, where \ escapes and % and _
are wildcards. Escape \, % and _ in the namespace for LIKE first, then
escape backslashes for the literal, so a namespace matches only its
own keys. Other dialects are unchanged.

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

* fix(sql): escape String objects and non-string namespaces

sql-ts inlines String objects with toString(), so a boxed key or value
skipped MySQL backslash escaping and could still break out of a literal.
value.replace used to accept those objects. A numeric namespace called
replace and threw, instead of matching the coerced prefix.

Co-author... (continued)

364 of 390 branches covered (93.33%)

Branch coverage included in aggregate %.

55 of 57 new or added lines in 1 file covered. (96.49%)

1067 of 1083 relevant lines covered (98.52%)

70.89 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
94.29
-0.92% packages/sql/src/index.js
Jobs
ID Job ID Ran Files Coverage
1 @keyvhq/compress - 40745992793.1 28 Oct 2026 06:35PM UTC 1
100.0
GitHub Action Run
2 @keyvhq/postgres - 40745992793.2 28 Oct 2026 06:35PM UTC 1
91.3
GitHub Action Run
3 @keyvhq/sqlite - 40745992793.3 28 Oct 2026 06:35PM UTC 1
89.09
GitHub Action Run
4 @keyvhq/mysql - 40745992793.4 28 Oct 2026 06:35PM UTC 1
97.67
GitHub Action Run
5 @keyvhq/memoize - 40745992793.5 28 Oct 2026 06:34PM UTC 1
100.0
GitHub Action Run
6 @keyvhq/core - 40745992793.6 28 Oct 2026 06:35PM UTC 1
98.63
GitHub Action Run
7 @keyvhq/redis - 40745992793.7 28 Oct 2026 06:35PM UTC 1
99.04
GitHub Action Run
8 @keyvhq/file - 40745992793.8 28 Oct 2026 06:35PM UTC 1
94.64
GitHub Action Run
9 @keyvhq/mongo - 40745992793.9 28 Oct 2026 06:35PM UTC 1
97.5
GitHub Action Run
10 @keyvhq/max-size - 40745992793.10 28 Oct 2026 06:34PM UTC 1
91.89
GitHub Action Run
11 @keyvhq/sql - 40745992793.11 28 Oct 2026 06:35PM UTC 1
94.29
GitHub Action Run
12 @keyvhq/multi - 40745992793.12 28 Oct 2026 06:35PM UTC 1
100.0
GitHub Action Run
13 @keyvhq/offline - 40745992793.13 28 Oct 2026 06:35PM UTC 1
100.0
GitHub Action Run
14 @keyvhq/stats - 40745992793.14 28 Oct 2026 06:34PM UTC 1
98.68
GitHub Action Run
Source Files on build 40745992793
  • Tree
  • List 14
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #40745992793
  • 921e5886 on github
  • Prev Build on master (#40743697818)
  • Next Build on master (#40757669916)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc