fix(common): 쿼리 파라미터 변환을 fromEntries로 전환해 CodeQL 지적 실질 해소 - #200
Conversation
PR #196의 키 블록리스트 가드는 실제 오염은 막지만 CodeQL js/remote-property-injection이 sanitizer로 인식하지 않아 main 재분석 후에도 알림 3건이 열려 있었다(지적 라인만 가드 추가분만큼 이동). - out[key]=... 할당식 속성 쓰기를 제거하고 entries 배열 + Object.fromEntries로 전환 — define-property 의미라 __proto__류 키로도 프로토타입 오염 불가(방어 자체도 더 강함) - 위험 키 제외 필터는 유지, 기존 테스트 12건 그대로 통과
|
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 |
🧹 knip — dead-code 리포트전체 리포트
|
🩺 NestJS Doctor — 89/100 (Good)진단 279건 (error 0).
architecture / security 상위 항목
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Coverage report
Test suite run success1574 tests passing in 184 suites. Report generated by 🧪jest coverage report action from ebc828a |
배경
PR #196의 키 블록리스트 가드는 실제 오염은 막지만, main 재분석 결과 CodeQL
js/remote-property-injection이 이를 sanitizer로 인식하지 않아 알림 3건이 그대로 열려 있습니다(지적 라인만 가드 추가분만큼 이동).경고 대상인 할당식 속성 쓰기 자체를 제거하는 방식으로 다시 수정합니다.
변경점
out[key] = ...대신 entries 배열을 모아Object.fromEntries로 변환.define-property 의미라
__proto__류 키로도 프로토타입을 오염시킬 수 없어 방어 자체도 더 강해집니다.__proto__/constructor/prototype) 제외 필터는 유지.검증