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

Alert.xml missing code 30002 #2995

Closed
jukkaharkki opened this issue Nov 10, 2016 · 12 comments
Closed

Alert.xml missing code 30002 #2995

jukkaharkki opened this issue Nov 10, 2016 · 12 comments

Comments

@jukkaharkki
Copy link

When running Sonar after ZAProxy run there is a warning:
WARNING] The rule ZAProxy:30002 doesn't exist.

There is discussion over this alert in another issue #1558 but probably maintaining alerts has been forgotten since the last alert currently is 30001.

@psiinon
Copy link
Member

psiinon commented Nov 10, 2016

Thats not an error reported by ZAP, so it could be a Sonar issue.
The latest ZAP alerts file is here https://github.com/zaproxy/zaproxy/blob/develop/src/doc/alerts.xml#L138
That does include 30002
Having said that I couldnt find that number when grepping the ZAP extensions source code.

@thc202
Copy link
Member

thc202 commented Nov 10, 2016

It's being used by scanner Format String Error.

@jukkaharkki
Copy link
Author

Hmm, looking at the alert.xml it definitely is in the header comment but this is the last one as xml definition:
<alertitem> <id>30001</id> <alert>Format string buffer overflow</alert> <desc>By sending a long (over 8192) random string the server appeared to close the connection and causes a 500 error. Manual check this again.</desc> <solution>Check if format string was correctly handled. Restrict maximum field length.</solution> </alertitem>

@psiinon
Copy link
Member

psiinon commented Nov 10, 2016

Ok, so I failed a grepping :P
I'll be honest - we dont tend to update the XML in that file because we dont use it. And I wasnt aware that anyone else did either!
I expect that there are lots of other alerts that are not in there either.
We should decide whether we want/need to maintain this file and if so how....

@jukkaharkki
Copy link
Author

To be honest I'm not too familiar with zaproxy and zaproxy-sonar co-operation to say if that description is essential. Just figured out 1+1 when the warning was there and that description was missing. I assumed that Sonar is getting description of the issue from there.

@psiinon
Copy link
Member

psiinon commented Nov 10, 2016

It could well be :)
I'll get in touch with Sonar.
Thanks for reporting this.

@psiinon
Copy link
Member

psiinon commented Nov 10, 2016

Oh, quick question - how are you integrating ZAP in Sonar?
Is it via either of these tools:

or ??

@jukkaharkki
Copy link
Author

Jenkins is running the analyze and storing results to a file using plugin https://wiki.jenkins-ci.org/display/JENKINS/ZAProxy+Plugin. Sonar picks up the file using plugin https://github.com/stevespringett/zap-sonar-plugin

@thc202
Copy link
Member

thc202 commented Nov 10, 2016

@jukkaharkki
Copy link
Author

Thank you for your support! I modifed rules.xml in sonar-zap-plugin adding description for 30002, compiled and installed it. Now the warning is gone. I'll let sonar-zap-plugin project to know this issue

@thc202
Copy link
Member

thc202 commented Nov 11, 2016

Great! Thanks for letting us know.

@lock
Copy link

lock bot commented Feb 2, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Feb 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

4 participants