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

Output SonarQube reports #15

Open
cynthiabaran opened this issue Jun 25, 2020 · 5 comments
Open

Output SonarQube reports #15

cynthiabaran opened this issue Jun 25, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@cynthiabaran
Copy link

cynthiabaran commented Jun 25, 2020

Describe the solution you'd like
Insider could generate a SonarQube-compatible report, which should have this format. To achieve this, we will need to assign an unique ID for each rule.

Describe alternatives you've considered
Let every rule id have the prefix "insider", and the suffix composed of an abbreviation of the language and an integer, for example, INSIDER-JS1.

Additional context
Other SAST tools, such as GoSec, already have this feature. The id of GoSec rules follows the pattern G101

@cynthiabaran cynthiabaran added the enhancement New feature or request label Jun 25, 2020
@htrgouvea
Copy link
Contributor

Hi @cynthiabaran,

First of all, I would like to thank you for opening this issue!
This kind of functionality is very interesting, I believe that we can work on that...
But, if you find it interesting, feel free to open a PR with this implementation, it will be very welcome!

Thx!

@cynthiabaran
Copy link
Author

I actually did it 3 days ago, but one day later you guys released v2 😅
Sooo I'll have to rewrite some stuff, but probably I'll be able to contribute. This feature is important for us.

You okay with my suggestion for the naming convention of the rules' ids?

@danilodeveloper
Copy link
Contributor

Hey @cynthiabaran
I liked your naming convention sugestion.

What do you think guys @hermescanutodesouza @bieeldeveloper @GouveaHeitor

@cynthiabaran
Copy link
Author

Another issue worth discussing is the name of the SonarQube report.

I just noticed that in v2 you've added a timestamp to the name of the report file. That's kind of an issue when adding this tool to automatic CI pipelines, since it requires extra work for the pipeline script to figure out the name of the report to send to SonarQube.

Off the top of my head, I think we could output a fixed filename such as report-sonarqube.json, dropping the timestamp for the SonarQube report. That is easy to implement, and we don't really need an unique timestamp for SonarQube reports since it keeps track of all analysis for us.

Any thoughts?

@mattheusv
Copy link
Contributor

Hi @cynthiabaran , really sorry for delay. About the timestamps on report, the insider have a -force flag that generate reports without timestamp and will override existent report files.

About the sonarqube report, I think that we should create a new flag -format for example, and specify a type of output report, something like this:
$ insider -tech javascript -target <dir> -format sonarqube
This will generate a report in sonarqube format, if this flag is not informed, we generate the "default" report that we generate today. What do you think? And again, sorry for delay.

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

No branches or pull requests

6 participants