Skip to content

Fix weak-link deduplication in gap_analysis: check correct dict level#879

Open
PRAteek-singHWY wants to merge 1 commit intoOWASP:mainfrom
PRAteek-singHWY:fix/gap-analysis-weak-link-dedup
Open

Fix weak-link deduplication in gap_analysis: check correct dict level#879
PRAteek-singHWY wants to merge 1 commit intoOWASP:mainfrom
PRAteek-singHWY:fix/gap-analysis-weak-link-dedup

Conversation

@PRAteek-singHWY
Copy link
Copy Markdown
Contributor

Summary

Fixes #878

One-line fix for a deduplication bug in application/database/db.pygap_analysis().

The Bug

Line 2224 checks end_key in extra_paths_dict[key] but extra_paths_dict[key] is {"paths": {}}. The node ID end_key can never match the only key "paths", so the condition is always False. This breaks weak-path deduplication and inflates the extra count shown to users.

The strong-path branch at line 2211 already does this correctly: end_key in extra_paths_dict[key]["paths"].

@PRAteek-singHWY PRAteek-singHWY force-pushed the fix/gap-analysis-weak-link-dedup branch from 783b301 to d326992 Compare April 11, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix: Gap analysis weak-link deduplication checks wrong dictionary level, inflating extra count

1 participant