CSV Rules 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 rules command.

1sf code-analyzer rules --rule-selector flow --output-file rules-results.csv

Sample CSV Rules Output 

This sample output shows the two rules associated with the flow engine.

1"name","severity","engine","tags","resources","description"
2"PreventPassingUserDataIntoElementWithoutSharing",2,"flow","Recommended,Security,XML",,"Avoid passing user data into Flow Scanner elements in run mode: Without Sharing"
3"PreventPassingUserDataIntoElementWithSharing",4,"flow","Recommended,Security,XML",,"Avoid passing user data into Flow Scanner elements in run mode: With Sharing"

Properties of the CSV Rules Output File 

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

Property NameData TypeDescription
namestringThe name of the rule.
severitynumberThe default severity level of the rule: 1 (Critical), 2 (High), 3 (Moderate), 4 (Low), 5 (Info)
enginestringThe engine that’s associated with the rule.
tagsstringThe tags that are associated with the rule, such as Recommended, Security, or BestPractices. Multiple tags are separated by commas.
resourcesstringThe URLs for additional resources and information about the rule. Multiple resources are separated by commas.
descriptionstringThe description of the rule.