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.
@antongolub/git-root
Advanced tools
Find the closest .git containing path — the git root.
It's known for certain the best way to find git root:
git rev-parse --show-toplevel
However, if git
executable or child_process.exec
are not available for some (security?) reasons, it's advisable to use tools like this one.
Inspired by pkg-dir.
.git
up the dir treegitdir: </some/path.git>
redirectsyarn add @antongolub/git-root
import { gitRoot, gitRootSync } from '@antongolub/git-root'
// async
const gitRoot1 = await gitRoot('/optional/cwd/path/')
// sync
const gitRoot2 = gitRoot('/defaults/to/process/cwd/', true)
// sync too
const gitRoot3 = gitRoot.sync()
// `gitRootSync` is alias for `gitRoot.sync`
const gitRoot4 = gitRootSync()
FAQs
Find the closest .git containing path
The npm package @antongolub/git-root receives a total of 436 weekly downloads. As such, @antongolub/git-root popularity was classified as not popular.
We found that @antongolub/git-root demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.