
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
transform-sp-jsx
Advanced tools
Transform spRepeat, spShow, sp
Options can be defined per file by adding a comment like this /* @sp-jsx { "repeat": "_.map" } */
const fs = require("fs");
const sysPath = require("path");
const babel = require("babel-core");
const options = {
plugins: [
"syntax-jsx",
["transform-sp-jx", { repeat: "_.map" }]
]
};
console.log(babel.transform("<button spClick={ this.changeLanguage(event, lng) }></button>", options).code);
console.log(babel.transform("<button spShow={ condition }></button>", options).code);
console.log(babel.transform('<button spRepeat={ 4 } type="button" className="btn btn-default" data-lng={ index } />', options).code);
console.log(babel.transform('<button spRepeat="locale in locales" spShow={condition} spClick={ this.changeLanguage(event, lng) }/>', options).code);
console.log(babel.transform('<button spShow={condition} spRepeat="locale in locales" spClick={ this.changeLanguage(event, lng) }/>', options).code);
<button onClick={function (event, domID, originalEvent) {
this.changeLanguage(event, lng);
}.bind(this)}></button>;
condition ? <button></button> : void 0;
(function (cb) {
var res = new Array(4);
for (var i = 0; i < 4; i++) {
res[i] = cb(i);
}
return res;
})(function (index) {
return <button type="button" className="btn btn-default" data-lng={index} />;
}.bind(this));
_.map(locales, function (locale) {
return condition ? <button onClick={function (event, domID, originalEvent) {
this.changeLanguage(event, lng);
}.bind(this)} /> : void 0;
}.bind(this));
condition ? _.map(locales, function (locale) {
return <button onClick={function (event, domID, originalEvent) {
this.changeLanguage(event, lng);
}.bind(this)} />;
}.bind(this)) : void 0;
<Array: String>Attributes to treat as events.
Default:
[
"spBlur",
"spChange",
"spClick",
"spDrag",
"spDrop",
"spFocus",
"spInput",
"spLoad",
"spMouseenter",
"spMouseleave",
"spMousemove",
"spPropertychange",
"spReset",
"spScroll",
"spSubmit",
"spAbort",
"spCanplay",
"spCanplaythrough",
"spDurationchange",
"spEmptied",
"spEncrypted",
"spEnded",
"spError",
"spLoadeddata",
"spLoadedmetadata",
"spLoadstart",
"spPause",
"spPlay",
"spPlaying",
"spProgress",
"spRatechange",
"spSeeked",
"spSeeking",
"spStalled",
"spSuspend",
"spTimeupdate",
"spVolumechange",
"spWaiting"
]
<String>Repeat function to use
Default:
"(function(obj, cb) { return obj === null || typeof obj !== 'object' ? [] : Array.isArray(obj) ? obj.map(cb) : Object.keys(obj).map(function(key) { return cb(obj[key], key) });})"
<Boolean>Use undefined instead of void 0
The MIT License (MIT)
Copyright (c) 2018 Stéphane MBAPE (http://smbape.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Transform special jsx attributes
We found that transform-sp-jsx 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.