
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
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 returns a data url (e.g. data:application/x-pnacl,{"program":...
).
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, my-nativeclient.nmf
:
{
"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 17 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
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.