Class BurpRuntimeMetadata
java.lang.Object
ai.attackframework.tools.burp.utils.BurpRuntimeMetadata
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringStable fallback project identifier used when Burp does not expose a project id. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturns the cached Burp version, resolving it lazily when needed.static voidclear()Clears all cached metadata.static voidprime(burp.api.montoya.MontoyaApi api) Primes cached metadata from the provided API when values are not already known.static StringReturns the cached Burp project id, resolving it lazily when needed.static StringReturns the cached project id, or a stable fallback label when unavailable.
-
Field Details
-
UNKNOWN_PROJECT_ID
Stable fallback project identifier used when Burp does not expose a project id.- See Also:
-
-
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 whennull
-
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
nullwhen unavailable
-
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
nullwhen unavailable
-
projectIdOrUnknown
Returns the cached project id, or a stable fallback label when unavailable. -
clear
public static void clear()Clears all cached metadata.
-