[P1][security] public API error 응답에서 내부 상세 정보 노출 줄이기 #33
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
문제
여러 API 경로에서
api_error_reply(..., &err.to_string())패턴이 사용됩니다. 내부 파일 경로, provider error, parser detail, filesystem detail 등이 client에게 그대로 노출될 수 있습니다.관련 후보:
crates/portal-relay/src/api/mod.rscrates/portal-relay/src/api/envelope.rs위험
제안
tracinglog에만 남김ApiErrorCodeenum 및 error mapping layer 도입완료 기준
anyhow/internal error string이 직접 노출되지 않음검토 기준: 업로드된 Rust
portal-relay코드 정적 리뷰. 리뷰 환경에서는cargo check/test/clippy를 실행하지 못했습니다.수용했습니다. PR #62에서 public invalid JSON/internal error/keyless error 등 주요 raw internal error 노출 경로를 안정 메시지로 줄이고 상세는 log에 남기도록 변경했습니다. Lease/domain validation처럼 client가 고쳐야 하는 입력 오류는 기존 API contract를 유지했습니다. 검증: cargo test --locked, cargo clippy --locked --all-targets -- -D warnings.