You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-24Lines changed: 38 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,88 +1,102 @@
1
-
# Overview
1
+
# gh-secret-scanning - The GitHub Secret Scanning CLI Extension
2
+
2
3
This project is a GitHub CLI (`gh`) extension that provides commands for interacting with secret scanning alerts.
3
4
4
5
This extension helps GitHub Advanced Security (GHAS) customers prioritize remediation of their secret scanning alerts by identifying and focusing on those that are confirmed active first.
5
6
6
-
While this extension works for Enterprise Cloud (GHEC) customers, it is primarily intended for GitHub Enterprise Server (GHES) customers who do not have access to the [GitHub.com secret scanning validity check feature](https://docs.github.com/en/enterprise-cloud@latest/code-security/secret-scanning/managing-alerts-from-secret-scanning#validating-partner-patterns).
7
+
While this extension works for Enterprise Cloud (GHEC) customers, it is primarily intended for GitHub Enterprise Server (GHES) customers who do not have access to the [GitHub.com secret scanning validity check feature](https://docs.github.com/en/enterprise-cloud@latest/code-security/secret-scanning/managing-alerts-from-secret-scanning/evaluating-alerts#checking-a-secrets-validity). Validity check on GHES is available as of `>=3.12` but currently limited to GitHub Personal Access Tokens (PAT).
7
8
8
9
Primary features include:
10
+
9
11
- Listing secret scanning alerts for an enterprise, organization, or repository
10
12
- Verifying if secret scanning alerts are still active
13
+
- Expand the out-of-the-box secret scanning validity checks capabilities with custom validators
11
14
- Opening issues in repos that contain valid secrets
-[GHES 3.7+](https://docs.github.com/en/enterprise-server@3.7/admin/all-releases#releases-of-github-enterprise-server) or [GHEC](https://docs.github.com/en/enterprise-cloud@latest/admin/overview/about-github-enterprise-cloud)
Authenticate with your GitHub Enterprise Server or GitHub Enterprise Cloud account:
29
-
```
36
+
37
+
```bash
30
38
gh auth login
31
39
```
32
40
33
-
## Alerts subcommand
41
+
### Alerts subcommand
42
+
34
43
Target either an enterprise, organization, or repository by specifying the `-e`, `-o`, or `-r` flags respectively. _Exactly one selection from these three flags is required._
35
44
36
-
```
45
+
```bash
37
46
gh secret-scanning alerts -e <enterprise>
38
47
```
39
48
40
-
```
49
+
```bash
41
50
gh secret-scanning alerts -o <organization>
42
51
```
43
52
44
-
```
53
+
```bash
45
54
gh secret-scanning alerts -r <repository>
46
55
```
47
56
48
57
Optionally add flags to specify a GHES server, limit the number of secrets processed, filter for a specific secret provider, display the secret values, generate a csv report, include extra fields, and more:
Target either an enterprise, organization, or repository by specifying the `-e`, `-o`, or `-r` flags respectively. _Exactly one selection from these three flags is required._
55
66
56
-
```
67
+
```bash
57
68
gh secret-scanning verify -e <enterprise>
58
69
```
59
70
60
-
```
71
+
```bash
61
72
gh secret-scanning verify -o <organization>
62
73
```
63
74
64
-
```
75
+
```bash
65
76
gh secret-scanning verify -r <repository>
66
77
```
67
78
68
79
Optionally add flags to specify a GHES server, limit the number of secrets processed, filter for a specific secret provider, display the secret values, generate a csv report, include extra fields, and more:
Interact with secret scanning alerts for a GHEC or GHES 3.7+ enterprise, organization, or repository
87
101
88
102
Usage:
@@ -109,8 +123,8 @@ Flags:
109
123
Use "secret-scanning [command] --help"for more information about a command.
110
124
```
111
125
112
-
# Demo
126
+
## Demo
127
+
113
128
This example first lists the alerts for an organization with the `alerts` subcommand, and then verifies the secrets with the `verify` subcommand. The `--csv` flag is used to generate a csv report of the results, and the `--create-issues` flag is used to create issues in any repository that contains a valid secret.
0 commit comments