
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).
@bytehide/next-shield
Advanced tools
@bytehide/next-shield
is a powerful plugin for Next.js projects that enables JavaScript obfuscation to enhance the security of your codebase. This plugin integrates seamlessly with your Next.js build process to obfuscate sensitive files, protecting your intellectual property.
Install the plugin using npm or yarn:
npm install @bytehide/next-shield --save-dev
To use the @bytehide/next-shield
, create a custom next.config.js
file and configure the plugin:
const { createShield } = require('@bytehide/next-shield');
const nextConfig: NextConfig = {
/* Config options here */
// reactStrictMode: true,
// distDir: 'build',
};
const shieldConfig = createShield({
projectToken: 'your-project-token', // Required: Your ByteHide project token
replace: true, // Optional: Replace original files
controlFlowFlattening: true, // Optional: Enable control flow flattening
debugProtection: false, // Optional: Enable debug protection
devtoolsBlocking: false, // Optional: Enable devtools blocking
exclude: ['_document.js'], // Optional: Exclude specific files
}, nextConfig);
module.exports = shieldConfig;
Option | Type | Default | Description |
---|---|---|---|
projectToken | string | Required | Token provided by ByteHide for obfuscation. |
replace | boolean | false | Whether to replace original files with obfuscated versions. |
obfuscatedExtension | string | .obf | File extension for obfuscated files. |
controlFlowFlattening | boolean | true | Enhance obfuscation by flattening control flow in the code. |
debugProtection | boolean | false | Prevent debugging tools from analyzing your code. |
devtoolsBlocking | boolean | false | Block browser developer tools. |
exclude | string[] | [] | List of filenames to exclude from obfuscation. |
.next/
by default).Here’s how an obfuscated file is generated:
pages/index.js
pages/index.obf.js
(if replace
is false
) or replaces the original file.This project is licensed under the MIT License. See the LICENSE file for details.
Happy coding but keep it safe with @bytehide/next-shield
! 🛡️
FAQs
Next.js plugin for ByteHide Shield obfuscation.
The npm package @bytehide/next-shield receives a total of 42 weekly downloads. As such, @bytehide/next-shield popularity was classified as not popular.
We found that @bytehide/next-shield demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.