CDCgov / prime-devops

Apache License 2.0
4 stars 2 forks source link

SonarCloud doesn't respect file exclusions (specifically frontend-react test files) #83

Open stephenkao opened 1 year ago

stephenkao commented 1 year ago

Describe the bug SonarCloud should be excluding frontend-react test files in its analysis, but it appears to still be checking them. A recent example of this is checking against an http:// link here -- the unsafe protocol is intention as part of the test.

See this Slack conversation for more context.

Impact This is a low-priority item because SonarCloud checks are not a hard blocker to merging. It's just something we'd like to resolve so we don't have to deal with erroneous complaints from SonarCloud.

To Reproduce Steps to reproduce the behavior: There are other examples of this, but the most reliably reproducible one is checking for unsafe protocols.

  1. Update a test file in frontend-react to include an http:// link
  2. Open a pull request
  3. See SonarCloud raise a Security Hotspot warning

Expected behavior SonarCloud should not be raising a warning in test files.