Secret Scanners Look for Credentials. I Wanted One That Looks for Me.
I let coding agents write a lot of my commits now. They write what they see, and what they see is my machine: /Users/<me>/... in a README, me@my-laptop ~ % in a pasted test log, a claude.ai/code/session_... link at the b
I let coding agents write a lot of my commits now. They write what they see, and what they see is my machine: /Users/<me>/... in a README, me@my-laptop ~ % in a pasted test log, a claude.ai/code/session_... link at the bottom of a PR body.
None of that is a credential, so secret scanners don't flag it. I wanted one that knows who I am.
- Source: https://github.com/0-draft/kwangmyong
- Install:
go install github.com/0-draft/kwangmyong/cmd/kwangmyong@latest, or a binary from the releases page
Same repository, two scanners
A four-commit repository for a made-up developer, Taro Yamada (login tyamada, laptop Taros-MacBook-Pro):
-
README.mdmentions/Users/tyamada/src/app/log -
NOTES.mdmentions~/.claude/projects/-Users-tyamada-src-app/memory -
test.loghastyamada@Taros-MacBook-Pro app % make test - one commit message ends with a Claude Code session URL
-
AUTHORSwithε±±η° ε€ͺιwas added in one commit and deleted in the next
gitleaks 8.30.1:
$ gitleaks git . --no-banner
INF 3 commits scanned.
INF scanned ~204 bytes (204 bytes) in 36.2ms
INF no leaks found
Correct. There are no secrets in it.
kwangmyong, given the name, login and hostname:
$ kwangmyong scan --history .
HIGH identity.name file NOTES.md:1 tyβ¦[b35fc2ee]
HIGH identity.name file README.md:3 tyβ¦[b35fc2ee]
HIGH identity.name file test.log:1 tyβ¦[b35fc2ee]
HIGH identity.host file test.log:1 Taβ¦[a84654fa]
HIGH generic.agent-session-url commit 871e593 message htβ¦[509ace00]
HIGH identity.name history AUTHORS@686ce61:1 ε±±β¦[ed6d53c9]
6 findings (6 high, 0 warn)
Values are printed as a prefix and a fingerprint, so the scan log doesn't leak them again. --reveal prints them.
What it searches for
# ~/.config/kwangmyong/config.toml
[identity]
names = ["Taro Yamada", "ε±±η° ε€ͺι"]
logins = ["tyamada"]
hosts = ["Taros-MacBook-Pro"]
It also adds this machine's login, home directory, hostname and git identity. Each value is expanded into the forms it shows up in: tyamada, t.yamada, Yamada Taro, -Users-tyamada-, Taro's MacBook Pro.
Session links from Claude Code and Codex are flagged without any config.
Beyond the working tree
kwangmyong github <owner> reads issues, PRs, comments, reviews, releases and gists through the API. git filter-repo doesn't reach those.
kwangmyong plan . writes the filter-repo inputs and a checklist to a temp directory outside the repository:
$ kwangmyong plan .
4 commit(s) from fee9bcc2ac41 would be rewritten, 0 tag(s) move
Hooks
kwangmyong hook pre-commit
kwangmyong hook pre-push
kwangmyong hook claude # Claude Code PreToolUse
The Claude Code hook exits 2, so the agent gets the reason back instead of the command running. Here it is on the tool call for a gh pr create with a session link in the body:
$ kwangmyong hook claude < tool-call.json
kwangmyong: this command would publish your identity (1 finding(s)):
generic.agent-session-url command gh:3 htβ¦[509ace00]
Use ~/ or repo-relative paths, your public handle instead of a real name, the GitHub noreply address as the commit email, and drop agent session links.
$ echo $?
2
Not covered yet: wikis, Actions logs, Discussions.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.