feat: implement dynamic gitleaks severity mapping (#1)#13
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces dynamic severity and confidence mapping for Gitleaks findings based on tags and rule IDs, improves path normalization to prevent repository root escapes, and adds comprehensive E2E and unit tests. The review feedback suggests optimizing performance by defining valid severities and confidences as module-level constants, and fixing a path normalization issue where the computed relative path was ignored in favor of the unnormalized path.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Resolves #1. Co-Authored-By: Gemini 3.1 Pro (High) <noreply@google.com> Co-Authored-By: Codex GPT-5 <noreply@openai.com>
bbe9b17 to
f2b4e46
Compare
Purpose & Motivation
Gitleaks finding이 모든 룰을
HIGH/MEDIUM으로 저장하던 문제를 고쳐,RuleID와Tags기반으로Finding.severity/Finding.confidence를 동적으로 매핑합니다.Resolves #1.
Context
구현 범위는 Gitleaks report item을 core
Finding으로 변환하는 mapper 계층에 한정했습니다.Tags의severity:<level>/confidence:<level>값을 우선 적용합니다.RuleID기반 mapping table과aws-prefix rule을 적용합니다.HIGH/MEDIUM으로 fallback합니다.tests/test_gitleaks_mapper.py와tests/test_dynamic_mapping_e2e.py에 public-safe synthetic fixture 기반 검증을 추가했습니다.Note
리뷰 시 특히 아래를 봐주세요.
Tagsoverride →RuleIDmapping → default fallback 우선순위가 의도와 맞는지검증:
uv run pytest→398 passedgit diff --check→ cleanDependency
Checklist