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

Set code studio default env variable values to be masked #1586

Merged
merged 8 commits into from
Sep 21, 2023
Merged

Set code studio default env variable values to be masked #1586

merged 8 commits into from
Sep 21, 2023

Conversation

shubham-bansal96
Copy link
Contributor

@shubham-bansal96 shubham-bansal96 commented Sep 1, 2023

Motivation
Recently we found that code studio environment variables like TOKEN_KEY, TOKEN_SECRET are being logged in sumo logic in plain text format, which is a security concern.
Fixes GL-1377

Proposed changes
In order to avoid logging env variable values in clear text format, we will be masking code studio default env variable.
In this PR we will setting all default env variable values as masked.

Alternatives considered

Testing steps
You can replicate this issue by creating a new project for code studio and check the env variables values under CI/CD variable. You will see currently default env values is not masked except ACQUIA_GLAB_TOKEN_SECRET.

Once these changes are deployed then you can verify the changes by creating a new project for code studio and run a pipeline with printing the default variables inside it. Now verify the job logs, You should not see value of default env variables in job logs.

@shubham-bansal96 shubham-bansal96 changed the title Set code studio default env value to be masked Set code studio default env variable values to be masked Sep 1, 2023
@codecov
Copy link

codecov bot commented Sep 1, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (471793e) 91.76% compared to head (9372079) 91.76%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #1586   +/-   ##
=========================================
  Coverage     91.76%   91.76%           
  Complexity     1809     1809           
=========================================
  Files           124      124           
  Lines          6471     6471           
=========================================
  Hits           5938     5938           
  Misses          533      533           
Files Changed Coverage Δ
src/Command/CodeStudio/CodeStudioCiCdVariables.php 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@anavarre
Copy link
Contributor

anavarre commented Sep 1, 2023

@shubham-bansal96 this is a public repo. Requesting that we do not share sensitive information publicly. I have redacted the backlog URL.

@shubham-bansal96
Copy link
Contributor Author

@shubham-bansal96 this is a public repo. Requesting that we do not share sensitive information publicly. I have redacted the backlog URL.

Thanks @anavarre for letting me know. Next time i will keep in my mind while raising a PR.

@shriacquia shriacquia added the bug Something isn't working label Sep 4, 2023
@shriacquia
Copy link
Contributor

@shubham-bansal96 - Could you resolve the mutants reported? Here is the link for guidance.

@shriacquia shriacquia changed the title Set code studio default env variable values to be masked GL-1377: Set code studio default env variable values to be masked Sep 11, 2023
@shriacquia shriacquia changed the title GL-1377: Set code studio default env variable values to be masked Set code studio default env variable values to be masked Sep 11, 2023
@anavarre
Copy link
Contributor

Thanks for your contribution. Dane returns in mid-October. We'll look into finalizing and merging this then

@balsama balsama merged commit e317dab into acquia:main Sep 21, 2023
12 checks passed
@danepowell
Copy link
Contributor

Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants