
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
A RegEx object scanner, scans JS object string fields for RegEx patterns and gives information about matches. Think X-Ray checkpoint for JS objects.
A RegEx object scanner, scans JS object string fields for RegEx patterns and gives information about matches. Think X-Ray checkpoint for JS objects. This package will be used for a complete rewrite of express-autosanitizer, a popular tool that cleans xss injections from express requests.
If this does help you, please consider making a tiny donation here, even small amounts help! 🤝
npm i regexray
Takes one object and an array of RegEx patterns, then scans all string properties on the object (yes, nested ones too) for matches of any patterns in the array. The result is always an array. If not empty, the result will be an array of objects that have path (object-rover paths, if you need to access them, you can use object-rover's getProperty) and log (RegEx match result). See Example below.
declare function scan(
obj: object,
regexArray: RegExp[]
): Promise<
{
path: string;
log: RegExpMatchArray;
}[]
>;
const regexray = require('regexray');
const testObj = {
foo: 'string one hello',
bar: {
a: {
b: 'hello'
},
c: 'hello there general kenobi'
}
};
await regexray(testObj,[/el/,/ken/])
result:
[
{
path: 'foo',
log: [ 'el', index: 12, input: 'string one hello', groups: undefined ]
},
{
path: 'bar.c',
log: [
'el',
index: 1,
input: 'hello there general kenobi',
groups: undefined
]
},
{
path: 'bar.c',
log: [
'ken',
index: 20,
input: 'hello there general kenobi',
groups: undefined
]
},
{
path: 'bar.a.b',
log: [ 'el', index: 1, input: 'hello', groups: undefined ]
}
]
I believe this could be used for checking undesired patterns backend and frontend (e.g. check request body for profanity). Any time you need to check to see if a RegEx pattern exists on an object, you can use this package.
Distributed under the MIT License. See LICENSE
for more information.
Antonio Ramirez: sepehralizade@live.com
Project Link: Github
FAQs
A RegEx object scanner, scans JS object string fields for RegEx patterns and gives information about matches. Think X-Ray checkpoint for JS objects.
The npm package regexray receives a total of 7 weekly downloads. As such, regexray popularity was classified as not popular.
We found that regexray demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.