Skip to main content

Crate oxideshield_guard

Crate oxideshield_guard 

Source
Expand description

OxideShield Guard Library

Runtime guards and security pipeline for protecting LLM applications.

§Guard Tiers

Guards are organized by license tier:

  • Community (Free): PatternGuard, LengthGuard, EncodingGuard, PerplexityGuard, PIIGuard, ToxicityGuard, StructuredOutputGuard
  • Professional: See oxide-guard-pro crate for SemanticSimilarityGuard, MLClassifierGuard
  • Enterprise: Custom guards, private models

§Research References

Re-exports§

pub use config::GlobalSettings;
pub use config::GuardConfig;
pub use config::GuardDefinition;
pub use config::GuardType;
pub use config::GuardTypeConfig;
pub use config::PatternConfig;
pub use config::PipelineConfig;
pub use guard::EncodingGuard;
pub use guard::Guard;
pub use guard::GuardAction;
pub use guard::GuardCheckResult;
pub use guard::GuardError;
pub use guard::GuardResult;
pub use guard::LengthGuard;
pub use guard::PatternGuard;
pub use guards::PIICategory;
pub use guards::PIIGuard;
pub use guards::PIIMatch;
pub use guards::PerplexityGuard;
pub use guards::RAGInjectionCategory;
pub use guards::RAGInjectionConfig;
pub use guards::RAGInjectionGuard;
pub use guards::RedactionStrategy;
pub use guards::StructuredOutputCategory;
pub use guards::StructuredOutputGuard;
pub use guards::ToxicityCategory;
pub use guards::ToxicityGuard;
pub use multilayer::AggregationStrategy;
pub use multilayer::LayerConfig;
pub use multilayer::LayerType;
pub use multilayer::MultiLayerDefense;
pub use multilayer::MultiLayerDefenseBuilder;
pub use multilayer::MultiLayerResult;
pub use pipeline::Pipeline;
pub use benchmark::competitor::all_competitor_references;
pub use benchmark::competitor::ComparisonSummary;
pub use benchmark::competitor::CompetitorComparison;
pub use benchmark::competitor::CompetitorResult;
pub use benchmark::competitor::LLMGuardReference;
pub use benchmark::competitor::LakeraGuardReference;
pub use benchmark::competitor::LlamaGuard3Reference;
pub use benchmark::competitor::NeMoGuardrailsReference;
pub use benchmark::datasets::combined_dataset;
pub use benchmark::datasets::BenchmarkDataset;
pub use benchmark::datasets::BenchmarkSample;
pub use benchmark::metrics::BenchmarkTargets;
pub use benchmark::metrics::CategoryMetrics;
pub use benchmark::metrics::ComparisonResult;
pub use benchmark::metrics::GuardMetrics;
pub use benchmark::report::BenchmarkReport;
pub use benchmark::report::QuickSummary;
pub use benchmark::report::ReportFormat;
pub use benchmark::runner::BenchmarkConfig;
pub use benchmark::runner::BenchmarkRunner;
pub use benchmark::runner::BenchmarkSuiteBuilder;
pub use benchmark::runner::BenchmarkSuiteResults;
pub use telemetry::global_metrics;
pub use telemetry::init_telemetry;
pub use telemetry::set_global_metrics;
pub use telemetry::shutdown_telemetry;
pub use telemetry::GuardMetricsCollector;
pub use telemetry::InstrumentGuard;
pub use telemetry::InstrumentedGuard;
pub use telemetry::MetricLabels;
pub use telemetry::MetricObservation;
pub use telemetry::MetricsDelta;
pub use telemetry::MetricsExport;
pub use telemetry::MetricsReporter;
pub use telemetry::MetricsSnapshot;
pub use telemetry::OtelGuardMetrics;
pub use telemetry::PerGuardMetrics;
pub use telemetry::TelemetryConfig;
pub use embeddings_bundle::BundleError;
pub use embeddings_bundle::BundleMetadata;
pub use embeddings_bundle::BundledEmbedding;
pub use embeddings_bundle::EmbeddingsBundle;
pub use licensed::guard_license_requirement;
pub use licensed::is_community_guard;
pub use licensed::DynGuardFactory;
pub use licensed::GuardFactory;
pub use licensed::GuardFactoryConfig;
pub use licensed::GuardInfo;
pub use licensed::GuardRegistry;
pub use licensed::LicenseCheckedGuard;
pub use licensed::LicensedGuard;
pub use licensed::LicensedGuardError;
pub use licensed::LicensedGuardResult;
pub use licensed::GUARD_LICENSE_REQUIREMENTS;
pub use compliance::available_controls;
pub use compliance::controls_by_component;
pub use compliance::ComplianceReport;
pub use compliance::ComplianceReportBuilder;
pub use compliance::ComplianceStatus;
pub use compliance::ControlMapping;
pub use compliance::EuAiActCategory;
pub use compliance::EuAiActMapping;
pub use compliance::EuAiActRequirement;
pub use compliance::Framework;
pub use compliance::NistAiRmfCategory;
pub use compliance::NistAiRmfMapping;
pub use compliance::NistAiRmfSubcategory;
pub use compliance::SecurityControl;

Modules§

benchmark
Benchmark Suite for OxideShield
compliance
Compliance Framework Mappings
config
Guard configuration from YAML files
embeddings_bundle
Pre-computed embeddings bundle for attack detection
guard
Guard trait and built-in guards for LLM security
guards
Extended guards for LLM security
licensed
Licensed guard infrastructure for OxideShield.
multilayer
Multi-Layer Defense Pipeline
pipeline
Guard pipeline for processing input and output
telemetry
OpenTelemetry Integration for OxideShield