Rules are made up by a name and a configuration array. The configuration array contains:
- active
[0,1]:0disables the rule;1enables the rule. By default it is enabled. - type
[0,1]:0reports an warning;1reports an error. - value: value to use for the rule.
Some of the value fields are extracted by the named entity recognition (NER) engine. Those values are called entities and can have different types. In addition, the tool considers a message is divided into five main sections: header, body, metadata,
contact and bug-tracker references.
- condition:
headerhasvalueor less characters - type: 0 (warning)
- value: 50
- condition:
headerhas more than 0 characters - type: 1 (error)
- value: 0
- condition:
headerstarts with<type> - type: 1 (error)
- value:
vuln-fix
- condition:
headerends with<vuln-id> - type: 0 (warning)
- value:
VULNID
- condition:
bodyhas more than 0 characters - type: 1 (error)
- value: 0
- condition:
bodyhasvalueor less characters - type: 0 (warning)
- value: 75
- condition:
sectionhas more than 0 characters - type: 1 (error)
- value: 25
- condition:
bodyhas three paragraphs - type: 1 (error)
- condition:
metadatahas tagweakness:followed byCWEID - type: 1 (error)
- condition:
metadatahas tagseverity:followed bySEVERITY - type: 1 (error)
- condition:
metadatahas tagdetection:followed byDETECTION - type: 0 (warning)
- condition:
metadatahas tagreport:followed byURL - type: 0 (warning)
- condition:
metadatahas tagcvss: - type: 0 (warning)
- condition:
metadatahas tagintroduced in:followed bySHA - type: 0 (warning)
- condition:
contacthas tagreported-by:ANDEMAIL - type: 0 (warning)
- condition:
contacthas tagsigned-off-by:ANDEMAIL - type: 0 (warning)
- condition:
contacthas tagco-authored-by:ANDEMAIL - type: 0 (warning)
- condition:
bugtrackerhas (tagbug-tracker:ANDURL) OR (tagresolves: .. see also:ANDISSUE) - type: 0 (warning)