Re

Regolith – Regex library that prevents ReDoS CVEs in TypeScript

Hacker News

Regolith – Regex library that prevents ReDoS CVEs in TypeScript

I wanted a safer alternative to RegExp for TypeScript that uses a linear-time engine, so I built Regolith. Why: Many CVEs happen because TypeScript libraries are vulnerable to Regular Expression Denial of Service attacks. I learned about this problem while doing undergraduate research and found that languages like Rust have built-in protection but languages like JavaScript, TypeScript, and Python do not. This library attempts to mitigate these vulnerabilities for TypeScript and JavaScript. How: Regolith uses Rust's Regex library under the hood to prevent ReDoS attacks. The Rust Regex library implements a linear-time Regex engine that guarantees linear complexity for execution. A ReDoS attack occurs when a malicious input is provided that causes a normal Regex engine to check for a matching string in too many overlapping configurations. This causes the engine to take an extremely long time to compute the Regex, which could cause latency or downtime for a service. By designing the engine to take at most a linear amount of time, we can prevent these attacks at the library level and have software inherit these safety properties. I'm really fascinated by making programming languages safer and I would love to hear any feedback on how to improve this project. I'll try to answer all questions posted in the comments. Thanks! - Jake Roggenbuck

Share card

Actual performance

27points
25comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
86%86% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Missing: mac, agents, macos
64%64% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: ide, io · Missing: https docs, excited, just released
60%60% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
35%35% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
34%34% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
15%15% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
1%1% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

It
Itiriri a Typescript library for ES6 iterators47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Itiriri a Typescript library for ES6 iterators

Hacker News2
TS
TSPlate – a simple templating library for TypeScript39%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

TSPlate – a simple templating library for TypeScript

Hacker News2
Si
Simple Graphviz Library for TypeScript65%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Simple Graphviz Library for TypeScript

Hacker News1
A
A powerful bitstream library for TypeScript53%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A powerful bitstream library for TypeScript

Hacker News39
Ko
Kokuin – A TypeScript library for deterministic JSON hashing32%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Kokuin – A TypeScript library for deterministic JSON hashing

Hacker News2
No
Node S2 – A TypeScript Geohashing and Geolocation Library51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Node S2 – A TypeScript Geohashing and Geolocation Library

Hacker News10
Ce
Cerialize – Typescript serialization by annotation39%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Cerialize – Typescript serialization by annotation

Hacker News1
Sc
Scala-ts – Scala to TypeScript compiler41%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Scala-ts – Scala to TypeScript compiler

Hacker News66
JS
JSONSchema to TypeScript compiler51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

JSONSchema to TypeScript compiler

Hacker News72
Du
DuoCode 1.0 bridges the gap between C# and TypeScript31%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

DuoCode 1.0 bridges the gap between C# and TypeScript

Hacker News7