{"id":16824396,"url":"https://github.com/jkutner/saferegex","last_synced_at":"2025-07-22T01:02:51.979Z","repository":{"id":56505596,"uuid":"129640825","full_name":"jkutner/saferegex","owner":"jkutner","description":"A tool for testing regular expressions for ReDoS vulnerabilities.","archived":false,"fork":false,"pushed_at":"2024-05-12T22:16:01.000Z","size":151,"stargazers_count":55,"open_issues_count":4,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-11T06:10:02.850Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jkutner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.TXT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-15T18:55:39.000Z","updated_at":"2025-04-03T14:21:30.000Z","dependencies_parsed_at":"2024-10-13T11:10:58.137Z","dependency_job_id":"d4506c6a-0b4b-4f43-b1e5-ca26356dfec8","html_url":"https://github.com/jkutner/saferegex","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/jkutner/saferegex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkutner%2Fsaferegex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkutner%2Fsaferegex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkutner%2Fsaferegex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkutner%2Fsaferegex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jkutner","download_url":"https://codeload.github.com/jkutner/saferegex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkutner%2Fsaferegex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266405362,"owners_count":23923535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T11:10:54.787Z","updated_at":"2025-07-22T01:02:51.896Z","avatar_url":"https://github.com/jkutner.png","language":"Java","readme":"# SafeRegex [![Build Status](https://travis-ci.org/jkutner/saferegex.svg?branch=master)](https://travis-ci.org/jkutner/saferegex) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.jkutner/saferegex/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.jkutner/saferegex)\n\nSafeRegex is a tool that tests regular expressions for [ReDoS](https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS)\nvulnerabilities. In contrast to similar tools, SafeRegex doesn't use plain fuzzing to detect vulnerabilites but uses an\napproach similar to model checking. This makes it much more effective than plain fuzzers.\n\n## Usage\n\nBuild the executable JAR:\n\n```sh-session\n$ ./mvnw clean package\n```\n\nRun the JAR against an [evil regex](https://en.wikipedia.org/wiki/ReDoS#Malicious_regexes):\n\n```sh-session\n$ java -jar target/saferegex.jar \"(a|aa)+\"\n\nTesting: (a|aa)+\nMore than 10000 samples found.\n***\nThis expression is vulnerable.\nSample input: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab\n```\n\nOr a safe regex:\n\n```sh-session\n$ java -jar target/saferegex.jar \"(ht|f)tp(s?)\\:\\/\\/[0-9a-zA-Z]([-.a-zA-Z_]*[0-9a-zA-Z])*(:(0-9)*)?(\\/?)([a-zA-Z0-9\\-\\.\\?\\,\\:\\'\\/\\\\\\+=\u0026amp;%\\$#_]*)?\"\n\nTesting: (ht|f)tp(s?)\\:\\/\\/[0-9a-zA-Z]([-.a-zA-Z_]*[0-9a-zA-Z])*(:(0-9)*)?(\\/?)([a-zA-Z0-9\\-\\.\\?\\,\\:\\'\\/\\\\\\+=\u0026amp;%\\$#_]*)?\nMore than 10000 samples found.\n************************************************************************************************************************************************************************************************************\n*****************************************************************************************************************************\nTests: 3297\nBroken samples: 0\nThis expression is probably not vulnerable for sample sizes \u003c 10000\n```\n\n### Usage as a dependency\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.jkutner\u003c/groupId\u003e\n    \u003cartifactId\u003esaferegex\u003c/artifactId\u003e\n\u003c/dependency\u003e\n```\n\n## History\n\nThe project was created on Feb 16, 2011 by Sebastian Kübeck and hosted on [Google Code](https://code.google.com/archive/p/saferegex/). This project has\nbeen forked from the original and now maintained by [Joe Kutner](http://jkutner.github.io/).\n\n## License\n\nApache License, Version 2.0\n","funding_links":[],"categories":["Security"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkutner%2Fsaferegex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkutner%2Fsaferegex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkutner%2Fsaferegex/lists"}