
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).
postcss-csso
Advanced tools
PostCSS plugin to minify CSS using CSSO (a CSS minifier with structural optimizations).
Under the hood, the plugin converts PostCSS
AST into CSSO
's AST, optimises it and converts back. The plugin uses PostCSS
's input AST nodes (or their clones) on back convertation, so the shape of the original PostCSS
's nodes is preserved after the compression in most cases (e.g. properties added by other plugins aren't lost). This approach makes it possible to achieve great performance and correct source maps generation.
The performance of postcss-csso
is approximately the same as CSSO
has itself (see CSSO
numbers in minifiers comparison table).
If you have any difficulties with the output of this plugin, please use the CSSO tracker.
npm install postcss-csso
import postcss from 'postcss';
import csso from 'postcss-csso';
// CommonJS:
// const csso = require('postcss-csso');
postcss([
csso
])
.process('.a { color: #FF0000; } .b { color: rgba(255, 0, 0, 1) }')
.then((result) => {
console.log(result.css);
// .a,.b{color:red}
});
Plugin takes the same options as compress()
method of CSSO with no exception.
postcss([
csso({ restructure: false })
])
.process('.a { color: #FF0000; } .b { color: rgba(255, 0, 0, 1) }')
.then((result) => {
console.log(result.css);
// .a{color:red}.b{color:red}
});
Using in postcss.config.js
:
import csso from 'postcss-csso';
export const plugins = [
csso({
restructure: false
})
];
MIT
6.0.1 (August 11, 2022)
csso
to 5.0.5
which fixes various bugsFAQs
PostCSS plugin to minify CSS using CSSO
The npm package postcss-csso receives a total of 27,100 weekly downloads. As such, postcss-csso popularity was classified as popular.
We found that postcss-csso 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.