Skip to content

Improvements in dataset path parsing #155

@aheev

Description

@aheev

The regex-based file matching in common.js and conftest.py uses:
const dataFileRegex = new RegExp("([^"]+\\.(${dataFileExtension.join('|')}))", "gi");
This pattern matches any file with allowed extensions without path traversal protections (e.g., ../../../etc/passwd.csv). However, since these are test files running in controlled environments, the risk is limited.

Recommendations:

  1. Add path normalization and validation before file operations
  2. Use path.resolve() and verify paths stay within expected directories
  3. Consider adding allowlist validation for dataset paths

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions