Documentation
¶
Overview ¶
Package deduplicator provides functionality to deduplicate cryptographic assets based on their identity in the source code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeduplicateInterimReport ¶
func DeduplicateInterimReport(report *entities.InterimReport) *entities.InterimReport
DeduplicateInterimReport removes duplicate CryptographicAssets that share the same identity (file path + asset key + location). When duplicates are found, their metadata and rule information are merged into a single asset.
The deduplication process:
- Groups assets by (file_path, asset_key, start_line, end_line) tuple, where asset_key is generated by CryptographicAsset.GetKey() based on asset-type-specific identifying fields
- For each group, merges all assets into one representative asset
- Preserves all unique metadata values from merged assets
- Merges all unique rules from all assets in the group
Assets with different identifying characteristics (e.g., different algorithmFamily or algorithmName) or at different locations are kept separate to prevent metadata confusion.
This function modifies the report in-place and returns it for convenience.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.