Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
nmf-webpack-loader
Advanced tools
This loader parses your .nmf file, searches for "url" occurences, copies the assets into the output directory, replaces the url with the outputted path, recompiles the .nmf JSON structure and
npm install nmf-loader --save-dev
webpack config:
module.exports = {
module: {
loaders: [{
test: /\.nmf$/,
loader: 'nmf',
query: {
name: '[name].[hash:6].[ext]'
}
}, {
test: /\.((nexe)|(pexe)|(so))$/, // will load .nexe, .pexe and .so files with file-loader
loader: 'file-loader',
query: {
name: '[name].[hash:6].[ext]'
}
}]
},
};
Example .nmf file:
{
"program": {
"portable": {
"pnacl-translate": {
"url": "./my-native-app.pexe"
}
}
}
}
In your application:
const nmf = require('./my-nativeclient.nmf');
const embed = document.createElement('embed');
embed.setAttribute('src', nmf);
embed.setAttribute('width', 0);
embed.setAttribute('height', 0);
embed.setAttribute('type', 'application/x-pnacl');
document.body.appendChild(embed);
The loader replaces every occurence of {"url": "[some nacl file url]"}
with the actual URL of the file, including public path and/or a hash in the filename. The NaCl file will also be copied into the project's output directory.
npm test
Apache 2.0
FAQs
A Webpack loader for Native Client manifests
The npm package nmf-webpack-loader receives a total of 3 weekly downloads. As such, nmf-webpack-loader popularity was classified as not popular.
We found that nmf-webpack-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.