Skip to content

Commit 2bb8bbf

Browse files
committed
Updated README and made executable
1 parent e98e68c commit 2bb8bbf

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

README.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Requirements
44

5-
- Python 3.9 or higher
5+
- Python 3.10 or higher
66
- Install dependencies with `python3 -mpip install -r requirements.txt`
77
- Put a GitHub token in your environment in `GITHUB_TOKEN`
88

@@ -79,6 +79,29 @@ options:
7979
--debug, -d Enable debug logging
8080
```
8181

82+
```text
83+
usage: replay_secret_scanning_result_status.py [-h] [--scope {ent,org,repo}] [--state {open,resolved}] [--since SINCE] [--json] [--quote-all] [--hostname HOSTNAME] [--debug] name
84+
85+
Replay secret scanning alert status for a GitHub repository, organization or Enterprise, based on a provided file of previous statuses. This can be useful if a repository is deleted and recreated, and you want to restore
86+
the previous status of the alerts. This script reads a CSV file with a header from stdin, with the following columns: repo, secret, secret_type, state, resolution, resolution_comment, url
87+
88+
positional arguments:
89+
name Name of the repo/org/Enterprise to query
90+
91+
options:
92+
-h, --help show this help message and exit
93+
--scope {ent,org,repo}
94+
Scope of the query
95+
--state {open,resolved}, -s {open,resolved}
96+
State of the alerts to query
97+
--since SINCE, -S SINCE
98+
Only show alerts created after this date/time - ISO 8601 format, e.g. 2024-10-08 or 2024-10-08T12:00; or Nd format, e.g. 7d for 7 days ago
99+
--json Output in JSON format (otherwise CSV)
100+
--quote-all, -q Quote all fields in CSV output
101+
--hostname HOSTNAME GitHub Enterprise hostname (defaults to github.com)
102+
--debug, -d Enable debug logging
103+
```
104+
82105
```text
83106
usage: enrich_code_scanning_alerts.py [-h] [--mitre-cwe-csv MITRE_CWE_CSV] [--metadata-format {codeql,parse_ql}] [--debug] [--format {json,html}] [--fields FIELDS] [--groupby GROUPBY] alerts metadata scope
84107
@@ -105,6 +128,28 @@ options:
105128
Field to group the alerts by
106129
```
107130

131+
```text
132+
usage: resolve_duplicate_secret_scanning_alerts.py [-h] [--scope {ent,org,repo}] [--state {open,resolved}] [--since SINCE] [--hostname HOSTNAME] [--debug] [--add-matching-secret OLD_TYPE NEW_TYPE] name
133+
134+
Resolve duplicate secret scanning alerts for a GitHub repository, organization or Enterprise.
135+
136+
positional arguments:
137+
name Name of the repo/org/Enterprise to query
138+
139+
options:
140+
-h, --help show this help message and exit
141+
--scope {ent,org,repo}
142+
Scope of the query
143+
--state {open,resolved}, -s {open,resolved}
144+
State of the alerts to query
145+
--since SINCE, -S SINCE
146+
Only show alerts created after this date/time - ISO 8601 format, e.g. 2024-10-08 or 2024-10-08T12:00; or Nd format, e.g. 7d for 7 days ago
147+
--hostname HOSTNAME GitHub Enterprise hostname (defaults to github.com)
148+
--debug, -d Enable debug logging
149+
--add-matching-secret OLD_TYPE NEW_TYPE, -a OLD_TYPE NEW_TYPE
150+
Add a new pair of matched secret types
151+
```
152+
108153
## License
109154

110155
(C) Copyright 2024 GitHub, Inc. This is not open source software, and comes with no support or commitments.

resolve_duplicate_secret_scanning_alerts.py

100644100755
File mode changed.

0 commit comments

Comments
 (0)