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.
@vikr01/soy-loader
Advanced tools
This is for compiling and loading Google Closure Templates (.soy files) into webpack builds. The loader also shims compiled soy, which is normally revealed globally, and instead returns imported soy namespaces as a module to be consume by webpack.
npm i soy-loader --save-dev
Documentation: Google Closure Templates Templates
var templates = require('soy!./templates.soy');
// => returns an object for the template namespace.
webpack.config.js
module.exports = {
// ...
module: {
loaders: [
// ...
{ test: /\.soy$/, loader: 'soy-loader' }
]
}
};
greetings.soy
{namespace greetingTemplates}
/**
* Greet a person.
* @param name the person's first name
*/
{template .hello}
<h1>Hello {{$name}}</h1>
{/template}
app.js
var greetPerson = require('./greetings.soy').hello;
target.innerHTML = greetPerson({ name: 'John' });
// => '<h1>Hello John</h1>'
FAQs
soy (google closure) template loader for webpack
We found that @vikr01/soy-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.