auto-improve: fix: the account detector threw away every account number starting with zero - #2
Merged
Merged
Conversation
…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.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
자율 개선 에이전트가 생성한 PR입니다.
agenthub --help가 DB 오류로 실패 (2/1/S)2026-09-02 (2차)
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모두 통과.agenthub --help가 DB 오류로 실패 (2/1/S)🤖 auto-improve 2026-09-02 · https://github.com/hkjang/aidev