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.
described-i18n-loader
Advanced tools
Load i18n json files with key value pairs while stripping the 'desc' key from all subkeys. eg: key = 'conf.title', value = { text: "Configuration", desc: "Title for config screen" }
A webpack 1 & 2 loader for i18n json bundles that look like this:
{
"conf": {
"title": {
"desc": "Title for config screen",
"text": "Configuration"
}
},
"app": {
"title": {
"desc": "The app window title",
"text": "MyApp"
}
},
"nav": {
"button": {
"home": {
"desc": "Navbar button for the app's homescreen",
"text": "Home"
},
"about": {
"desc": "Navbar button for the app's about screen",
"text": "About"
}
}
},
"another": {
"pure": {
"key": "Pure key"
}
}
}
The loader will parse the json and replace the objects with their text
property value or leave the string like in another.pure.key
.
The output looks like this (just minified):
(node)
module.exports = {
"conf.title": "Configuration",
"app.title": "MyApp",
"nav.button.home": "Home",
"nav.button.about": "About",
"another.pure.key": "Pure Key"
};
(es6)
export default {
"conf.title": "Configuration",
"app.title": "MyApp",
"nav.button.home": "Home",
"nav.button.about": "About",
"another.pure.key": "Pure Key"
}
forceModuleExports
: force node style module DEFAULT - webpack 1: true, webpack 2: false
FAQs
Load i18n json files with key value pairs while stripping the 'desc' key from all subkeys. eg: key = 'conf.title', value = { text: "Configuration", desc: "Title for config screen" }
We found that described-i18n-loader 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
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.