-->

How to exclude target folder from Fortify scans

2019-07-14 05:32发布

问题:

I want to exclude all files that are underneath a target folder from translations and scans. I have tried to use the -exclude parameter but it doesn't seem to work.

[warning]: No files were excluded as the file patterns: [**/target/**/*] specified for -exclude option did not match any files.
HP Fortify Static Code Analyzer 6.42.0006 (using JVM 1.8.0_45)
Processing C:/path/ProjectName/target/test/test_fortify_exclusion2.jsp
Processing C:/path/ProjectName/target/test_fortify_exclusion.jsp

I have also tried **target** and **/target/**.

回答1:

Turned out I needed to specify the root path, preferably the path to the project. So in this example, it would have been: -exclude "C:/path/ProjectName/**/target/**/*"



标签: fortify