
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@giakki/encrypt-webpack-plugin
Advanced tools
Not sure why you'd want this, but here it is...
npm i @giakki/encrypt-webpack-plugin
{
entry: {
privateCss: path.resolve(__dirname, 'src/index.css'),
privateJs: path.resolve(__dirname, 'src/index.js'),
},
plugins: [
encryptPlugin({ assets: ['privateCss.css', 'privateJs.js'], key: process.env.SECRET_KEY }),
]
}
The simplest way to use the plugin is to specify the assets and the secret key to use, as show above.
If used this way, the plugin wil derive a key using 100000
passes of pbkdf2
using a random salt, and then encrypt
the assets using aes-256-cbc
.
The output will be the base-64 concatenation of [salt, iv, cyphertext]
.
The key
argument also accepts configurable pbkdf2
options, as such:
{
assets: [...],
key: {
digest: 'sha512',
iterations: 100000,
password: SECRET,
salt: crypto.randomBytes(16),
}
}
Where password
and salt
can either be String
s or Buffer
s.
FAQs
Webpack plugin to encrypt sources
We found that @giakki/encrypt-webpack-plugin 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
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.