← Java / Spring 목차

JAVA-065 / 중급

예외 삼킴 (catch 후 무시) → 보안 이벤트 누락

A09:2021 Security Logging and Monitoring Failures · CWE-390 Detection of Error Condition Without Action

왜 문제가 될까요?

인증/서명 검증 실패가 조용히 지나간다.

이렇게 수정하세요

java
try { verify(token); }
catch (JwtException e) { log.warn("jwt invalid reason={}", e.getClass().getSimpleName()); throw new Unauthorized(); }

더 읽기