
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.
sql-require
Advanced tools
Node.js require extension for .sql files
npm install sql-require
-- example.sql
SELECT * FROM table1;
SELECT * FROM table2;
SELECT * FROM table3;
SELECT * FROM table4;
-- :name=insertQuery
INSERT INTO table1 (f1, f2) VALUES (1, 2);
DELIMITER $$
-- :name=changeDelimeter1
DROP PROCEDURE IF EXISTS `sp_test`$$
-- :name=changeDelimeter2
CREATE DEFINER=`user`@`%` PROCEDURE `sp_test`(
IN Number INT
)
READS SQL DATA
BEGIN
IF NUMBER = 1 THEN
SELECT * FROM tblProduct WHERE ProductID = Number;
ELSE
SELECT * FROM tblProduct WHERE ProductId = 2;
END IF;
END$$
DELIMITER ;
//example.js
require('sql-require');
var SQL = require('./example.sql');
console.log(SQL[0]); //> SELECT * FROM table1
console.log(SQL[1]); //> SELECT * FROM table2
console.log(SQL.insertQuery); //> INSERT INTO table1 (f1, f2) VALUES (1, 2)
console.log(SQL.changeDelimeter2);
/* Output:
CREATE DEFINER=`user`@`%` PROCEDURE `sp_test`(
IN Number INT
)
READS SQL DATA
BEGIN
IF NUMBER = 1 THEN
SELECT * FROM tblProduct WHERE ProductID = Number;
ELSE
SELECT * FROM tblProduct WHERE ProductId = 2;
END IF;
END
*/
MIT Copyright (c) 2016 Dmitriy Belyaev
FAQs
Node.js require extension for .sql files
We found that sql-require 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.