
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@laysent/git-rev-sync
Advanced tools
Synchronously get the current git commit hash, tag, count, branch or commit message. Forked from git-rev.
var git = require('git-rev-sync');
console.log(git.short());
// 75bf4ee
console.log(git.long());
// 75bf4eea9aa1a7fd6505d0d0aa43105feafa92ef
console.log(git.branch());
// master
You can also run these examples via: npm run examples
npm install git-rev-sync --save
var git = require('git-rev-sync');
git.short([filePath], [length])
→ <String>return the result of git rev-parse --short HEAD
filePath
parameter can be used to run the command against a repo outside the current working directorylength
parameter can be used to set the desired hash length (defaults to 7
)git.long([filePath])
→ <String>return the result of git rev-parse HEAD
; optional filePath
parameter can be used to run the command against a repo outside the current working directory
git.branch([filePath])
→ <String>return the current branch; optional filePath
parameter can be used to run the command against a repo outside the current working directory
git.count()
→ <Number>return the count of commits across all branches; this method will fail if the git
command is not found in PATH
git.date()
→ <Date>returns the date of the current commit; this method will fail if the git
command is not found in PATH
git.isDirty()
→ <Boolean>returns true if there are uncommitted changes; this method will fail if the git
command is not found in PATH
git.isTagDirty()
→ <Boolean>returns true if the current tag is dirty; this method will fail if the git
command is not found in PATH
git.message()
→ <String>return the current commit message; this method will fail if the git
command is not found in PATH
git.remoteUrl()
→ <String>return the current remote URL; this method will fail if the git
command is not found in PATH
git.tag([markDirty])
→ <String>return the current tag and mark as dirty if markDirty is truthful; this method will fail if the git
command is not found in PATH
FAQs
Synchronously get the current git commit hash, tag, or branch
We found that @laysent/git-rev-sync 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.