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

Severity defined in Sonar is ignored #50

Open
matiouz opened this issue Apr 16, 2020 · 0 comments
Open

Severity defined in Sonar is ignored #50

matiouz opened this issue Apr 16, 2020 · 0 comments

Comments

@matiouz
Copy link

matiouz commented Apr 16, 2020

It seems that when creating an issue in sonar, the zap-sonar-plugin simply overrides the severity defined in the sonar rule with the one defined by zap.
This is what I gather from the code in ZapSensor.addIssue():

    context.newIssue()
        .forRule(RuleKey.of(ZapPlugin.REPOSITORY_KEY, String.valueOf(alert.getPluginid())))
        .at(new DefaultIssueLocation().on(context.module()).message(formatDescription(alert)))
        .overrideSeverity(severity)
        .save();

That's also the behaviour that I have observed.

However, it seems more convenient to allow the user to change the severity in sonar.
For example, different sonar projects could require different security levels.

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

No branches or pull requests

1 participant