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.
@paulwib/note-link-janitor
Advanced tools
This script reads in a folder of Markdown files, notes all the [[wiki-style links]] between them, then adds a special "backlinks" section which lists passages which reference a given file.
This script reads in a folder of Markdown files, notes all the [[wiki-style links]] between them, then adds a special "backlinks" section which lists passages which reference a given file.
For example, this text might get added to Sample note.md
:
## Backlinks
* [[Something that links here]]
* The block of text in the referencing note which contains the link to [[Sample note]].
* Another block in that same note which links to [[Sample note]].
* [[A different note that links here]]
* This is a paragraph from another note which links to [[Sample note]].
The script is idempotent; on subsequent runs, it will update that backlinks section in-place.
The backlinks section will be initially inserted at the end of the file. If there happens to be a HTML-style <!-- -->
block at the end of your note, the backlinks will be inserted before that block.
[[like this]]
.# Note title
..md
files are siblings; the script does not currently recursively traverse subtrees (though that would be a simple modification if you need it; see lib/readAllNotes.ts
)## Backlinks
and the next heading tag (or <!-- -->
tag). Any text you might add to this section will be clobbered. Don't append text after the backlinks list without a heading in between! (I like to leave my backlinks list at the end of the file)This is FYI-style open source. I'm sharing it for interested parties, but without any stewardship commitment. Assume that my default response to issues and pull requests will be to ignore or close them without comment. If you do something interesting with this, though, please let me know.
To install a published release, run:
yarn global add @andymatuschak/note-link-janitor
Then to run it (note that it will modify your .md
files in-place; you may want to make a backup!):
note-link-janitor path/to/folder/containing/md/files
That will run it once; you'll need to create a cron job or a launch daemon to run it regularly.
It's built to run against Node >=12, so you may need to upgrade or swap your runtime version.
yarn install
yarn run build
In the future, I intend to expand this project to monitor for broken links, orphans, and other interesting hypertext-y predicates.
FAQs
This script reads in a folder of Markdown files, notes all the [[wiki-style links]] between them, then adds a special "backlinks" section which lists passages which reference a given file.
We found that @paulwib/note-link-janitor 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.