
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.
A
s///-alike search-and-replace/substitution tagged-template-string for JS.
Makes Search-and-replace regex, or substitutions, available in JS. Use handy perls`find this/replace with/g` to do text substiution.
var perls= require("perls")
var lukesDad= perls`vader/anakin/`("vader") //=> "anakin"
var threeCheers= perls`(:<cheer>(huzzah|cheers))/*$+{cheer}* *$+{cheer}* *$+{cheer}*/`("huzzah") //=> "*huzzah* *huzzah* *huzzah*"
In JavaScript, RegExp.prototype.exec is used to get results out of regexp groups. If just trying to do some text substitution, that means writing a fairly gnarly string to concattenate together some output literal, from that exec output. This library exists to bring a more convenient means of doing text substitution to JavaScript.
In other non-JS environments, there's a s/find this/replace with this/ substitution one can run-
| language | example |
|---|---|
| perl | $myFav =~ s/replace this/with this/ |
| vim | :s/replace this/with this/g 10000 |
perls`change this text/now a replacement/`("it's a good start. change this text.") //=> "it's a good stat. now a replacement"
perls`find (\w+)/$1 once, $2 twice/`("find this") //=> "this once, this twice"
perls`more (:<noun>)/$+{noun}! $+{noun}! $+{noun}`("more obama") //=> "obama! obama! obama!"
Run the substitution ./.examples or their ./.tests to see usage.
Perls is distributed on npm.
From inside the project you want to add perls to:
npm install --save perls
Shout to to these fabulous libraries for their assistance:
named-js-regexp to power named group matching.
FAQs
A normative substitution tagged-template function (s// replacement for js).
We found that perls 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.