You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are currently reading in all of the CSVs of the performance trace data using python's glob (list(self.data_dir.glob("**/*.csv"))) with no security checks. It seems like we need to do a bit more here in terms of sanitizing inputs.
We need to up the priority of this. We need to make sure we only read in files named as the perf_event_log, else users folder paths will cause the ingestor to fail. We need to fix that, and add appropriate error messages.
Users will currently get KeyError: "Cannot get left slice bound for non-unique label: Timestamp('2023-04-02 00:09:00')" or something if they have other CSVs unexpected in their folders
Opened #134 for this. Two concrete things the unchecked glob was allowing: a missing or non-directory data_dir reported the same "no csvs ending in perf_event_log found" message as a real empty directory, and glob follows symlinks, so a link under data_dir could pull a CSV in from anywhere on disk. Matches are now resolved and kept only if they still land under data_dir; a symlink that stays inside keeps working.
Activity
ksaur commentedon Sep 5, 2024
We need to up the priority of this. We need to make sure we only read in files named as the
perf_event_log, else users folder paths will cause the ingestor to fail. We need to fix that, and add appropriate error messages.ksaur commentedon Sep 5, 2024
Users will currently get
KeyError: "Cannot get left slice bound for non-unique label: Timestamp('2023-04-02 00:09:00')"or something if they have other CSVs unexpected in their foldersCsv refactor (#75)
AloysJehwin commentedon Aug 28, 2026
Opened #134 for this. Two concrete things the unchecked glob was allowing: a missing or non-directory
data_dirreported the same "no csvs ending in perf_event_log found" message as a real empty directory, andglobfollows symlinks, so a link underdata_dircould pull a CSV in from anywhere on disk. Matches are now resolved and kept only if they still land underdata_dir; a symlink that stays inside keeps working.