SRL Finding Functions

All finding-output statements, with allowed parameters, audit side effects, and examples.

addPassFinding()

Definition and usage

Records a successful check for the current rule subject.

Syntax

addPassFinding()

Parameter values

ParameterAllowed typeRequiredDescription
This function accepts no parameters.

Return value

none — This is an SRL statement. It does not return a value to SRL and cannot be assigned to a variable or used in an expression.

Audit side effect

Creates one pass finding using the current rule, scope, and annotated configuration subject.

Example

if (this.status equals "enable") {
    addPassFinding();
}
Expected SRL return value: none

addFailFinding()

Definition and usage

Records a failed check with actionable evidence and remediation.

Syntax

addFailFinding(details, remediation, remediationMinutes = 30, title = omitted, scope = omitted, subjectPath = omitted)

Parameter values

ParameterAllowed typeRequiredDescription
detailsstringYesNon-empty description of the problem and relevant evidence.
remediationstringYesNon-empty corrective action.
remediationMinutesnumberNoEstimated remediation time. Blank, omitted, or null uses 30 minutes.
titlestringNoFinding title. The rule name is used when omitted.
scopestringNoExplicit VDOM or global scope label.
subjectPathstringNoExplicit configuration path when the current subject is not sufficient.

Return value

none — This is an SRL statement. It does not return a value to SRL and cannot be assigned to a variable or used in an expression.

Audit side effect

Creates one fail finding containing status, rule severity, title, details, remediation, remediation minutes, scope, and subject path.

Example

addFailFinding(
    "Administrator " + name(this) + " has no trusted hosts configured.",
    "Configure trusted hosts for this administrator.",
    15,
    "Unrestricted administrator source",
    appliance.current_vdom,
    path(this)
);
Expected SRL return value: none

addInfoFinding()

Definition and usage

Records an informational observation that may or may not require remediation.

Syntax

addInfoFinding(details, remediation = omitted, remediationMinutes = 0, title = omitted, scope = omitted, subjectPath = omitted)

Parameter values

ParameterAllowed typeRequiredDescription
detailsstringYesNon-empty observation and relevant evidence.
remediationstringNoRecommended action when one is appropriate.
remediationMinutesnumberNoEstimated remediation time; defaults to 0.
titlestringNoFinding title. The rule name is used when omitted.
scopestringNoExplicit VDOM or global scope label.
subjectPathstringNoExplicit configuration path when the current subject is not sufficient.

Return value

none — This is an SRL statement. It does not return a value to SRL and cannot be assigned to a variable or used in an expression.

Audit side effect

Creates one informational finding containing status, title, details, optional remediation, remediation minutes, scope, and subject path.

Example

addInfoFinding(
    "Address " + name(this) + " duplicates: " + $duplicateNames,
    "Consolidate duplicate objects if operationally safe."
);
Expected SRL return value: none

Validation and output behavior

  • Fail findings require non-empty details and remediation.
  • Info findings require non-empty details; remediation is optional.
  • Multiple calls produce multiple raw findings. Reports retain pass, fail, and info counts per rule.
  • Return without emitting a finding when configuration is not applicable or cannot be evaluated.
  • Use path(this) or an original annotated object so reports identify the exact subject.