Implementation:MaterializeInc Materialize Blns Test Strings
| Knowledge Sources | |
|---|---|
| Domains | Testing, Quality_Assurance |
| Last Updated | 2026-02-08 00:00 GMT |
Overview
A JSON file containing the Big List of Naughty Strings (BLNS), a curated collection of strings known to cause issues in software systems, used for fuzz and edge-case testing of the Materialize database.
Description
blns.json is a JSON array of approximately 476 carefully selected strings that historically cause problems in software systems. The collection includes reserved words and language constants ("undefined", "null", "nil", "true", "false", "None", "hasOwnProperty"), numeric edge cases (negative zero, division by zero, integer overflow boundaries like -2147483648/-1 and -9223372036854775808/-1), unusual numeric formats ("1E+02", "0..0", "0,0,0"), special characters, escape sequences, Unicode edge cases, SQL injection payloads, XSS vectors, and format string attacks. It is derived from the well-known open-source BLNS project and adapted for use in the Materialize Python test infrastructure.
Usage
This file is consumed by the Materialize Python test framework to exercise SQL parsing, string handling, and data ingestion paths with adversarial inputs. Developers and QA engineers use it to verify that Materialize handles edge-case string inputs gracefully without crashes, corruption, or security vulnerabilities.
Code Reference
Source Location
- Repository: MaterializeInc_Materialize
- File: misc/python/materialize/blns.json
Signature
[
"undefined",
"undef",
"null",
"NULL",
"(null)",
"nil",
"NIL",
"true",
"false",
"True",
"False",
"TRUE",
"FALSE",
"None",
"hasOwnProperty",
"then",
"\\",
"\\\\",
"0",
"1",
"1.00",
"$1.00",
"1/2",
"1E2",
"-1",
"-2147483648/-1",
"-9223372036854775808/-1",
"-0",
"-0.0",
"+0",
"+0.0",
"0..0",
"0,0,0",
"0.0/0"
// ... ~476 total entries covering Unicode, injection, format strings, etc.
]
Import
# In Python test code:
# import json
# from pathlib import Path
# blns = json.loads(Path("misc/python/materialize/blns.json").read_text())
# Or import via the materialize package
# from materialize.blns import NAUGHTY_STRINGS
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| blns.json | JSON file | Yes | JSON array of strings; each string is a known-problematic test input |
Outputs
| Name | Type | Description |
|---|---|---|
| NAUGHTY_STRINGS | List of strings | Parsed list of adversarial test strings consumed by test harnesses |
| Test results | Pass/Fail | Tests verify that Materialize processes each string without errors or unexpected behavior |
Usage Examples
import json
from pathlib import Path
# Load the naughty strings
blns_path = Path("misc/python/materialize/blns.json")
naughty_strings = json.loads(blns_path.read_text())
# Use in a test to verify SQL string handling
import psycopg2
conn = psycopg2.connect("host=localhost port=6875 dbname=materialize")
cur = conn.cursor()
for s in naughty_strings:
try:
cur.execute("SELECT %s::text", (s,))
result = cur.fetchone()
assert result[0] == s, f"Round-trip failed for: {repr(s)}"
except Exception as e:
print(f"Error with string {repr(s)}: {e}")
conn.rollback()