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
Merge pull request #11 from advanced-security/select-secret-output
Updated list secret scanning alerts to give all default and generic by default, allow switching off either, and listing a custom set of types if needed
Copy file name to clipboardExpand all lines: README.md
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,9 +29,8 @@ A note on common arguments: generally, the date in `--since` can be specified as
29
29
This script retrieves secret scanning alerts from GitHub repositories, organizations, or Enterprises and outputs them in CSV or JSON format. It supports filtering by state, date, and push protection bypass status. Use this to audit, analyze, or export secret scanning data for compliance or security purposes.
--generic, -g Include generic secret types (not just vendor secret types/custom patterns, which is the
48
-
default)
46
+
--no-generic Exclude generic secret types from the output
47
+
--no-default Exclude default secret types from the output
48
+
--include-types INCLUDE_TYPES [INCLUDE_TYPES ...]
49
+
Include specific secret types in the output (adds to any generic/default secrets that are output, so use --no-generic and --no-default to exclude those if required)
49
50
--bypassed, -b Only show alerts where push protection was bypassed
50
-
--state {open,resolved}, -s {open,resolved}
51
+
--state, -s {open,resolved}
51
52
State of the alerts to query
52
53
--no-include-secret, -n
53
54
Do not include the secret in the output
54
55
--include-locations, -l
55
56
Include locations in the output
56
57
--include-commit, -c Include commit date and committer in the output
57
-
--since SINCE, -S SINCE
58
-
Only show alerts created after this date/time - ISO 8601 format, e.g. 2024-10-08 or
59
-
2024-10-08T12:00; or Nd format, e.g. 7d for 7 days ago
58
+
--since, -S SINCE 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
60
59
--json Output in JSON format (otherwise CSV)
61
60
--raw, -r Output the raw data from the GitHub API
62
61
--quote-all, -Q Quote all fields in CSV output
63
62
--hostname HOSTNAME GitHub Enterprise hostname (defaults to github.com)
help="Include generic secret types (not just vendor secret types/custom patterns, which is the default)",
294
+
help="Exclude generic secret types from the output",
295
+
)
296
+
parser.add_argument(
297
+
"--no-default",
298
+
action="store_true",
299
+
help="Exclude default secret types from the output",
300
+
)
301
+
parser.add_argument(
302
+
"--include-types",
303
+
type=str,
304
+
nargs="+",
305
+
help="Include specific secret types in the output (adds to any generic/default secrets that are output, so use --no-generic and --no-default to exclude those if required)",
0 commit comments