A static analyzer to scan JavaScript code for problematic regular expressions.
https://hub.docker.com/r/ericornelissen/js-re-scan ↗// readme
JavaScript Regex Security Scanner
A static analyzer to scan JavaScript and TypeScript code for problematic regular expressions.
Getting started
The scanner is available as a container image, install it using:
docker pull docker.io/ericornelissen/js-re-scan:latest
Validate the container provenance using cosign (optional but recommended):
cosign verify \
--certificate-identity-regexp \
'https://github.com/ericcornelissen/js-regex-security-scanner/.+' \
--certificate-oidc-issuer \
'https://token.actions.githubusercontent.com' \
docker.io/ericornelissen/js-re-scan:latest
Now you can use it to scan a JavaScript or TypeScript project. For example, to scan the current directory:
docker run --rm -v $(pwd):/project docker.io/ericornelissen/js-re-scan:latest
To use [Podman] instead of [Docker] you can replace docker by podman in any
example command. To use the [GitHub Container Registry] instead of [Docker] hub
you can use ghcr.io/ericcornelissen/js-re-scan instead.
SARIF
It is possible to get a report in SARIF format for programmatic consuption of
the scan results. Simply use the --sarif and --output-file…