Skip to content

Sonarqube fixes #6952

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

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Sonarqube fixes #6952

wants to merge 15 commits into from

Conversation

Amndeep7
Copy link
Contributor

@Amndeep7 Amndeep7 commented Jun 3, 2025

Change list

  • added auth via bearer token
  • swapped out the code snippet api endpoint used
  • baseconverter needed to be tweaked so that it would apply a transformer in an array context
  • separated out types for the different releases and modified the mapping accordingly, so I believe Sonarqube (sonarqube2hdf ) converter null reference on missing summary saf#3248 should be resolved now
  • fixed some bugs
    • results were not being consolidated per rule type
    • cweid tag wasn't able to handle arrays in the frontend
    • buggy xccdf mapper's ref section revealed a problem in the baseconverter's handling of undefineds - addressed both

Todo

  • get answers for questions
  • convert console.logs into logging
  • continue to flesh out mapping and add withraw functionality
  • update tests (live instance instead of or in addition to the mock api?)
  • frontend integration
  • merge some minor changes in the saf cli
  • linting and sonarqube (haha) findings

Amndeep7 added 15 commits May 20, 2025 20:40
…eve is a change in authentication mechanisms that got introduced in 10.x and forcibly required in 2025.x

Signed-off-by: Amndeep Singh Mann <[email protected]>
…ter extent all of sonarqube 8, 9, 10, and 25

Signed-off-by: Amndeep Singh Mann <[email protected]>
… answers to questions, added some actual comments; put a value in for the start time; description sections show up in v8 or at least in sonarcloud which claims to be v8 so change types around accordingly; reciprocating fix for cwe tag to match the fix in the frontend; removed owasp nist mapping since it was no longer always correct and correcting it appropriately was too large for the scope of this work; have the owasp hdf tag get all the owasp information from both the sonarqube systags as well as their context blocks

Signed-off-by: Amndeep Singh Mann <[email protected]>
…through farther than they ought to have been. Also fixed the xccdf mapper so that the transformer in refs was actually doing its thing properly at all times, which resulted in an improvement to the output from the complianceascode sample

Signed-off-by: Amndeep Singh Mann <[email protected]>
…nPrinciples' so i'm making it optional

Signed-off-by: Amndeep Singh Mann <[email protected]>
…t unescape function is deprecated

Signed-off-by: Amndeep Singh Mann <[email protected]>
…making corrections in its raw string representation to match what we actually get from sonarqube (i.e. escaped newline characters when they are not actually for real newlines)

Signed-off-by: Amndeep Singh Mann <[email protected]>
…anches and pullrequests; improved it so that we still have the line numbers and now also support getting multiple snippets from the flow area if that is provided. also linting fixes include using the isversion25 function

Signed-off-by: Amndeep Singh Mann <[email protected]>
…o handle both strings and string arrays

Signed-off-by: Amndeep Singh Mann <[email protected]>
… contains a timestamp which changes on each run, also regenerated the sample files

Signed-off-by: Amndeep Singh Mann <[email protected]>
…st mapping data file

Signed-off-by: Amndeep Singh Mann <[email protected]>
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
19 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

1 participant