OWASP Top 10 and CWE for NewAdHocRule

It should be possible to add OWSP Top 10 and CWE for NewAdhocRule (similar to new Rule).

Hi,

Could you add some detail here if exactly what you’re hoping for?

 
Ann

I want to import issues from a systems where some issues provide a CWE id. Currently I cannot add the CWE id because org.sonar.api.batch.sensor.rule.NewAdHocRule has no method addCWE as org.sonar.api.server.rule.Rule has.

Hi,

If you’re writing a plugin, then why not just use real rules?

 
Ann

Well I don’t really know what rules exists in the system I am trying to import, so I thought it is better to create adhoc rules and external issues.

I was afraid of that. :smiley:

And to be clear, you want to add a CWE to participate in the Security Category facet on the Issues page? Because I believe you already have the ability to add tags…

 
Ann

Yes

As far as I know there is no addTags on NewAdhocRule or NewExternalIssue

Okay. I’ve put created a Feature Request in Jira: https://jira.sonarsource.com/browse/FR-29

 
Ann

Thank You!