Repository navigation
[Feat] 분석 결과 콜백 처리 API 구현 - #48
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| Summary summary | ||
| ) { | ||
|
|
||
| public record Finding( |
There was a problem hiding this comment.
[P2] finding은 앞으로도 쓰일 일 많을 거 같아서 따로 파일로 만들어도 될 거 같습니다
There was a problem hiding this comment.
넵 별도의 record 파일로 분리하겠습니다.
| "/swagger-ui/**", | ||
| "/api-docs/**", | ||
| "/v3/api-docs/**", | ||
| "/internal/analysis/callback/**", |
There was a problem hiding this comment.
[P0] 콜백 API가 익명 사용자에게 공개되어있는 거 같습니다! 혹시 따로 막아두셨을까요?
별도의 분석 서버 인증 필터(HMAC 서명+timestamp 권장, 최소한 전용 shared secret)를 추가하고 이 matcher는 해당 인증을 통과한 요청만 허용하는 설정 추가하면 좋을 거 같아요
There was a problem hiding this comment.
넵 이번 PR 내에서 shared secret 검증 인터셉터 추가하는 방식으로 구현해두겠습니다.
| return "INFRA".equalsIgnoreCase(tool); | ||
| } | ||
|
|
||
| // FastAPI severity 문자열 변환, INFO/알 수 없는 값은 LOW 처리 |
There was a problem hiding this comment.
[P5] 미지원 값은 INVALID_PAYLOAD 등의 상태로 기록해두는 게 어떨까요? 추후 운영하면서 해당 상태의 값들을 분석하고, 로직을 디벨롭시키는 방향으로 가는 게 좋을 거 같습니다
There was a problem hiding this comment.
INFO는 FastAPI 스펙에 포함된 값이라 Spring Severity 제약에 맞춰 LOW로 매핑하고, 그 외 미지원 severity 값은 INVALID_PAYLOAD로 실패하도록 수정하겠습니다.
close #47
🔎 개요
FastAPI 분석 서버에서 비동기 분석 완료 후 호출하는 성공/실패 콜백 API를 추가했습니다.
📝 작업 내용
POST /internal/analysis/callback/failureFAILED상태 처리POST /internal/analysis/callback/successCOMPLETED상태 처리/internal/analysis/callback/**👀 참고 사항
콜백 API는 FastAPI worker가 JWT 없이 호출할 수 있도록 했습니다.tool=INFRA는InfraVulnerability, 그 외SEMGREP,CODEQL은CodeVulnerability로 저장합니다.✅ 체크리스트
💬 고민사항 및 리뷰 요구사항 (Optional)