steps-git-clone icon indicating copy to clipboard operation
steps-git-clone copied to clipboard

Prevent git commands in dangerous dirs

Open ofalvai opened this issue 1 year ago • 0 comments

Checklist

  • [ ] I've read and followed the Contribution Guidelines
  • [ ] step.yml and README.md is updated with the changes (if needed)

Version

Requires a MAJOR/MINOR/PATCH version update

Context

Even though this step is run_if: .IsCI, running it on an incorrectly configured self-hosted agent could do ugly things.

Changes

Match clone_into_dir against a list if known dangerous directories and abort the execution before the first real git command.

image

ofalvai avatar May 17 '24 11:05 ofalvai