virtual-insanity
← 리포트 목록

exposure_catalog

2026-04-24 secret

260424 — OpenClaw git secret exposure catalog

결론

  • ~/.openclaw git remote: 없음. 현재 기준 외부 push 흔적은 없음.
  • 이전 scan의 12 paths / 202 records는 정밀 분해 결과 실제 unique exposed token 3개로 정규화된다.
  • 종류: GitHub/Copilot 토큰 2개 + Telegram bot token 1개.
  • AAGC hit는 별도 토큰이 아니라 Telegram bot token의 : 뒤 payload가 AAGC...로 시작해서 중복 검출된 것이다.
  • OpenAI sk-*, Anthropic sk-ant-*, AWS AKIA*, Hostinger류는 해당 12개 history 노출 경로에서는 확인되지 않음.

1) 원격 push 여부

git remote -v
<empty>

최신 commit:

eee3f07 fix(oil): prefer Hermes indicator data in ron-pipeline MCP

판정:

  • Git 원격이 없어 GitHub/GitLab 등 외부 push 가능성은 낮음.
  • 단, 로컬 worktree/백업/공유 디스크 복제 가능성은 별개이므로 active token은 폐기/재발급 권고.

2) 노출 토큰 카탈로그 — 값 미출력

토큰 ID는 보고용 별칭이며, 값은 저장/출력하지 않았다.

token id 종류 fingerprint 활성 검증 노출 경로 위험도 폐기 우선순위
G1 GitHub/Copilot token, ghu_ 계열 5b1006b0da2138ff GitHub API 200, login 확인 9개 agent auth-profiles.json 높음: Copilot/agent LLM 라우팅 핵심 P0
G2 GitHub OAuth/PAT, gho_ 계열 53b3cfbac4e657c4 GitHub API 200, scopes=gist, read:org, repo agents/main/agent/auth-profiles.json 매우 높음: repo scope 포함 P0-최우선
T1 Telegram bot token 9d072ca642e1635d Telegram getMe OK, @RONforMAC_Bot cron/jobs.json, scripts/gmail_credit_monitor.py 높음: 알림센터 발송 가능 P0

검증 시 외부 API 응답에서 계정 login/bot username만 확인했고, 토큰 값은 출력하지 않았다.

3) 12개 history 노출 경로 정밀 분해

path pattern 실제 토큰 commit count 사용 맥락
agents/codex/agent/auth-profiles.json github_token G1 2 github-copilot profile
agents/cowork/agent/auth-profiles.json github_token G1 24 github-copilot profile
agents/data-analyst/agent/auth-profiles.json github_token G1 24 github-copilot profile
agents/drift-recovery/agent/auth-profiles.json github_token G1 22 github-copilot profile
agents/evidence-sentinel/agent/auth-profiles.json github_token G1 22 github-copilot profile
agents/guardian/agent/auth-profiles.json github_token G1 2 github-copilot profile
agents/ops-syncer/agent/auth-profiles.json github_token G1 22 github-copilot profile
agents/ron/agent/auth-profiles.json github_token G1 24 github-copilot profile
agents/test/agent/auth-profiles.json github_token G1 22 github-copilot profile
agents/main/agent/auth-profiles.json github_token G2 22 github-copilot/main profile, repo scope
cron/jobs.json telegram_bot_token + AAGC duplicate T1 4 Gmail/Credit Agricole monitor command payload
scripts/gmail_credit_monitor.py telegram_bot_token + AAGC duplicate T1 12 hard-coded Telegram sendMessage

4) 카테고리별 count

정규화 기준: 같은 token 값이 여러 파일/커밋에 반복된 것은 1개로 계산.

카테고리 unique token 수 raw 노출 성격
GitHub/Copilot 2 agent auth-profiles.json에 반복 커밋
Telegram bot 1 cron command + script hard-code
OpenAI sk-* 0 12개 history 경로 기준 미검출
Anthropic sk-ant-* 0 12개 history 경로 기준 미검출
AWS AKIA* 0 미검출
Hostinger 0 미검출
AAGC/AABC 0 별도 토큰 아님 T1 Telegram token 내부 문자열 중복 탐지

