Package ai.nightfall.scan.model
Class ScanPolicy
java.lang.Object
ai.nightfall.scan.model.ScanPolicy
An object containing configuration that describes how to scan a file. Since the file is scanned asynchronously,
the results from the scan are delivered to the provided webhook URL. The scan configuration may contain both
inline detection rule definitions and UUID's referring to existing detection rules (up to 10 of each).
-
Constructor Summary
ConstructorsConstructorDescriptionScanPolicy(String webhookURL, List<DetectionRule> detectionRules, List<UUID> detectionRuleUUIDs) Create a scan policy with the provided detection rules and detection rule UUIDs. -
Method Summary
Modifier and TypeMethodDescriptionstatic ScanPolicyfromDetectionRules(List<DetectionRule> detectionRules, String webhookURL) Create a scan policy with the provided detection rules.static ScanPolicyfromDetectionRuleUUIDs(List<UUID> detectionRuleUUIDs, String webhookURL) Create a scan policy with the provided detection rules.Get the list of detection rules.Get the detection rule UUIDs.Get the webhook URL.voidsetDetectionRules(List<DetectionRule> detectionRules) Set the detection rules.voidsetDetectionRuleUUIDs(List<UUID> detectionRuleUUIDs) Set the detection rule UUIDs.voidsetWebhookURL(String webhookURL) Set the webhook URL.
-
Constructor Details
-
ScanPolicy
public ScanPolicy(String webhookURL, List<DetectionRule> detectionRules, List<UUID> detectionRuleUUIDs) Create a scan policy with the provided detection rules and detection rule UUIDs.- Parameters:
webhookURL- the URL that Nightfall will use to deliver a webhook containing scan resultsdetectionRules- a list of detection rules to use to scan content. maximum length 10.detectionRuleUUIDs- a list of detection rule UUIDs to use to scan content. maximum length 10.
-
-
Method Details
-
fromDetectionRules
Create a scan policy with the provided detection rules.- Parameters:
detectionRules- a list of detection rules to use to scan content. maximum length 10.webhookURL- the URL that Nightfall will use to deliver a webhook containing scan results- Returns:
- the scan policy
-
fromDetectionRuleUUIDs
Create a scan policy with the provided detection rules.- Parameters:
detectionRuleUUIDs- a list of detection rule UUIDs to use to scan content. maximum length 10.webhookURL- the URL that Nightfall will use to deliver a webhook containing scan results- Returns:
- the scan policy
-
getWebhookURL
Get the webhook URL.- Returns:
- the webhook URL that Nightfall should deliver results to
-
setWebhookURL
Set the webhook URL.- Parameters:
webhookURL- the webhook URL that Nightfall should deliver results to
-
getDetectionRules
Get the list of detection rules.- Returns:
- the list of detection rules to use to scan the files
-
setDetectionRules
Set the detection rules.- Parameters:
detectionRules- a list of detection rules to scan against
-
getDetectionRuleUUIDs
Get the detection rule UUIDs.- Returns:
- the list of detection rule UUIDs to scan against
-
setDetectionRuleUUIDs
Set the detection rule UUIDs.- Parameters:
detectionRuleUUIDs- the list of detection rule UUIDs to scan against
-