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

mask .envvars + only mask vars longer than 5 chars #4245

Merged

Conversation

andreafalzetti
Copy link
Contributor

@andreafalzetti andreafalzetti commented Apr 16, 2024

Proposed changes

Fixes: DEV-290

  1. mask vars coming from the .env file
  2. mask vars only if they are longer than 5 chars

How to validate

  1. Using https://github.com/okteto/go-getting-started
  2. Create a .env with vars of different lengths
  3. Modify the deploy commands to print those vars, of print the whole env
  4. Using 2.26.0 validate that the vars coming from the .env are not masked
  5. Then build this branch and run okteto deploy and okteto destroy and check the logs, make sure the logic is implemented as described

Note: multi-line vars are currently not masked

Signed-off-by: Andrea Falzetti <andrea@okteto.com>
Signed-off-by: Andrea Falzetti <andrea@okteto.com>
Copy link

codecov bot commented Apr 16, 2024

Codecov Report

Merging #4245 (152678a) into master (390ef76) will decrease coverage by 0.03%.
The diff coverage is 33.33%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4245      +/-   ##
==========================================
- Coverage   45.60%   45.58%   -0.03%     
==========================================
  Files         305      305              
  Lines       27600    27602       +2     
==========================================
- Hits        12588    12583       -5     
- Misses      13939    13944       +5     
- Partials     1073     1075       +2     

@andreafalzetti andreafalzetti changed the title Af/dev 290 obfuscate dotenv and vars longer than 5 chars mask .envvars + only mask vars longer than 5 chars Apr 16, 2024
@andreafalzetti andreafalzetti marked this pull request as ready for review April 16, 2024 19:33
@andreafalzetti andreafalzetti requested a review from a team as a code owner April 16, 2024 19:33
@andreafalzetti andreafalzetti merged commit 9b58193 into master Apr 17, 2024
15 of 17 checks passed
@andreafalzetti andreafalzetti deleted the af/dev-290-obfuscate-dotenv-and-vars-longer-than-5-chars branch April 17, 2024 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants