The following methods call Veracode REST APIs and return JSON.
Note: You can also access these methods from the Policies
class.
Policies().get_all()
: Get a list of available policies.Policies().get(guid)
: get information for the policy corresponding toguid
.Policies().create(name,description,vendor_policy(opt),finding_rules(opt),scan_frequency_rules(opt),grace_period_rules(opt))
: create a policyPolicies().update(guid,name,description,vendor_policy(opt),finding_rules(opt),scan_frequency_rules(opt),grace_period_rules(opt))
: edit a policyPolicies().delete(guid)
: delete a policyPolicies().format_finding_rule(rule_type,scan_types=[],rule_value='')
: formatting utility to create a valid finding rule based on the input. For more information about finding rules, see the finding rules documentation:rule_type
: one ofFAIL_ALL
,CWE
,CATEGORY
,MAX_SEVERITY
,CVSS
,CVE
,BLACKLIST
,MIN_SCORE
,SECURITY_STANDARD
,LICENSE_RISK
scan_types
: an array of scan types to which the rule applies. Valid values areSTATIC
,DYNAMIC
,MANUAL
,SCA
rule_value
: a string representing the value for the rule
Policies().format_scan_frequency_rule(scan_type,frequency)
: formatting utility to create a valid scan frequency rule based on the input:scan_type
: valid values areSTATIC
,DYNAMIC
,MANUAL
,SCA
frequency
: valid values areNOT_REQUIRED
,ONCE
,WEEKLY
,MONTHLY
,QUARTERLY
,SEMI_ANNUALLY
,ANNUALLY
,EVERY_18_MONTHS
,EVERY_2_YEARS
,EVERY_3_YEARS
Policies().format_grace_periods(sev5: int, sev4: int, sev3: int, sev2: int, sev1: int, sev0: int, score: int, sca_blocklist: int)
: formatting utility to create a valid grace period rule. Each argument represents a number of days in the grace period for the findings of the given severity or for the Veracode score (see grace period documentation for more info).