fix(common): 쿼리 키의 프로토타입 오염 위험 속성 쓰기 차단 - #196
Conversation
CodeQL js/remote-property-injection(high) 3건 반영. toQueryParams가 사용자 쿼리 문자열의 키를 그대로 객체 속성으로 써서 __proto__ 등 위험 키가 속성 이름으로 유입될 수 있었다. - __proto__/constructor/prototype 키는 변환에서 제외 - CodeQL이 sanitizer로 인식하도록 Set이 아닌 명시적 키 비교 사용 - 회귀 테스트 1건 추가
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
🩺 NestJS Doctor — 89/100 (Good)진단 279건 (error 0).
architecture / security 상위 항목
|
🧹 knip — dead-code 리포트전체 리포트
|
Coverage report
Test suite run success1574 tests passing in 184 suites. Report generated by 🧪jest coverage report action from cd2c01a |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
배경
CodeQL code scanning의
js/remote-property-injection(high) 3건 반영입니다.toQueryParams가 사용자 쿼리 문자열의 키를 그대로 객체 속성으로 써서(out[key] = ...)__proto__같은 위험 키가 속성 이름으로 유입될 수 있었습니다.사용처가 HTTP 요청 메타 로깅(
request-context.ts) 1곳의 로컬 객체라 실질 위험은 낮지만, 지적은 정당하고 수정 비용이 작아 차단합니다.변경점
__proto__/constructor/prototype키는 변환에서 제외.검증