Skip to content

Reading in CSVs with glob #18

Open

Description

@ksaur

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.

Activity

  1. added
    refactor
    good first issue
    bug
    on Aug 30, 2024
  2. ksaur commented on Sep 5, 2024

    @ksaur
    ContributorAuthor

    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.

  3. ksaur commented on Sep 5, 2024

    @ksaur
    ContributorAuthor

    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

  4. added a commit that references this issue on Sep 20, 2024
  5. AloysJehwin commented on Aug 28, 2026

    @AloysJehwin
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issuerefactor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions