← All rules
IOI-002 · IoI Rule · Semantic
IndexedDB Cache ↔ History URL Semantic Check
Contributed by @ioi-framework · 2025-01-01
· v1.0
· View scenario →
Invariant predicate φ
Every domain encoded in an IndexedDB cache path must have a corresponding URL entry in the Chrome History database.
Tested on:
Virtuoso 7.2 (OpenLink OSE)
Dependency specification
Three artifact classes are involved:
- Chrome IndexedDB cache directories — file paths under
Default/IndexedDB/with origin-encoded domain names - Chrome History database — URL facets with
observable:fullValue - $UsnJrnl records — update-reason flags for the
Historyfile
For every domain encoded in an IndexedDB cache path, a corresponding URL entry must exist in the History database, and no low-level modification should have been recorded against History.
Contradiction condition
Fires when a cached domain has no corresponding History URL and the USN journal records DataTruncation, DataOverwrite, or DataExtend against History.
SPARQL signature
SELECT ?domain ?evidence_files ?mft_examples ?usn_events ?usn_evidence
WHERE {
{
SELECT ?domain
(COUNT(DISTINCT ?mft_file) AS ?evidence_files)
(GROUP_CONCAT(DISTINCT ?mft_file; separator=" ; ") AS ?mft_examples)
WHERE {
GRAPH <mft_case> {
{ ?facet ioi-ext:parentPath ?path .
FILTER(CONTAINS(?path, "IndexedDB")) }
UNION
{ ?facet observable:filePath ?path .
FILTER(CONTAINS(?path, "IndexedDB")) }
BIND(STRBEFORE(STRAFTER(?path, "https_www."), "_") AS ?domain)
BIND(?path AS ?mft_file)
}
FILTER NOT EXISTS {
GRAPH <history_case> {
?url_facet observable:fullValue ?url_value .
FILTER(CONTAINS(LCASE(STR(?url_value)), LCASE(?domain)))
}
}
}
GROUP BY ?domain
}
{
SELECT (COUNT(DISTINCT ?usn_file) AS ?usn_events)
(GROUP_CONCAT(DISTINCT ?update_reasons; separator=" ; ") AS ?usn_evidence)
WHERE {
GRAPH <usn_case> {
?usn_file core:hasFacet ?usn_file_facet, ?usn_facet .
?usn_file_facet a observable:FileFacet ;
observable:fileName "History" .
?usn_facet ioi-ext:updateReasons ?update_reasons .
FILTER(CONTAINS(?update_reasons, "DataTruncation") ||
CONTAINS(?update_reasons, "DataOverwrite") ||
CONTAINS(?update_reasons, "DataExtend"))
}
}
}
FILTER(?usn_events > 0)
}
Graph IRI substitution
Replace <mft_case>, <history_case>, and <usn_case> with your named graph IRIs.
Expected output
| Variable | Description |
|---|---|
?domain |
Domain present in IndexedDB but absent from History |
?evidence_files |
Count of IndexedDB paths evidencing the domain |
?mft_examples |
Semicolon-separated IndexedDB paths |
?usn_events |
Count of USN modification records against History |
?usn_evidence |
Semicolon-separated update-reason strings |