Passive scan unit tests

已查看 31 次
跳至第一个未读帖子

psiinon

未读,
2016年7月27日 08:00:172016/7/27
收件人 OWASP ZAP Developer Group
I've just submitted PR #471 which adds a rule for testing for SameSite cookies.
As part of that I've implemented some unit tests for that class: https://github.com/psiinon/zap-extensions/blob/edf5af2df7bfbb8affd0eef1146e78068407c76e/test/org/zaproxy/zap/extension/pscanrulesAlpha/CookieSameSiteScannerUnitTest.java
These are the first unit tests we have for passive scan rules, and as I'd like this to become standard practice I'd like feedback on them.
Are they easy enough to understand?
Could the implementation be improved in any way?
Any other comments or suggestions?

Volunteers to write similar tests for our existing passive scan rules also much appreciated ;)

Cheers,

Simon

psiinon

未读,
2016年7月27日 11:12:082016/7/27
收件人 OWASP ZAP Developer Group
I've updated the PR and now the direct link to the unit test file has changed :(
Best just find the file in the PR: https://github.com/zaproxy/zap-extensions/pull/471 :)

psiinon

未读,
2016年8月2日 06:44:362016/8/2
收件人 OWASP ZAP Developer Group
One of the comments on https://github.com/zaproxy/zap-extensions/pull/473 (now outdated, so I dont think I can link to it directly) was a suggestion to introduce a helper method for setting the response headers rather than repeating the same info each time.
I must admit I kind of like seeing the full headers as plain text, but maybe thats because I'm used to looking at them in ZAP ;)
Any preferences for or against using such helper methods?
I'm happy to go with the flow...

psiinon

未读,
2016年8月4日 10:38:402016/8/4
收件人 OWASP ZAP Developer Group
I've updated https://github.com/zaproxy/zap-extensions/pull/473 based on more comments received, and also updated the X-Frame-Options rule to only report issues at LOW threshold if the CSP 'frame-ancestors' element is present.
回复全部
回复作者
转发
0 个新帖子