Skip to content

Commit fa9bcb5

Browse files
committed
Welcome gitxray 1.0.16 - Exciting new HTML report and features.
1 parent 875e844 commit fa9bcb5

File tree

6 files changed

+83
-54
lines changed

6 files changed

+83
-54
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## Release v1.0.16 (October 18th, 2024)
4+
* Added a brand new HTML output format/report by default, making results a lot easier to navigate! Custom search bar instead of relying on DataTables which can be super slow for large HTML files. We're now also groupping results by Category across all contributors and highlighting results which contain a WARNING keyword.
5+
* Added certain association results to Contributor results, not all to prevent extra noise.
6+
* Added the ability to specify a directory for output instead of a file, gitxray creating the filename for you.
7+
* Removed the concept of 'Verbose' results, merging them with the non-verbose categories.
8+
* Removed the need for repositories and organizations to start with https://github.com (Thanks to @mattaereal for pointing that out!)
9+
310
## Release v1.0.15 (September 20th, 2024)
411

512
* Added searching for similar repository names in GitHub, Warning if another repository with the same name and better reputation is found.

README.md

+34-20
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,52 @@
11
# Welcome to Gitxray
22
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.
33

4-
The Octocat getting X-Rayed | [![Build Workflows](https://github.com/kulkansecurity/gitxray/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/kulkansecurity/gitxray) [![Latest Version in PIP](https://img.shields.io/pypi/v/gitxray.svg)](https://pypi.org/project/gitxray) [![Python Versions](https://img.shields.io/pypi/pyversions/gitxray.svg)](https://pypi.org/project/gitxray) [![License](https://img.shields.io/pypi/l/gitxray.svg)](https://github.com/kulkansecurity/gitxray/blob/main/LICENSE)
5-
--- | ---
6-
![Gitxray Logo](https://kulkansecurity.github.io/gitxray/images/logo_gitxray.png "Gitxray Logo") | ![Gitxray Console](https://kulkansecurity.github.io/gitxray/images/console_gitxray.png "Gitxray Console")
4+
[![Build Workflows](https://github.com/kulkansecurity/gitxray/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/kulkansecurity/gitxray) [![Latest Version in PIP](https://img.shields.io/pypi/v/gitxray.svg)](https://pypi.org/project/gitxray) [![Python Versions](https://img.shields.io/pypi/pyversions/gitxray.svg)](https://pypi.org/project/gitxray) [![License](https://img.shields.io/pypi/l/gitxray.svg)](https://github.com/kulkansecurity/gitxray/blob/main/LICENSE)
5+
---
6+
![Gitxray HTML Report](https://kulkansecurity.github.io/gitxray/images/html_report_gitxray.png "Gitxray HTML Report")
77
<div style="clear: both;"></div>
88

99
# Use cases
1010
Gitxray can be used to, for example:
11+
1112
- Find sensitive information in contributor profiles disclosed by accident within, for example, Armored PGP Keys, or Key Names.
1213

13-
` gitxray -r https://github.com/some-org/some-repository -v -f user_input`
1414
- Identify threat actors in a Repository. You may spot co-owned or shared accounts, as well as inspect public events to spot fake Stargazers.
1515

16-
` gitxray -r https://github.com/some-org/some-repository -v -f keys,association,starred`
1716
- Identify fake or infected Repositories. It can detect tampered commit dates as well as, for example, Release assets updated post-release.
1817

19-
` gitxray -r https://github.com/some-org/some-repository -v -f warning`
2018
- Forensics use-cases, such as filtering results by date in order to check what else happened on the day of an incident.
2119

22-
` gitxray -r https://github.com/some-org/some-repository -v -f 2024-09-01`
23-
- And a lot more! Run a full X-Ray in Verbose mode to collect a ton of data.
20+
- And a lot more! Run a full X-Ray in to collect a ton of data.
21+
22+
` gitxray -r https://github.com/some-org/some-repository`
23+
24+
- If you rather use text output, you may want to filter output with filters:
25+
26+
` gitxray -r https://github.com/some-org/some-repository -f user_input -outformat text`
2427

25-
` gitxray -r https://github.com/some-org/some-repository -v`
28+
` gitxray -r https://github.com/some-org/some-repository -f keys,association,starred -outformat text`
29+
30+
` gitxray -r https://github.com/some-org/some-repository -f warning -outformat text`
31+
32+
` gitxray -r https://github.com/some-org/some-repository -f 2024-09-01 -outformat text`
2633

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

2936
# Documentation
3037
- [https://kulkansecurity.github.io/gitxray/](https://kulkansecurity.github.io/gitxray/)
3138
- [https://www.gitxray.com/](https://www.gitxray.com/)
3239

33-
# Installing and running Gitxray
40+
# Installing, Updating, and running Gitxray
3441

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

3744
## PyPI (PIP) Way
3845

39-
`gitxray` is on PyPI and can be installed with:
46+
`gitxray` is on PyPI and can be installed and updated with:
4047

4148
```bash
42-
pip install gitxray
49+
pip install gitxray --upgrade
4350
```
4451

4552
Once installed, simply run gitxray from your command line by typing:
@@ -49,9 +56,12 @@ gitxray -h
4956

5057
## Run your first full X-Ray
5158
```bash
52-
gitxray -o https://github.com/kulkansecurity -v
59+
gitxray -o https://github.com/kulkansecurity
5360
```
5461

62+
![Gitxray Console](https://kulkansecurity.github.io/gitxray/images/console_gitxray.png "Gitxray Console")
63+
<div style="clear: both;"></div>
64+
5565
## Installing from source
5666

5767
You may also run `gitxray` directly by cloning or downloading its GitHub repository and running.
@@ -68,11 +78,11 @@ python3 -m gitxray.gitxray
6878

6979
One of the following must be specified:
7080

71-
* `-r, --repository [URL]` - Specify a single repository URL to check. The URL must begin with `https://`. **Example**: `--repository https://github.com/example/repo`
81+
* `-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`
7282

7383
* `-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`
7484

75-
* `-o, --organization [URL]` - Specify an organization URL to check all repositories under that organization. The URL must begin with `https://`. **Example**: `--organization https://github.com/exampleOrg`
85+
* `-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`
7686

7787
### Optional Arguments
7888

@@ -84,13 +94,17 @@ You'll find these optional but very handy in common gitxray usage.
8494

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

87-
#### Verbose and Debug
88-
- `-v, --verbose` - Enable verbose output which, for example, provides a detailed list of public events instead of a summary. **Example**: `--verbose`
97+
#### Output and Formats
98+
99+
- `-out, --outfile [FILEPATH]` - Specify the file path for the output log. Cannot be a directory. **Example**: `--outfile ./output.log`
100+
101+
- `-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`
102+
103+
#### Debug
89104

90105
- `--debug` - Enable Debug mode for a detailed and extensive output. **Example**: `--debug`
91106

92-
#### Output and Formats
107+
# Terms of Use
93108

94-
- `-out, --outfile [FILEPATH]` - Specify the file path for the output log. Cannot be a directory. **Example**: `--outfile ./output.log`
109+
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.
95110

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

docs/features.md

+26-22
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@
22

33
Because of the amount of data it analyzes, `gitxray` can be a bit overwhelming at first. Let's look at a few examples of potential awesome findings which can better explain why you're here and why `gitxray` is awesome &hearts;.
44

5+
## A user-friendly HTML report &#x1F4CA;
6+
7+
`gitxray` now offers a default output format of `html`, creating a [Bootstrap](https://www.getbootstrap.com)-backed HTML report which offers easy navigation through Repository, Contributor and non-Contributor results.<div style="clear: both;"></div> ![Gitxray HTML Report](images/html_report_gitxray.png "HTML Report Gitxray")<div style="clear: both;"></div>
8+
59
## Unintended disclosures in Contributor profiles &#128064;
610

711
`gitxray` reports under a `user_input` category any user-supplied data that repository Contributors may have exposed via their GitHub accounts inadevertently. This is normally the case of PGP and SSH key name fields, which unfortunately are used by Users to record hostnames, computer models, password locations (e.g. in 1Password), or even the _password itself_ to a given key (which we all know might be the same password used elsewhere). To make things more interesting, `gitxray` also identifies any "excess" data found before, or after, PGP Armored keys published in a User's GitHub account. Wondering what that data normally is? Erroneous copy/pastes from the command line while exporting in ASCII/Armored format their keys. And what might that contain? Most of the times, a shell prompt revealing a local username, a hostname and a directory path. May I remind you all of this data is Public-facing.
812

913
You may focus specifically on these types of findings by filtering results with:
1014
```py
11-
gitxray -o https://github.com/SampleOrg -v -f user_input
15+
gitxray -o https://github.com/SampleOrg -f user_input
1216
```
13-
or, for a specific repository (remember, _Verbose is always optional_):
17+
or, for a specific repository:
1418
``` py
15-
gitxray -r https://github.com/SampleOrg/SampleRepo -v -f user_input
19+
gitxray -r https://github.com/SampleOrg/SampleRepo -f user_input
1620
```
1721

1822
## Spotting shared, co-owned or fake Contributors &#128123;
@@ -24,11 +28,11 @@ Open source projects are under attack, with malicious actors hiding in plain sig
2428
You can focus specifically on association findings by filtering for `association` with:
2529

2630
```
27-
gitxray -o https://github.com/SampleOrg -v -f user_input
31+
gitxray -o https://github.com/SampleOrg -f association
2832
```
29-
or targetting a specific Repository with (_Verbose is always optional_):
33+
or targetting a specific Repository with:
3034
```
31-
gitxray -r https://github.com/SampleOrg/SampleRepo -v -f user_input
35+
gitxray -r https://github.com/SampleOrg/SampleRepo -f association
3236
```
3337

3438
### Important
@@ -41,15 +45,17 @@ Associations MUST NOT be directly and blindly used to report fake or shadow acco
4145

4246
## Forensics: What happened on the day of an incident? &#128269;
4347

44-
Because `gitxray` collects data from multiple sources of activity including Commits, Comments, Workflow Runs, Issues, Deployments and more; and because Verbose mode in `gitxray` shows activity in a standarized YYYY-MM-DD format, it becomes possible to use Filtering in order to place focus on specific activity happening at a specific point in time.
48+
Because `gitxray` collects data from multiple sources of activity including Commits, Comments, Workflow Runs, Issues, Deployments and more; and because `gitxray` shows activity in a standarized YYYY-MM-DD format, it becomes possible to use Filtering in order to place focus on specific activity happening at a specific point in time.
4549

4650
For example, by running `gitxray` with the following arguments, only results from that specific date are returned. You may place focus on a day, or even a month:
4751

4852
```
49-
gitxray -r https://github.com/SampleOrg/SampleRepo -v -f 2024-08
50-
gitxray -r https://github.com/SampleOrg/SampleRepo -v -f 2024-09-01
53+
gitxray -r https://github.com/SampleOrg/SampleRepo -f 2024-08 -outformat text
54+
gitxray -r https://github.com/SampleOrg/SampleRepo -f 2024-09-01 -outformat text
5155
```
5256

57+
An outformat of type `text` can help in this specific use-case more than the defaul `html` report.
58+
5359
## Analyzing Commit Hours to Identify Anomalies &#128347;
5460

5561
`gitxray` provides a summary of contributor commit hours, allowing you to profile contributor activity and detect potential anomalies. This feature helps you understand typical patterns and flag unusual behavior for further investigation.
@@ -62,10 +68,10 @@ gitxray -r https://github.com/SampleOrg/SampleRepo -v -f 2024-09-01
6268

6369
* Reclaimed Usernames: Trusted contributors might have had their accounts deleted and then re-registered by malicious actors. GitHub allows a username to be re-released after 90 days, making this a possible attack vector. Learn more about GitHub’s account deletion policy [here](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/deleting-your-personal-account#deleting-your-personal-account).
6470

65-
Although we always recommend running a full unfiltered verbose X-Ray, it is possible to focus on unreliable historic activity by filtering for Warning keywords:
71+
It is possible to focus on unreliable historic activity by filtering for Warning keywords:
6672

6773
```
68-
gitxray -o https://github.com/SampleOrg -v -f warning
74+
gitxray -o https://github.com/SampleOrg -f warning
6975
```
7076

7177
## X-Raying GitHub Workflows &#9881;
@@ -93,17 +99,15 @@ Another `gitxray` feature is the ability to list a TOP 3 of GitHub accounts that
9399
These findings, if any exist, are reported under a `contributors` category along with additional information related to other Repository Contributors. You can focus specifically on findings from the contributors category by filtering for `contributors` with:
94100

95101
```
96-
gitxray -o https://github.com/SampleOrg -v -f contributors
102+
gitxray -o https://github.com/SampleOrg -f contributors
97103
```
98-
or targetting a specific Repository with (_Verbose is always optional_):
104+
or targetting a specific Repository with:
99105
``` bash
100-
gitxray -r https://github.com/SampleOrg/SampleRepo -v -f contributors
106+
gitxray -r https://github.com/SampleOrg/SampleRepo -f contributors
101107
```
102108
## Fake Starring, Private repos gone Public and more &#128584;
103109

104-
GitHub shares publicly [up to 90 days of past Events](https://docs.github.com/en/rest/activity/events?apiVersion=2022-11-28) for any User account, which include actions such as Repository creation, Watching, Committing, Pull Requesting, and more. `gitxray` summarizes these events for you and prints them out under a `90d_events` category in the results included for each Contributor, summarized in order to reduce the amount of data listed by default.
105-
106-
The summary however can be expanded into a full list of Events by merely turning on _Verbose mode_ (the -v flag). Using _Verbose mode_ is convenient in order to get details on **WHAT** was actioned upon.
110+
GitHub shares publicly [up to 90 days of past Events](https://docs.github.com/en/rest/activity/events?apiVersion=2022-11-28) for any User account, which include actions such as Repository creation, Watching, Committing, Pull Requesting, and more. `gitxray` includes these events under a `90d_events` category in the results included for each Contributor.
107111

108112
For example, Events you may come across that would be interesting include:
109113

@@ -118,9 +122,9 @@ To find Contributors who recently switched from Private to Public a repository o
118122
gitxray -o https://github.com/SampleOrg -f starred,private
119123
```
120124

121-
And you could then enable _Verbose_ (or before, you decide) and target a specific Repository Contributor to get more information:
125+
And you could then target a specific Repository Contributor to get more information:
122126
```
123-
gitxray -r https://github.com/SampleOrg/SampleRepo -v -c some_user
127+
gitxray -r https://github.com/SampleOrg/SampleRepo -c some_user
124128
```
125129
## Lots of e-mail addresses &#128231; and Profiling data &#128100;
126130

@@ -134,13 +138,13 @@ Additionally, Personal Information (e.g. social networks) voluntarily made Publi
134138

135139
Finally, the `profiling` category tends to display information related to the account itself (e.g. creation date, last updated, and more.)
136140

137-
You may focus specifically on `emails`, `personal`, and `profiling` fields with (Verbose is optional):
141+
You may focus specifically on `emails`, `personal`, and `profiling` fields with:
138142
```py
139-
gitxray -o https://github.com/SampleOrg -v -f emails,personal,profiling
143+
gitxray -o https://github.com/SampleOrg -f emails,personal,profiling
140144
```
141145
or, for a specific repository, with:
142146
``` py
143-
gitxray -r https://github.com/SampleOrg/SampleRepo -v -f emails,personal,profiling
147+
gitxray -r https://github.com/SampleOrg/SampleRepo -f emails,personal,profiling
144148
```
145149

146150
## Looking out for malicious Releases and Assets &#128065;

docs/index.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ Gitxray (short for Git X-Ray) is a multifaceted security tool designed for use o
33

44
The Octocat getting X-Rayed | [![Build Workflows](https://github.com/kulkansecurity/gitxray/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/kulkansecurity/gitxray) [![Latest Version in PIP](https://img.shields.io/pypi/v/gitxray.svg)](https://pypi.org/project/gitxray) [![Python Versions](https://img.shields.io/pypi/pyversions/gitxray.svg)](https://pypi.org/project/gitxray) [![License](https://img.shields.io/pypi/l/gitxray.svg)](https://github.com/kulkansecurity/gitxray/blob/main/LICENSE)
55
--- | ---
6-
![Gitxray Logo](https://kulkansecurity.github.io/gitxray/images/logo_gitxray.png "Gitxray Logo") | ![Gitxray Console](https://kulkansecurity.github.io/gitxray/images/console_gitxray.png "Gitxray Console")
7-
<div style="clear: both;"></div>
6+
![Gitxray Logo](https://kulkansecurity.github.io/gitxray/images/logo_gitxray.png "Gitxray Logo") | ![Gitxray Console](https://kulkansecurity.github.io/gitxray/images/console_gitxray.png "Gitxray Console")<br/> ![Gitxray HTML Report](images/html_report_gitxray.png "HTML Report Gitxray")<div style="clear: both;"></div>
87

98
# What is it for?
109
* Identifying threat actors in a Repository. [You may spot co-owned or shared accounts](/features/#spotting-shared-co-owned-or-fake-contributors), as well as inspect public events to [spot fake Stargazers](/features/#fake-stars-private-repos-gone-public-and-more).

0 commit comments

Comments
 (0)