fix+security(테이블타입): bug hunt 6건 + 인가/SQL injection 2건 #13
Reference in New Issue
Block a user
Delete Branch "johngreen"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
요약
bug hunt review 4명 (debugger + security-reviewer + architect + code-reviewer) 발견 사항 fix.
2 commit
1. fix(테이블타입): bug hunt 6건 (B1~B6) —
420b92bc2. security(테이블타입): 인가 + SQL injection —
efea906e검증
별도 후속 (본 PR scope 외)
🤖 Generated with Claude Code
bug hunt security-reviewer 발견 2건 보안 fix: 1. TableManagementController 인가 누락 (OWASP A01 Broken Access Control) - 15개 write/DDL endpoint 가 admin role 검증 없이 JWT 만 있으면 호출 가능 - 일반 사용자가 PK 재설정/index 변경/컬럼 수정 가능했음 - 조치: - DepartmentController 의 isAdmin/isSuperAdmin helper 패턴 복사 - SUPER_ADMIN 전용 (DDL 5건): primary-key, indexes, nullable, unique, log - admin (COMPANY_ADMIN+) (10건): updateColumnSettings, addTableData, editTableData, deleteTableData, multi-save 등 - read 19건은 그대로 (일반 사용자 접근 유지, company_code 격리만) 2. createLogTable SQL injection (OWASP A03 Injection) - information_schema.data_type 을 raw concat 으로 DDL 생성 - 조치: - ALLOWED_LOG_COLUMN_TYPES Set 으로 화이트리스트 (varchar/text/integer/numeric/boolean/date/timestamp/jsonb 등 21개) - sanitize 빈 식별자 차단 + 원본 테이블에 없는 컬럼 skip - colDefs empty 시 IllegalArgumentException - 알 수 없는 type 은 text 로 안전 대체 검증: - gradle compileJava BUILD SUCCESSFUL - mapper XML 0건 변경 (READ 경로 보호) - 별도 미해결 보안 이슈 (k8s secrets git 노출, CORS 와일드카드 등) 는 본 PR scope 외 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>