
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
ast-grepLike grep, but more powerful than you can possibly imagine.
Search your JavaScript files for patterns based on AST shape, rather than substrings or regular expressions.
With yarn:
yarn global add ast-grep
With npm:
npm install --global ast-grep
$ ast-grep --help
Options:
--anonymous, -a Ignore all names in the AST [boolean]
--file, -f Load pattern from a file [string]
--help Show help [boolean]
--version Show version number [boolean]
Examples:
ast-grep.js -a 'fn()' file.js Find all no-arg function calls in
'file.js'.
ast-grep.js -f pattern.js '**/*.js' Match the pattern in 'pattern.js' across
all JS files.
echo 'foo' | ast-grep.js 'pattern' Match 'pattern' on standard input.
On standard in:
$ echo 'code();' | ast-grep 'code'
code();
$ ast-grep 'foo()' < file.js
foo();
On a set of files:
$ ast-grep 'yield* foo();' '**/*.js'
grep stands for Global Regular Expression Print, this tool doesn't use Regular Expressions!A. I know, but gastp doesn't sound great.
FAQs
Like grep, but more powerful than you can possibly imagine.
The npm package ast-grep receives a total of 17,111 weekly downloads. As such, ast-grep popularity was classified as popular.
We found that ast-grep 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.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.