Skip to content

requirements.txt transitive traversal could potentially leak other files on the same image in CI #2954

Description

@another-rex

When running in CI, a malicious actor could open a PR with a requirements.txt file that links to other secret files that are formatted like requirements.txt (and match valid versions, so quite niche), and force osv-scanner to print out the contents (e.g. as a vulnerability report).

We should prevent this in two ways:

  1. Defaulting to not setting ScanRoot to / (This is a breaking change)
  2. Adding an extra flag to allow users to manually set the scan root.

Lodging this as a task for V3.

See google/osv-scalibr#2323 for context.

Activity

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

    v3Enhancements that require a breaking change (v3)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions