Skip to content

Use context.get_relative_path for Source File/Path columns (28 artifacts)#1607

Merged
abrignoni merged 2 commits into
mainfrom
fix-relpath-source-columns
Jun 25, 2026
Merged

Use context.get_relative_path for Source File/Path columns (28 artifacts)#1607
abrignoni merged 2 commits into
mainfrom
fix-relpath-source-columns

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

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.

  • 49 append sites across 27 artifacts + webkit's dict-built Full File Path column.
  • Targeted via AST node offsets so only the column value is wrapped — 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)

  • Source column already relative via get_relative_path: tikTok, uberClient, uberLeveldb, userDefaults, venmo, walStrings.
  • dhcphp / dhcpl use the legacy 5-arg signature (no context object) — they need conversion to the context form first; flagged for a follow-up.

Validation

  • pylint 10.00/10 on all 28 files (unchanged).
  • Spot-checked that file operations keep the full path while only the source column is relativized.
  • PluginLoader loads all 577.

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.
@abrignoni abrignoni merged commit f3a7d2e into main Jun 25, 2026
1 check passed
@abrignoni abrignoni deleted the fix-relpath-source-columns branch June 25, 2026 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant