CSV Output Schema Reference

This example shows how to create a comma-separated values (CSV) formatted output file when using the --output-file flag of the code-analyzer run command.

This sample output shows 3 violations with different severities from different engines.

All property values are wrapped in double quotes which allows for comma-separated properties, such as the list of tags associated with the violation.

CSV output includes only the primary location of a violation. If a violation has multiple locations, you must rerun the scan and specify any other output format, such as SARIF or JSON, to see all the locations.

PropertyData TypeDescription
rulestringThe name of the rule that's associated with the violation.
enginestringThe engine that's associated with the violation.
severitynumberThe severity level of the violation: 1 (Critical), 2 (High), 3 (Moderate), 4 (Low), 5 (Info)
tagsstring[]The tags that are associated with the rule that's associated with the violation. Multiple tags are separated by commas.
filestringThe pathname of the file in which the violation occurred, relative to the runDir directory.
startLinenumberThe line where the violating code starts.
startColumnnumberThe column in the startLine where the violating code starts.
endLinenumberThe line where the violating code ends.
endColumnnumberThe column in the endLine where the violating code ends.
messagestringThe violation message.
resourcesstring[]The URLs for additional resources and information about the violation. Multiple resources are separated by commas.