Sends metadata and, only when include_text = TRUE, text to an OPA Data API
decision endpoint. A false decision creates a blocking tool/guardrail finding.
Usage
opa_provider(
endpoint,
input_builder = NULL,
include_text = FALSE,
on_error = c("block", "skip"),
timeout_seconds = 10,
show_stats = FALSE
)Arguments
- endpoint
Scalar URL for an OPA Data API decision endpoint.
- input_builder
Optional function receiving
(text, stage, metadata)and returning the value to send asinput.- include_text
Whether raw text is included in the default OPA input.
- on_error
Whether adapter failures create a blocking finding or warn and skip the adapter.
- timeout_seconds
Positive request timeout in seconds.
- show_stats
Show construction time and available usage metrics.
Value
A shieldr_provider for scanner_options().
