Skip to content

auto-improve: fix: the account detector threw away every account number starting with zero - #2

Merged
hkjang merged 1 commit into
mainfrom
auto/2026-09-02-1730
Sep 2, 2026
Merged

auto-improve: fix: the account detector threw away every account number starting with zero#2
hkjang merged 1 commit into
mainfrom
auto/2026-09-02-1730

Conversation

@hkjang

@hkjang hkjang commented Sep 2, 2026

Copy link
Copy Markdown
Owner

자율 개선 에이전트가 생성한 PR입니다.

  • runInfoCommand가 version 외 인자를 run()으로 흘려보내 agenthub --help가 DB 오류로 실패 (2/1/S)
  • 릴리즈: v0.226.0 (2026-09-02)

2026-09-02 (2차)

  • 선택: DLP 계좌번호 검출기가 0으로 시작하는 계좌번호를 전부 놓치던 문제 수정 (가치 4 / 위험 2 / 작업량 S)
  • 결과: 성공 — 커밋 4e240c5 (auto/2026-09-02-1730)
  • 요약: notPhone이 계좌와 전화번호를 "0으로 시작하지 않을 것"으로 갈랐는데, 앞 두 조건(!HasPrefix("01"), !HasPrefix("02"))은 뒤의 !HasPrefix("0")에 이미 먹혀 죽은 코드였고 살아있던 조건은 틀린 판정이었습니다 — 기업은행·우체국·상당수 국민은행 계좌가 0으로 시작하므로 계좌번호를 '차단'으로 설정한 사이트가 그 은행들만 조용히 통과시키고 있었습니다(찾지 못한 것은 감사 로그에 아무 흔적도 남지 않는 실패). 체크섬이 없는 두 값을 실제로 가르는 것은 자릿수 묶음이라, 한국 전화번호 모양(0으로 시작하는 24자리 지역번호 - 34자리 국번 - 정확히 4자리, 세 묶음)일 때만 계좌에서 제외하도록 고쳤습니다. internal/dlp는 런타임 base 이미지 소스라 BASE_VERSION도 0.16.0으로 올렸습니다(5곳). 검증: 0으로 시작하는 계좌 3종·전화번호 4종·날짜 리터럴 테스트 추가, go vet, go test -race ./cmd/... ./internal/..., web npm ci+lint+build, scripts/release-catalog-images.sh check-versions 모두 통과.
  • 보류 아이디어:
    • 사업자등록번호가 계좌번호로도 중복 집계됨(220-81-62517이 두 등급으로 보고되어 운영자가 읽는 건수가 부풀려짐) (3/2/S)
    • korean.EndsInConsonant가 괄호·따옴표로 끝나는 값에서 조사를 잘못 고름 (2/2/S)
    • captureHandler.WithGroup이 그룹 이름을 버려 서로 다른 그룹의 같은 키가 충돌 (2/1/S)
    • runInfoCommand가 version 외 인자를 run()으로 흘려보내 agenthub --help가 DB 오류로 실패 (2/1/S)

🤖 auto-improve 2026-09-02 · https://github.com/hkjang/aidev

…th zero

The rule that separated a bank account from a phone number was "it must not
start with a zero", written three times over: `!HasPrefix("01")` and
`!HasPrefix("02")` could never decide anything the `!HasPrefix("0")` after them
did not already decide. What the surviving condition decided was wrong.

기업은행 and 우체국 account numbers begin with a zero, and so do a good many
국민은행 ones. A site that set 계좌번호 to 차단 got exactly what it asked for from
every other bank and a silent pass from those — the failure mode a DLP scanner
has no way to show you, because nothing is recorded about what it did not find.

The grouping is what actually tells the two apart, and neither has a check digit
to fall back on. A Korean telephone number written with hyphens is three groups:
an area code starting with zero, a three or four digit exchange, and exactly four
digits. An account number is almost never all three at once — 012-345678-01-011
has four groups, 012345-01-123456 has a six digit first group, 0123-456-789012
ends in six. Those are now found; 02-1234-5678 and 031-123-4567 still are not,
and neither is 2026-09-02.

internal/dlp is built into the runtime base image, so BASE_VERSION moves with it.
@hkjang
hkjang merged commit 0c58fca into main Sep 2, 2026
@hkjang
hkjang deleted the auto/2026-09-02-1730 branch September 2, 2026 08:35
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T08:36:58.473805Z 4e240c5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

hkjang added a commit to hkjang/aidev that referenced this pull request Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant