Skip to content

harden: add path validation in sync_datasets.ts - #235

Open
Anupam Mediratta (anupamme) wants to merge 1 commit into
braintrustdata:mainfrom
anupamme:fix-repo-autoevals-path-traversal-sync-datasets
Open

Anupam Mediratta (anupamme) wants to merge 1 commit into
braintrustdata:mainfrom
anupamme:fix-repo-autoevals-path-traversal-sync-datasets

Conversation

@anupamme

Copy link
Copy Markdown

Detected possible user input going into a path.join or path.resolve function. This could possibly lead to a path traversal vulnerability, where the attacker can access arbitrary files stored in the file system. Instead, be sure to sanitize or validate user input first. This is defence-in-depth at evals/src/sync_datasets.ts:137 rather than a vulnerability I can show is exploitable here — it makes the failure mode explicit and bounded. Close it freely if the pattern is intentional.

Reference: CWE-22

What changed

  • evals/src/sync_datasets.ts

Verification

No automated check could be run against this repository, so this change is unverified beyond review. Please treat it as a suggestion.


Automated security fix by OrbisAI Security

…traversal.path-join-resolve-traversal security vulnerability

Automated security fix generated by OrbisAI Security

This branch has not been deployed

No deployments
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