Track source on detected storage trackers

The cookie detector tags every detection with a source (script,
pre-existing, http) but the storage detector did not, so storage
rows always landed in detected_trackers with source NULL even though
the SDK already distinguishes wrapper writes from pre-load scans.

Plumb a "script"/"pre-existing" source from the storage detector
through the report endpoint into DetectedStorageItem, so the column
gets populated for localStorage, sessionStorage, indexedDB and
cacheStorage entries. No schema change is needed: detected_trackers
already accepts CookieSource values regardless of tracker_type, and
the existing row renders the badge as soon as it is non-null.

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-05-22 14:28:29 +02:00
parent 6eb30c7b79
commit e2b8ee15e7
4 changed files with 24 additions and 4 deletions

View File

@@ -123,6 +123,7 @@ type (
Key string
StorageType coredata.TrackerType
ValueSize *int
Source *coredata.CookieSource
InitiatorURL *string
}
@@ -2124,6 +2125,7 @@ func (s *Service) ReportDetectedTrackers(
TrackerType: ds.StorageType,
Identifier: ds.Key,
ValueSize: ds.ValueSize,
Source: ds.Source,
InitiatorURL: ds.InitiatorURL,
},
&inserted,