참고: 현재 working tree의 일부 auth-profiles.json에는 OpenAI-Codex OAuth/refresh 및 Minimax sk-* 형태의 키가 보인다. 이는 이번 12 paths / 202 records history 노출의 주 항목은 아니지만, 별도 secret hygiene 대상으로 분리 권고.

5) 사용처와 폐기 영향

G1 — GitHub/Copilot token, 9개 agent profile

사용처:

  • agents/*/agent/auth-profiles.json
  • OpenClaw agent runtime의 provider auth 로더
  • workspace/src/providers/github-copilot-token.ts
  • workspace/src/agents/models-config.providers.ts
  • workspace/src/agents/pi-embedded-runner/run.ts
  • workspace/src/agents/pi-embedded-runner/compact.ts

폐기 영향:

  • github-copilot 모델 호출 실패 가능.
  • 영향을 받는 agent: codex, cowork, data-analyst, drift-recovery, evidence-sentinel, guardian, ops-syncer, ron, test.
  • 재발급 후 각 active auth-profiles.json 또는 중앙 secret store에 새 값 반영 필요.

우선순위:

  • P0. 활성이고 여러 agent에 복제되어 있어 한 번 노출 시 blast radius가 큼.

G2 — GitHub token with repo scope, main agent

사용처:

  • agents/main/agent/auth-profiles.json
  • main agent의 github-copilot/profile 경로

검증된 scope:

gist, read:org, repo

폐기 영향:

  • main agent의 GitHub/Copilot 연동 및 repo 접근성 영향 가능.
  • repo scope가 있어 G1보다 보안 우선순위가 높음.

우선순위:

  • P0-최우선. 즉시 revoke/재발급 권고.

T1 — Telegram bot token, @RONforMAC_Bot

사용처:

  • scripts/gmail_credit_monitor.py
  • cron/jobs.json 내 Gmail/Credit Agricole 관련 job command
  • 현재 working tree 추가 확인: scripts/ops/x_monitor.py에도 동일 계열 hard-code 존재
  • 기타 정상화된 Hermes/OpenClaw 경로는 보통 TELEGRAM_BOT_TOKEN env를 사용

폐기 영향:

  • @RONforMAC_Bot 기반 알림센터/보고 발송 실패 가능.
  • 특히 Gmail/Credit Agricole monitor, x_monitor 계열 즉시 영향.
  • 재발급 후 .env/bot_tokens.json/secret store와 하드코딩 제거가 필요.

우선순위:

  • P0. 토큰 단독으로 Telegram bot API 호출 가능.

6) 폐기·재발급 순서 제안

  1. G2 먼저 revokerepo scope 포함. 새 token은 repo scope 최소화 또는 Copilot 전용 OAuth 경로로 대체.
  2. G1 revoke/재발급 — 여러 agent profile 동시 교체 필요. 가능하면 복제된 auth-profiles.json 대신 중앙 secret reference로 전환.
  3. T1 @RONforMAC_Bot revoke/재발급 — 새 token 반영 후 gmail_credit_monitor.py, scripts/ops/x_monitor.py, cron/jobs.json 하드코딩 제거.
  4. 현재 working tree의 OpenAI-Codex OAuth/Minimax key도 별도 secret store 이전.
  5. 토큰 교체 후 BFG 또는 git filter-repo로 history rewrite.

7) history rewrite 권고

원격 없음이므로 절차는 상대적으로 단순하다.

권장 흐름:

1) active token 폐기/재발급
2) 현재 HEAD에서 secret 제거/환경변수화
3) git filter-repo 또는 BFG로 history에서 12경로 secret 제거
4) pre-commit hook 유지
5) 필요 시 새 clean baseline tag 생성

주의:

  • history rewrite 전에는 기존 token을 먼저 폐기해야 한다.
  • force push는 현재 remote가 없으므로 해당 없음. 나중에 remote 추가 시 clean repo만 push.

8) 자체평가

  • 정확성: 4.5/5 — history/HEAD/API 검증으로 실제 unique token 3개까지 정규화.
  • 완성도: 4.4/5 — 폐기 자체는 수행하지 않았고, 카탈로그/우선순위까지 산출.
  • 검증: 4.5/5 — git remote, history scan, token getMe/API status, 사용처 grep 확인.
  • 최소 변경: 4.8/5 — 파일 수정 없음, 값 출력 없이 분석만 수행.

종합: 4.55/5

DONE