Samagra-Development / workflow

Workflow is an Open Source project aimed towards the creation of data flow models using config files thereby allowing you to easily create and interact with stateful applications with minimum setup.
https://samagra-development.github.io/workflow
5 stars 28 forks source link

feat: Script Added to rotate secrets in `.env` #50

Closed SanjaySinghRajpoot closed 1 year ago

SanjaySinghRajpoot commented 1 year ago

Description

The script is a command-line tool that allows users to rotate the secrets for one or more variables in a .env file using a randomly generated value. The script takes the path to the .env file as a required argument and an optional list of variable names to rotate secrets for.

The script reads the contents of the .env file and iterates over each line. For each line that contains a variable name and value and is not commented out, the script checks whether the variable name is in the list of variables to rotate secrets for.

Changes

Added a new file called rotate_secrets.py

tushar5526 commented 1 year ago

LGTM! Let's use this in #49 to rotate the secrets in gitpod and subsequently in #43

SanjaySinghRajpoot commented 1 year ago

ok, I will do that.