Other annotations

Check return value annotation

Use the FortifyCheckReturnValue annotation to add a target method to the list of functions that require a check of the return values.


@FortifyCheckReturnValue
int openFile(String filename) {
 ...
}

Dangerous annotations

With the FortifyDangerous annotation, any use of the target function, field, variable, or class is reported. Acceptable values for the annotation parameter are CRITICAL, HIGH, MEDIUM, or LOW. These values indicat how to categorize the issue based on the Fortify Priority Order values).


@FortifyDangerous{"CRITICAL"}
public class DangerousClass {
 @FortifyDangerous{"HIGH"}
 String dangerousField;
 @FortifyDangerous{"LOW"}
 int dangerousMethod() {
 ...
 }
}