Unify Datadog fingerprint across findings, reports, and storage#200
Merged
Conversation
… reports, and in-memory storage while removing legacy similarity IDs.
|
🎯 Code Coverage (details) 🔗 Commit SHA: e580cfa | Docs | Datadog PR Page | Give us feedback! |
whitemerch
changed the base branch from
main
to
chakib.hamie/local_modules_finding_identity
June 19, 2026 13:27
whitemerch
force-pushed
the
chakib.hamie/unify_finding_fingerprint
branch
from
June 19, 2026 13:30
712f7cc to
9f95ecb
Compare
…lint lll on module resolve and tfeval cache comments.
whitemerch
force-pushed
the
chakib.hamie/unify_finding_fingerprint
branch
from
June 19, 2026 13:45
9f95ecb to
e580cfa
Compare
whitemerch
marked this pull request as ready for review
June 19, 2026 13:50
MikaYuoadas
previously approved these changes
Jun 22, 2026
MikaYuoadas
left a comment
Contributor
There was a problem hiding this comment.
Great, I like that we have now a convenient way to have specific fingerprinting algorithm per platform.
Base automatically changed from
chakib.hamie/local_modules_finding_identity
to
main
June 22, 2026 07:05
ChouraquiBen
approved these changes
Jun 22, 2026
ChouraquiBen
left a comment
Contributor
There was a problem hiding this comment.
No changes since Akim's latest review, only the branch rebased. Reapproving in his stead
Contributor
Author
|
/merge |
|
View all feedbacks in Devflow UI.
This PR is already merged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Finding identity was split between an in-engine legacy hash, per-format logic, and in-memory deduplication keys, which made counts and SARIF partial fingerprints easy to disagree. This change makes one stable Datadog fingerprint the source of truth from summary creation through exports and storage deduplication, and removes unused legacy similarity and exclude-results plumbing.
Changes
Model and engine
Introduce
GetDatadogFingerprintHash, stamp eachVulnerableFileinCreateSummary, and removeSimilarityID/ related counters and the old similarity computation package. The inspector and vulnerability builder no longer compute or suppress by legacy similarity IDs.Scan and storage
Summary counters drop failed-similarity metrics; the scan client no longer builds exclude-results maps; in-memory deduplication keys findings with the same fingerprint hash used in summaries.
Configuration
Remove the legacy
exclude-resultsoption from parsing, migration comments, andlegacy_config.mdbecause suppression no longer keys off similarity IDs.Reports and fixtures
All exporters read the stamped
Fingerprintfield (including CSV column rename). E2E comparison order and sample JSON undertest/assetsare updated for the new summary shape.Author Checklist
QA Instruction
go test -count=1 ./...from the repository root (full suite passes locally).make buildthen./bin/datadog-iac-scanner scanon a small Terraform fixture and confirm SARIFpartialFingerprints.DATADOG_FINGERPRINTmatches the fingerprint in JSON summary output for the same finding.Blast Radius
Affects the open-source CLI and library surfaces: JSON summary schema (removed similarity-related fields and counter), CSV column
fingerprintinstead ofsimilarity_id, SARIF and other report formats, and in-memory deduplication granularity (aligned with the fingerprint hash rather than line plus search key).Additional Notes
Downstream, findings with the same fingerprint hash are collapsed into one item. That makes the fingerprint definition load-bearing for what customers see after ingestion. This PR aligns the scanner, in-memory dedupe, and SARIF on one hash so behavior matches that contract; revisiting whether the hash is granular enough (for example across tricky Terraform or multi-rule scenarios) is intentionally follow-up work, not in scope here.
For integrations we care about most today, SARIF is the format that is consumed downstream. Other report outputs (JSON summary, CSV, JUnit, etc.) are updated to stay consistent with the same fingerprint field, but they are not the primary integration surface in practice.
I submit this contribution under the Apache-2.0 license.