Use context.get_relative_path for Source File/Path columns (28 artifacts)#1607
Merged
Conversation
The 'Source File' column held the full on-disk path; use context.get_relative_path so it shows the clean in-extraction path instead.
…cts) Overall sweep of the 'full on-disk path stored in a data column' pattern: wrap the appended path variable in context.get_relative_path() so Source File / Source Path / Source DB / Location / Full File Path columns show the clean in-extraction path instead of the examiner's full local path. 49 append sites across 27 artifacts plus webkit's dict-built 'Full File Path' column. Targeted via AST so only the column value is wrapped; file operations (open, endswith, db lookups, media check-in) keep the full path. No header or schema changes. Excluded (not leaks): artifacts whose source column already uses get_relative_path (tikTok, uberClient, uberLeveldb, userDefaults, venmo, walStrings). Not touched here: dhcphp/dhcpl use the legacy 5-arg signature (no context object) and need conversion first.
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.
Summary
Overall sweep of the "full on-disk path stored in a data column" pattern (the issue spotted in bluetoothOther, webkit, calendarAll, celWireless). Wraps the appended path variable in
context.get_relative_path()so Source File / Source Path / Source DB / Location / Full File Path columns show the clean in-extraction path instead of the examiner's full local path.Full File Pathcolumn.open(),.endswith(), DB opens, and media check-ins keep the full path. No header/schema changes.How the set was found
AST audit for path variables (
file_found/source_file/source_path/filepath) appended into a path/source-named column, then filtered to genuine raw-path leaks.Excluded (correctly)
get_relative_path: tikTok, uberClient, uberLeveldb, userDefaults, venmo, walStrings.contextobject) — they need conversion to the context form first; flagged for a follow-up.Validation