Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
A simple library to load snapshots of git repository.
To load git repository call load_repo
as follows:
from gitsnapshot import load_repo
load_repo('~/target/directory', 'git@github.com/test/repo')
This code creates folder ~/target/directory
if this folder doesn't exists, and then
clone shallow copy of repository git@github.com/test/repo
.
By default this function loads current master
branch.
To load another branch (i.e. develop
) pass branch name in branch
parameter:
from gitsnapshot import load_repo
load_repo('~/target/directory', 'git@github.com/test/repo', branch='develop')
Also you can load snapshot by tag:
from gitsnapshot import load_repo
load_repo('~/target/directory', 'git@github.com/test/repo', tag='v0.1.2')
Or by commit hash:
from gitsnapshot import load_repo
load_repo('~/target/directory', 'git@github.com/test/repo', commit='abcdef')
load_repo
function return optional string with error description.
If load_repo
returned None
then no errors was happened.
If you try to load repository snapshot into existing directory with another snapshot
of the same repository, load_repo
will return error.
To avoid this behavior pass use_existing=True
as argument.
from gitsnapshot import load_repo
load_repo('~/target/directory', 'git@github.com/test/repo', use_existing=True)
In this case load_repo
will load repository index and will checkout to specified
branch, tag or commit.
FAQs
Python module to simplify loading of snapshot of git repository
We found that gitsnapshot demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.