Skip to content

Commit

Permalink
Add a comment to hint why we clean the directories (#11272)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishnha authored Jan 10, 2025
1 parent 3963a3f commit 768ddde
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions updater/lib/dependabot/job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ def build_update_strategy(requirements_update_strategy:, lockfile_only:)
sig { params(source_details: T::Hash[String, T.untyped]).returns(Dependabot::Source) }
def build_source(source_details)
# Immediately normalize the source directory, ensure it starts with a "/"
# Uses Pathname#cleanpath to prevent users from maliciously using paths like ../.. to access other directories.
directory, directories = clean_directories(source_details)

Dependabot::Source.new(
Expand Down

0 comments on commit 768ddde

Please sign in to comment.