Class ContextRule

java.lang.Object
ai.nightfall.scan.model.ContextRule

public class ContextRule extends Object
An object that describes how a regular expression may be used to adjust the confidence of a candidate finding. This context rule will be applied within the provided byte proximity, and if the regular expression matches, then the confidence associated with the finding will be adjusted to the value prescribed.
  • Constructor Details

    • ContextRule

      public ContextRule(Regex regex, Proximity proximity, ConfidenceAdjustment confidenceAdjustment)
      Create a new Context Rule.
      Parameters:
      regex - the regular expression configuration
      proximity - the proximity in which to evaluate the regular expression
      confidenceAdjustment - describes how to adjust the confidence of a finding if the regular expression matches
  • Method Details

    • getRegex

      public Regex getRegex()
      Return the regular expression.
      Returns:
      the regular expression
    • getProximity

      public Proximity getProximity()
      Return the proximity.
      Returns:
      the proximity
    • getConfidenceAdjustment

      public ConfidenceAdjustment getConfidenceAdjustment()
      Return the confidence adjustment.
      Returns:
      the confidence adjustment