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

Some changes to improve quality #98

Merged
merged 5 commits into from
Mar 27, 2024
Merged

Some changes to improve quality #98

merged 5 commits into from
Mar 27, 2024

Conversation

IyanRobles
Copy link
Contributor

I have excluded some files that shouldn't count towards the coverage from the sonarcloud analysis, reviewed and fixed some security hotspots and implemented some more tests for the gateway. There is still a security hotspot with docker and the reliability rating still needs to be checked but I think with this we will already pass the coverage part.

@IyanRobles IyanRobles added the enhancement New feature or request label Mar 27, 2024
@IyanRobles IyanRobles self-assigned this Mar 27, 2024
Copy link

sonarqubecloud bot commented Mar 27, 2024

@didierrc
Copy link
Contributor

All these quality improvements seems good, I appreciate the exclusion coverage of our test.ts files since I believe they are not the aim of SonarCloud to look into it (although, we must write good tests!). About, CORS being more restrictive, could you please explain what are you doing there?

@didierrc didierrc self-requested a review March 27, 2024 10:10
@IyanRobles
Copy link
Contributor Author

All these quality improvements seems good, I appreciate the exclusion coverage of our test.ts files since I believe they are not the aim of SonarCloud to look into it (although, we must write good tests!). About, CORS being more restrictive, could you please explain what are you doing there?

Previously we were allowing resources from any origin and, according to sonarcloud, this can lead to different vulnerabilities such as CVE-2018-0269 and CVE-2017-14460.
What I did was adding a whitelist for trusted sites and include just our domains (both the webapp and the gateway), this way it shouldn't be a security concern since it is no longer possible from the client to access resources from external servers, they can just send requests to the webapp and gateway. If it's too restrictive we can still expand this list but I think it's working properly for the moment.
Also, for the whitelist I first check if there is any API_URI set and if it is then i use that instead of localhost so I think this should work fine when deploying.

Copy link
Contributor

@didierrc didierrc left a comment

Choose a reason for hiding this comment

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

Thank you for explaining that! Everything is OK

@didierrc didierrc merged commit 287441d into master Mar 27, 2024
2 checks passed
@didierrc didierrc deleted the quality branch March 27, 2024 15:02
@didierrc didierrc mentioned this pull request Apr 10, 2024
@IyanRobles IyanRobles mentioned this pull request Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants