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.
= git_hub by: Arvicco url: http://github.com/arvicco/git_hub
== DESCRIPTION:
git_hub is a library that wraps github API and exposes simple interface for finding, creating and managing github repositories and other resources.
== FEATURES/PROBLEMS:
== SYNOPSIS:
require 'git_hub' include GitHub
=== General notes There is more than one way to name things, for example when looking for repository, following option keys have the same effect - :repository, :repo, :project.
Most methods just retrieve the state of remote github objects. Any method that intends to CHANGE the state of remote objects, create or delete remote objects is followed by exclamation (create!, delete!, set!, add!, etc) and requires authentication.
=== Authentication
=== Repositories API Find existing repos: repo = Repo.find(:user=>user_name, :repo=>repo_name) repos = Repo.find(:user=>user_name) search_repos = Repo.find(:query=>['search','terms'])
Create new repo or delete existing repo (need to authenticate with your github credentials first) Api.auth = {:user=>user_name, :token=>token} new_repo = Repo.create!(:name=>repo_name, :desc=>'Description', :homepage=>'http://your_page.org', :private=> false) new_repo.delete!
Retrieve tags, branches and commits for a repo: puts repo.tags['v0.1.0'].committer puts repo.branches['master'].committed_date repo.commits(:branch=>'left').each {|commit| p commit.author}
#tags and #branches return Hash of (latest) commits, with tag/branch name as keys. #commits returns an Array of commit objects for a given repo. If no options given, a whole set of commits for this repo is returned (this takes a while to load).
=== Commits API You can work either with commit objects either directly, or via Repo API
Retrieve info for a specific commit or a set of commits: commit = Commit.find(:user=>user_name, :repo=>repo_name, :sha=>'commit_sha') commits = Commit.find(:user=>user_name, :repo=>repo_name, :branch=>'master') commits = Commit.find(:user=>user_name, :repo=>repo_name, :branch=>'master', :path=>'README.rdoc')
commit = repo.commits.last commit = repo.tags['v0.1.0'] commit = repo.branches['master'] # returns most recent commit for a branch
=== Users API Find existing repos: user = User.find(:user=>user_name) search_users = User.find(:query=>['search','terms'])
Retrieve/manage user's network: user.followers.each {|githubber| p githubber.fullname} user.following.each {|githubber| p githubber.fullname} user.follow! :user=>githubber_name user.unfollow! :user=>githubber_name
== REQUIREMENTS:
== INSTALL:
$ sudo gem install git_hub
== PRIOR ART:
Le-Git - http://github.com/technicalpickles/le-git Octopi - http://github.com/fcoury/octopi Github-gem - http://github.com/defunkt/github-gem Github-control - http://github.com/halorgium/github-control
== LICENSE:
Copyright (c) 2009 Arvicco. See LICENSE for details
FAQs
Unknown package
We found that git_hub 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.