Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): Adds check for overwriting files in generate output #5278

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

ajkpersonal
Copy link

@ajkpersonal ajkpersonal commented Nov 25, 2024

Description

This aims to fix the high vulnerability from the pen test that could lead to users accidentally overwriting important files using the generate command.

Changes Made

  • We add a check and user confirmation if the output directory for a generation has existing files that will be overwritten
  • We provide an option to save approved output paths so that they won't be prompted again for the same path.
  • Don't apply checks or prompts in CI environments.
  • Add a --force flag that skips any prompts.

Testing

  • Manual testing completed
  • Unit tests
  • Integ tests for CI env

Visual

Here's quick loom showing what the prompting looks like to the user: https://www.loom.com/share/5839cfd9bd5f4e80a34338ab8b775302?sid=54ba7010-b2b4-4056-be94-0ad355e6ce21

Copy link

github-actions bot commented Nov 25, 2024

@ajkpersonal ajkpersonal changed the title Adds check for overwriting files in generate output (NOT READY) fix(cli): [WIP] Adds check for overwriting files in generate output (NOT READY) Nov 26, 2024
@ajkpersonal ajkpersonal changed the title fix(cli): [WIP] Adds check for overwriting files in generate output (NOT READY) fix(cli): [WIP] Adds check for overwriting files in generate output Nov 26, 2024
@ajkpersonal ajkpersonal changed the title fix(cli): [WIP] Adds check for overwriting files in generate output fix(cli): Adds check for overwriting files in generate output Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants