Fortify SCA exclude test folder\files

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-13 19:05:56

问题


How can I exclude test directories in a Java Project from being scanned by Fortify sca. The directories are structured in the following way -

/src/main/xyz/pqr
/src/main/xyz/test/abc
/src/test/xyz

I want to exclude any files under folders named test from being scanned. I am not sure how to use the -exclude command line parameter to achieve this.


回答1:


Use the following:

-exclude "**/test/*"



回答2:


use -exclude /src/main/xyz/test/** if you are using command prompt to run then backslash




回答3:


As pointed out by https://stackoverflow.com/a/36754012/6641032, the exclusion pattern expects the path starting from drive letter. The wildcard ** notation can match as many folder levels as there is, but the path has to start from drive root, so can't be **/folder/**. I'm on Source Analyser 16.10 and it worked for me.



来源:https://stackoverflow.com/questions/24181736/fortify-sca-exclude-test-folder-files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!