Class ConfigState

java.lang.Object
ai.attackframework.tools.burp.utils.config.ConfigState

public final class ConfigState extends Object
Typed configuration model for import/export and UI binding. Immutable records with defensive copying where lists are provided.
  • Field Details

    • DEFAULT_SETTINGS_SUB

      public static final List<String> DEFAULT_SETTINGS_SUB
      Default settings sub-options (project, user).
    • DEFAULT_TRAFFIC_TOOL_TYPES

      public static final List<String> DEFAULT_TRAFFIC_TOOL_TYPES
      Default traffic tool types: empty (no traffic exported by default).
    • DEFAULT_FINDINGS_SEVERITIES

      public static final List<String> DEFAULT_FINDINGS_SEVERITIES
      Default findings severities: all five.
    • DEFAULT_FILE_TOTAL_CAP_GB

      public static final double DEFAULT_FILE_TOTAL_CAP_GB
      Default total cap across exporter files under the selected root, stored as human-friendly GB.
      See Also:
    • DEFAULT_FILE_MAX_DISK_USED_PERCENT

      public static final int DEFAULT_FILE_MAX_DISK_USED_PERCENT
      Default advanced disk-used threshold for file export.
      See Also:
    • DEFAULT_STATS_CHART_STYLE

      public static final int DEFAULT_STATS_CHART_STYLE
      Default Stats panel chart style (1 = Smooth).
      See Also:
    • DEFAULT_LOG_MIN_LEVEL

      public static final String DEFAULT_LOG_MIN_LEVEL
      Default minimum visible level in LogPanel.
      See Also:
    • OPEN_SEARCH_TLS_VERIFY

      public static final String OPEN_SEARCH_TLS_VERIFY
      Verify OpenSearch TLS certificates against the system trust store.
      See Also:
    • OPEN_SEARCH_TLS_PINNED

      public static final String OPEN_SEARCH_TLS_PINNED
      Trust only the session-imported pinned OpenSearch certificate.
      See Also:
    • OPEN_SEARCH_TLS_INSECURE

      public static final String OPEN_SEARCH_TLS_INSECURE
      Trust all OpenSearch TLS certificates without verification.
      See Also:
  • Method Details

    • defaultLogPanelPreferences

      public static ConfigState.LogPanelPreferences defaultLogPanelPreferences()
      Default persisted LogPanel preferences.
    • defaultUiPreferences

      public static ConfigState.UiPreferences defaultUiPreferences()
      Default persisted UI preferences.
    • gbToBytes

      public static long gbToBytes(double gb)
      Converts a human-friendly GB value to runtime bytes using half-up rounding.
    • bytesToGb

      public static double bytesToGb(long bytes)
      Converts runtime bytes to the human-friendly GB value used in config state/export.
    • normalizeOpenSearchTlsMode

      public static String normalizeOpenSearchTlsMode(String mode)
      Returns a normalized persisted OpenSearch TLS mode, defaulting to OPEN_SEARCH_TLS_VERIFY.
    • normalizeLogMinLevel

      public static String normalizeLogMinLevel(String raw)
      Returns one of trace/debug/info/warn/error, defaulting to trace.
    • normalizeFileTotalCapGb

      public static double normalizeFileTotalCapGb(double raw)
      Normalizes stored file-cap GB values and falls back to the default when unset or invalid.
    • normalizeDataSources

      public static List<String> normalizeDataSources(List<String> values)
      Normalizes config data-source ids to lowercase.
    • normalizeSettingsSub

      public static List<String> normalizeSettingsSub(List<String> values)
      Normalizes settings sub-option ids to lowercase.
    • normalizeTrafficToolTypes

      public static List<String> normalizeTrafficToolTypes(List<String> values)
      Normalizes traffic tool ids to lowercase.
    • normalizeFindingsSeverities

      public static List<String> normalizeFindingsSeverities(List<String> values)
      Normalizes finding severity ids to lowercase.
    • normalizeScopeType

      public static String normalizeScopeType(String raw)
      Normalizes persisted scope type values to lowercase supported ids.