
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
simple-pre-commit
Advanced tools
A simple, zero dependency tool for setting up git pre-commit hook for small projects
A tool, that let you set any command from package.json
as a pre-commit hook.
package.json
)Install the simple-pre-commit as dev dependency
npm install simple-pre-commit --save-dev
Add the simple-pre-commit
to your package.json
. Feed it with any command you would like to run as a pre-commit
hook.
"simple-pre-commit": "npx lint-staged"`
There are more ways to configure the package. Check out [additional configuration](#Additional configuration options)
Run the CLI script to update the git hook with command from package.json
npx simple-pre-commit
Now the command from package.json
is set up as executable git pre-commit
hook.
Run npx simple-pre-commit
from root of your project
Note that you should manually run npx simple-pre-commit
every time you change the command
You can also add the .simple-pre-commit.json
or simple-pre-commit.json
to the project and write the command inside it, if you do not want to put command inside package.json
That way, .simple-pre-commit.json
or simple-pre-commit.json
should look like this and package.json
may not have simple-pre-commit
configuration inside it
{
"simple-pre-commit":"npx lint staged"
}
npm uninstall --save-dev simple-pre-commit
FAQs
A simple, zero dependency tool for setting up git pre-commit hook for small projects
The npm package simple-pre-commit receives a total of 842 weekly downloads. As such, simple-pre-commit popularity was classified as not popular.
We found that simple-pre-commit 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.