Skip to main content

A multifaceted security tool which leverages Public GitHub REST APIs for OSINT, Forensics, Pentesting and more.

Project description

Welcome to Gitxray

Gitxray (short for Git X-Ray) is a multifaceted security tool designed for use on GitHub repositories. It can serve many purposes, including OSINT and Forensics. gitxray leverages public GitHub REST APIs to gather information that would otherwise be very time-consuming to obtain manually. Additionally, it seeks out information in unconventional places.

Build Workflows Latest Version in PIP Python Versions License

Gitxray HTML Report

Use cases

Gitxray can be used to, for example:

  • Find sensitive information in contributor profiles disclosed by accident within, for example, Armored PGP Keys, or Key Names.

  • Identify threat actors in a Repository. You may spot co-owned or shared accounts, as well as inspect public events to spot fake Stargazers.

  • Identify fake or infected Repositories. It can detect tampered commit dates as well as, for example, Release assets updated post-release.

  • Forensics use-cases, such as filtering results by date in order to check what else happened on the day of an incident.

  • And a lot more! Run a full X-Ray in to collect a ton of data.

gitxray -r https://github.com/some-org/some-repository

  • If you rather use text output, you may want to filter output with filters:

gitxray -r https://github.com/some-org/some-repository -f user_input -outformat text

gitxray -r https://github.com/some-org/some-repository -f keys,association,starred -outformat text

gitxray -r https://github.com/some-org/some-repository -f warning -outformat text

gitxray -r https://github.com/some-org/some-repository -f 2024-09-01 -outformat text

Please refer to the Documentation for additional use-cases and introductory information.

Documentation

Installing, Updating, and running Gitxray

gitxray was written with no use of external package dependencies other than the requests library.

PyPI (PIP) Way

gitxray is on PyPI and can be installed and updated with:

pip install gitxray --upgrade

Once installed, simply run gitxray from your command line by typing:

gitxray -h

Run your first full X-Ray

gitxray -o https://github.com/kulkansecurity

Gitxray Console

Installing from source

You may also run gitxray directly by cloning or downloading its GitHub repository and running.

python3 -m pip install -r requirements.txt
cd src/
python3 -m gitxray.gitxray

Command Line Arguments

Required Arguments

One of the following must be specified:

  • -r, --repository [URL] - Specify a single repository to check. The URL may optionally begin with https://github.com/. Example: --repository https://github.com/example/repo

  • -rf, --repositories-file [FILEPATH] - Provide a file path containing a list of repositories, each on a new line. The file must exist. Example: --repositories-file ./list_of_repos.txt

  • -o, --organization [URL] - Specify an organization to check all repositories under that organization. The URL may optionally begin with https://github.com/. Example: --organization https://github.com/exampleOrg

Optional Arguments

You'll find these optional but very handy in common gitxray usage.

  • -l, --list - List contributors if a repository is specified or list repositories if an organization is specified. Useful for further focusing on specific entities. Example: --list

  • -c, --contributor [USERNAMES] - A comma-separated list of GitHub usernames to focus on within the specified repository or organization. Example: --contributor user1,user2

  • -f, --filters [KEYWORDS] - Comma-separated keywords to filter the results by, such as 'user_input', 'association', or 'mac'. Example: --filters user_input,association,mac

Output and Formats

  • -out, --outfile [FILEPATH] - Specify the file path for the output log. Cannot be a directory. Example: --outfile ./output.log

  • -outformat, --output-format [FORMAT] - Set the format for the log file. Supported formats are html, text and json. Default is html. Example: --output-format json

Debug

  • --debug - Enable Debug mode for a detailed and extensive output. Example: --debug

Terms of Use

The user is solely responsible for ensuring that this tool is used in compliance with applicable laws and regulations, including obtaining proper authorization for repository scanning and the distribution of any results generated. Unauthorized use or sharing of results may violate local, national, or international laws.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitxray-1.0.16.tar.gz (53.9 kB view details)

Uploaded Source

Built Distribution

gitxray-1.0.16-py3-none-any.whl (58.9 kB view details)

Uploaded Python 3

File details

Details for the file gitxray-1.0.16.tar.gz.

File metadata

  • Download URL: gitxray-1.0.16.tar.gz
  • Upload date:
  • Size: 53.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for gitxray-1.0.16.tar.gz
Algorithm Hash digest
SHA256 2e21b6e003b08abb86136594103e6c4fe7679f3f0b7b739f2e23664147174722
MD5 c1174e3548e47f8fe1b33eb29ffc0b96
BLAKE2b-256 d43052e51be31a014eeaa02fa35d576543841614c4812ac77c6951d269288409

See more details on using hashes here.

File details

Details for the file gitxray-1.0.16-py3-none-any.whl.

File metadata

  • Download URL: gitxray-1.0.16-py3-none-any.whl
  • Upload date:
  • Size: 58.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for gitxray-1.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 40df6bafd1732178920ec5bec70341e96dbb88c1744859b6a907ceabc7275482
MD5 c5026470ea29c867cfd234c99b52073e
BLAKE2b-256 bb39e5bd3ee1c54834d5160dabff737fb748ed01db4ea91e9750e87950852893

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page