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.
reliable-git
Advanced tools
reliable git
$ npm i reliable-git --save
var reliableGit = require('reliable-git');
var options = {
repo: 'https://github.com/reliablejs/reliable-git',
dir: 'tmp/reliable-git'
};
/**
* node pattern error-first callback
*/
reliableGit.clone(options, function(err, result) {
if (err) {
console.log(err);
return;
}
// result is an Repo instance
console.log(result);
// you can get latest commit info
result.latestCommitInfo(function(err, info) {
/** latestCommitInfo is an object
* commitId: 87d0e4e,
* author: ziczhu,
* date: Tue Aug 25 17:10:58 2015 +0800,
* subject: fix missing,
* branch: master
*/
console.log(info);
});
});
/**
* use in co v4
*/
co(function *() {
try {
// result is an Repo instance
var result = yield reliableGit.clone(options);
console.log(result);
// you can get latest commit info
var info = yield result.latestCommitInfo();
/** latestCommitInfo is an object
* commitId: 87d0e4e,
* author: ziczhu,
* date: Tue Aug 25 17:10:58 2015 +0800,
* subject: fix missing,
* branch: master
*/
console.log(info);
} catch(e) {
console.log(e);
}
});
/**
* use as a promise
*/
reliableGit.clone(options)
.then(function(result) {
// result is an Repo instance
console.log(result);
// you can get latest commit info
result.then(function(info) {
/** latestCommitInfo is an object
* commitId: 87d0e4e,
* author: ziczhu,
* date: Tue Aug 25 17:10:58 2015 +0800,
* subject: fix missing,
* branch: master
*/
console.log(info);
});
});
The MIT License (MIT)
FAQs
reliable-git
The npm package reliable-git receives a total of 5 weekly downloads. As such, reliable-git popularity was classified as not popular.
We found that reliable-git demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.