Skip to content

Commit 1b98edb

Browse files
authored
Update github-leaked-secrets.md
1 parent ed79d9e commit 1b98edb

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/generic-methodologies-and-resources/external-recon-methodology/github-leaked-secrets.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,6 @@
3939
> - GitHub’s REST code search API is legacy and does not support regex; prefer the Web UI for regex searches. The gh CLI uses the legacy API.
4040
> - Only files below a certain size are indexed for search. To be thorough, clone and scan locally with a secrets scanner.
4141
42-
### Modern GitHub Code Search tips (UI)
43-
44-
Use the new Code Search UI for fast boolean and regex queries.
45-
46-
- Scope by org/repo/branch: `org:Target` `repo:owner/name@dev`
47-
- Filter by language/path/file: `language:python path:/config/** filename:.env`
48-
- Boolean/regex examples (wrap regex with `/.../`):
49-
- Find AWS keys near secret: `org:Target content:/aws(_|\W){0,3}(secret|access)/i`
50-
- Slack tokens: `org:Target content:/xox[abpsc e]-[A-Za-z0-9-]{10,}/`
51-
- GitHub tokens: `content:/(ghp|gho|ghu|ghs|ghr|github_pat_)[A-Za-z0-9_]{10,}/`
52-
- Private keys: `content:/-----BEGIN (RSA|OPENSSH|EC) PRIVATE KEY-----/`
53-
- Search non-default branch: `repo:owner/name@feature-x content:/API_KEY/`
54-
55-
For API/CLI automation (legacy search engine):
56-
- `gh search code '"SECRET_KEY" org:Target filename:.env' --limit 1000 --json repository,path,url`
57-
5842
### Programmatic org-wide scanning
5943

6044
- TruffleHog (GitHub source):

0 commit comments

Comments
 (0)