Class BurpRuntimeMetadata

java.lang.Object
ai.attackframework.tools.burp.utils.BurpRuntimeMetadata

public final class BurpRuntimeMetadata extends Object
Caches stable Burp metadata used by async exporters.

Background reporters should prefer this helper over probing Burp sub-APIs on every export cycle. That avoids repeated lifecycle-sensitive calls during extension startup, shutdown, or project transitions, while still allowing the cache to be primed from a known good MontoyaApi instance.

  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    Returns the cached Burp version, resolving it lazily when needed.
    static void
    Clears all cached metadata.
    static void
    prime(burp.api.montoya.MontoyaApi api)
    Primes cached metadata from the provided API when values are not already known.
    static String
    Returns the cached Burp project id, resolving it lazily when needed.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • prime

      public static void prime(burp.api.montoya.MontoyaApi api)
      Primes cached metadata from the provided API when values are not already known.

      Safe to call multiple times. Failures are swallowed because callers use this helper to avoid turning lifecycle races into user-visible errors.

      Parameters:
      api - current Montoya API handle; ignored when null
    • burpVersion

      public static String burpVersion()
      Returns the cached Burp version, resolving it lazily when needed.

      When the value cannot be resolved safely, returns null.

      Returns:
      Burp version string, or null when unavailable
    • projectId

      public static String projectId()
      Returns the cached Burp project id, resolving it lazily when needed.

      When the value cannot be resolved safely, returns null.

      Returns:
      Burp project id, or null when unavailable
    • clear

      public static void clear()
      Clears all cached metadata.