-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
273 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.idea/ | ||
bin/ | ||
|
||
audit-org-keys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,73 @@ | ||
# audit-org-keys [![Release](https://img.shields.io/github/workflow/status/jef/audit-org-keys/Release?color=24292e&label=Release&logo=github&logoColor=white&style=flat-square)](https://github.com/jef/audit-org-keys/actions/workflows/release.yaml) | ||
# gh-audit-org-keys [![Release](https://github.com/jef/gh-audit-org-keys/actions/workflows/release.yaml/badge.svg)](https://github.com/jef/gh-vanity/actions/workflows/release.yaml) | ||
|
||
The point of this project is to help demonstrate that users of GitHub could potentially fall victim to getting their private SSH key cracked. This based on the size and complexity of the key the user generates. | ||
|
||
Programs like `ssh2john` from **John the Ripper** can best demonstrate how fast an SSH private key can be solved from a _not so_ complex algorithm with low key lengths (think RSA < 1024 bits). | ||
|
||
## Installation | ||
|
||
`go get -u github.com/jef/audit-org-keys/cmd/audit_org_keys` | ||
1. Install the `gh` cli - see the [installation](https://github.com/cli/cli#installation) | ||
|
||
Also available under [GitHub Releases](https://github.com/jef/audit-org-keys/releases) as an executable. | ||
_Installation requires a minimum version (2.0.0) of the GitHub CLI that supports extensions._ | ||
|
||
2. Install this extension: | ||
|
||
```shell | ||
gh extension install jef/gh-audit-org-keys | ||
``` | ||
|
||
<details> | ||
<summary><strong>Manual Installation</strong></summary> | ||
|
||
Requirements: `cli/cli` and `go`. | ||
|
||
1. Clone the repository | ||
|
||
```shell | ||
# git | ||
git clone [email protected]:jef/gh-audit-org-keys.git | ||
# GitHub CLI | ||
gh repo clone jef/gh-audit-org-keys | ||
``` | ||
|
||
2. `cd` into it | ||
|
||
```shell | ||
cd gh-audit-org-keys | ||
``` | ||
|
||
3. Build it | ||
|
||
```shell | ||
make build | ||
``` | ||
|
||
4. Install it locally | ||
|
||
```shell | ||
gh extension install . | ||
``` | ||
</details> | ||
|
||
## Usage | ||
|
||
It is required that you use a GitHub Personal Access Token (PAT). You can generate one [here](https://github.com/settings/tokens/new). The required scopes are `['read:org']`. Set your PAT to environment variable `GITHUB_TOKEN`. If `GITHUB_TOKEN` isn't set, then you may not get the results you expect. | ||
To run: | ||
|
||
```shell | ||
Usage of audit_org_keys: | ||
-o, --organization string [required] GitHub organization provided to inspect | ||
-s, --show-users all display users with filter (all, `with`, `without`, `multiple`) | ||
gh audit-org-keys | ||
``` | ||
|
||
### Examples | ||
To upgrade: | ||
|
||
- `audit-org-keys --organization="actions"` | ||
- `audit-org-keys --organization="actions" --show-users="all"` | ||
```sh | ||
gh extension upgrade audit-org-keys | ||
``` | ||
|
||
## Releases | ||
### Examples | ||
|
||
| Tag | Description | | ||
|:---:|---| | ||
| `latest` | Built against tagged releases; stable | ||
| `nightly` | Built against HEAD; generally considered stable, but could have problems | | ||
- `gh audit-org-keys --organization="actions"` | ||
- `gh audit-org-keys --organization="actions" --show-users="all"` | ||
|
||
### Acknowledgments | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.