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

chore: replace secrets in test cases with constants #4133

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

vinayteki95
Copy link
Contributor

What are the changes introduced in this PR?

  • Added a script in /test/scripts to scan through destination tests and replace with constants while placing the secrets in seperate maskedSecrets.ts files.
  • Upon running the above script, a lot of destination test cases are updated with this variables replacing hard coded secrets.

What is the related Linear task?

Resolves INT-3330

Please explain the objectives of your changes below

SonarCloud raises 5000+ security issues in transformer repo. One of the reasons for this issue is hardcoded (albeit dummy) secrets in test cases.
Although this is not a severe security concern, it gets difficult to wade all the noise and find P0 security issues which might've been raised by sonarcloud.

Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?

No

Any new dependencies introduced with this change?

No

Any new generic utility introduced or modified. Please explain the changes.

Script to replace secrets in test files.

Any technical or performance related pointers to consider with the change?

No

@coderabbitai review


Developer checklist

  • My code follows the style guidelines of this project

  • No breaking changes are being introduced.

  • All related docs linked with the PR?

  • All changes manually tested?

  • Any documentation changes needed with this change?

  • Is the PR limited to 10 file changes?

  • Is the PR limited to one linear task?

  • Are relevant unit and component test-cases added in new readability format?

Reviewer checklist

  • Is the type of change in the PR title appropriate as per the changes?

  • Verified that there are no credentials or confidential data exposed with the changes.

@vinayteki95 vinayteki95 requested review from sivashanmukh and a team as code owners March 3, 2025 14:19
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.21%. Comparing base (e36db15) to head (cd28dc9).
Report is 22 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4133   +/-   ##
========================================
  Coverage    91.21%   91.21%           
========================================
  Files          631      631           
  Lines        33076    33084    +8     
  Branches      7827     7831    +4     
========================================
+ Hits         30170    30178    +8     
- Misses        2658     2690   +32     
+ Partials       248      216   -32     

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

@devops-github-rudderstack
Copy link
Contributor

Allure Test reports for this run are available at:

@vinayteki95 vinayteki95 force-pushed the chore.mask-secrets-in-headers branch from f30c79e to de8d65f Compare March 3, 2025 14:40
@devops-github-rudderstack
Copy link
Contributor

Allure Test reports for this run are available at:

Copy link

sonarqubecloud bot commented Mar 3, 2025

@devops-github-rudderstack
Copy link
Contributor

Allure Test reports for this run are available at:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants