raxe 0.4.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- raxe/__init__.py +101 -0
- raxe/application/__init__.py +48 -0
- raxe/application/ab_testing.py +170 -0
- raxe/application/analytics/__init__.py +30 -0
- raxe/application/analytics/achievement_service.py +444 -0
- raxe/application/analytics/repositories.py +172 -0
- raxe/application/analytics/retention_service.py +267 -0
- raxe/application/analytics/statistics_service.py +419 -0
- raxe/application/analytics/streak_service.py +283 -0
- raxe/application/apply_policy.py +291 -0
- raxe/application/eager_l2.py +503 -0
- raxe/application/preloader.py +353 -0
- raxe/application/scan_merger.py +321 -0
- raxe/application/scan_pipeline.py +1059 -0
- raxe/application/scan_pipeline_async.py +403 -0
- raxe/application/session_tracker.py +458 -0
- raxe/application/telemetry_manager.py +357 -0
- raxe/application/telemetry_orchestrator.py +1210 -0
- raxe/async_sdk/__init__.py +34 -0
- raxe/async_sdk/cache.py +286 -0
- raxe/async_sdk/client.py +556 -0
- raxe/async_sdk/wrappers/__init__.py +23 -0
- raxe/async_sdk/wrappers/openai.py +238 -0
- raxe/cli/__init__.py +21 -0
- raxe/cli/auth.py +1047 -0
- raxe/cli/branding.py +235 -0
- raxe/cli/config.py +334 -0
- raxe/cli/custom_rules.py +458 -0
- raxe/cli/doctor.py +686 -0
- raxe/cli/error_handler.py +665 -0
- raxe/cli/event.py +648 -0
- raxe/cli/exit_codes.py +57 -0
- raxe/cli/expiry_warning.py +302 -0
- raxe/cli/export.py +183 -0
- raxe/cli/history.py +247 -0
- raxe/cli/l2_formatter.py +872 -0
- raxe/cli/main.py +1137 -0
- raxe/cli/models.py +590 -0
- raxe/cli/output.py +403 -0
- raxe/cli/privacy.py +84 -0
- raxe/cli/profiler.py +262 -0
- raxe/cli/progress.py +379 -0
- raxe/cli/progress_context.py +101 -0
- raxe/cli/repl.py +394 -0
- raxe/cli/rules.py +542 -0
- raxe/cli/setup_wizard.py +721 -0
- raxe/cli/stats.py +292 -0
- raxe/cli/suppress.py +501 -0
- raxe/cli/telemetry.py +1384 -0
- raxe/cli/test.py +130 -0
- raxe/cli/tune.py +315 -0
- raxe/cli/validate.py +218 -0
- raxe/domain/__init__.py +30 -0
- raxe/domain/analytics/__init__.py +97 -0
- raxe/domain/analytics/achievements.py +306 -0
- raxe/domain/analytics/models.py +120 -0
- raxe/domain/analytics/retention.py +168 -0
- raxe/domain/analytics/statistics.py +207 -0
- raxe/domain/analytics/streaks.py +173 -0
- raxe/domain/engine/__init__.py +15 -0
- raxe/domain/engine/executor.py +396 -0
- raxe/domain/engine/matcher.py +212 -0
- raxe/domain/inline_suppression.py +176 -0
- raxe/domain/ml/__init__.py +133 -0
- raxe/domain/ml/embedding_cache.py +309 -0
- raxe/domain/ml/gemma_detector.py +921 -0
- raxe/domain/ml/gemma_models.py +346 -0
- raxe/domain/ml/l2_config.py +428 -0
- raxe/domain/ml/l2_output_schema.py +443 -0
- raxe/domain/ml/manifest_loader.py +309 -0
- raxe/domain/ml/manifest_schema.py +345 -0
- raxe/domain/ml/model_metadata.py +263 -0
- raxe/domain/ml/model_registry.py +786 -0
- raxe/domain/ml/protocol.py +282 -0
- raxe/domain/ml/scoring_models.py +419 -0
- raxe/domain/ml/stub_detector.py +397 -0
- raxe/domain/ml/threat_scorer.py +757 -0
- raxe/domain/ml/tokenizer_registry.py +372 -0
- raxe/domain/ml/voting/__init__.py +89 -0
- raxe/domain/ml/voting/config.py +595 -0
- raxe/domain/ml/voting/engine.py +465 -0
- raxe/domain/ml/voting/head_voters.py +378 -0
- raxe/domain/ml/voting/models.py +222 -0
- raxe/domain/models.py +82 -0
- raxe/domain/packs/__init__.py +17 -0
- raxe/domain/packs/models.py +304 -0
- raxe/domain/policies/__init__.py +20 -0
- raxe/domain/policies/evaluator.py +212 -0
- raxe/domain/policies/models.py +223 -0
- raxe/domain/rules/__init__.py +32 -0
- raxe/domain/rules/custom.py +286 -0
- raxe/domain/rules/models.py +273 -0
- raxe/domain/rules/schema.py +166 -0
- raxe/domain/rules/validator.py +556 -0
- raxe/domain/suppression.py +801 -0
- raxe/domain/suppression_factory.py +174 -0
- raxe/domain/telemetry/__init__.py +116 -0
- raxe/domain/telemetry/backpressure.py +424 -0
- raxe/domain/telemetry/event_creator.py +362 -0
- raxe/domain/telemetry/events.py +1282 -0
- raxe/domain/telemetry/priority.py +263 -0
- raxe/domain/telemetry/scan_telemetry_builder.py +670 -0
- raxe/infrastructure/__init__.py +25 -0
- raxe/infrastructure/analytics/__init__.py +18 -0
- raxe/infrastructure/analytics/aggregator.py +484 -0
- raxe/infrastructure/analytics/aggregator_optimized.py +184 -0
- raxe/infrastructure/analytics/engine.py +748 -0
- raxe/infrastructure/analytics/repository.py +409 -0
- raxe/infrastructure/analytics/streaks.py +467 -0
- raxe/infrastructure/analytics/views.py +178 -0
- raxe/infrastructure/cloud/__init__.py +9 -0
- raxe/infrastructure/config/__init__.py +56 -0
- raxe/infrastructure/config/endpoints.py +641 -0
- raxe/infrastructure/config/scan_config.py +352 -0
- raxe/infrastructure/config/yaml_config.py +459 -0
- raxe/infrastructure/database/__init__.py +10 -0
- raxe/infrastructure/database/connection.py +200 -0
- raxe/infrastructure/database/models.py +325 -0
- raxe/infrastructure/database/scan_history.py +764 -0
- raxe/infrastructure/ml/__init__.py +0 -0
- raxe/infrastructure/ml/download_progress.py +438 -0
- raxe/infrastructure/ml/model_downloader.py +457 -0
- raxe/infrastructure/models/__init__.py +16 -0
- raxe/infrastructure/models/discovery.py +461 -0
- raxe/infrastructure/packs/__init__.py +13 -0
- raxe/infrastructure/packs/loader.py +407 -0
- raxe/infrastructure/packs/registry.py +381 -0
- raxe/infrastructure/policies/__init__.py +16 -0
- raxe/infrastructure/policies/api_client.py +256 -0
- raxe/infrastructure/policies/validator.py +227 -0
- raxe/infrastructure/policies/yaml_loader.py +250 -0
- raxe/infrastructure/rules/__init__.py +18 -0
- raxe/infrastructure/rules/custom_loader.py +224 -0
- raxe/infrastructure/rules/versioning.py +222 -0
- raxe/infrastructure/rules/yaml_loader.py +286 -0
- raxe/infrastructure/security/__init__.py +31 -0
- raxe/infrastructure/security/auth.py +145 -0
- raxe/infrastructure/security/policy_validator.py +124 -0
- raxe/infrastructure/security/signatures.py +171 -0
- raxe/infrastructure/suppression/__init__.py +36 -0
- raxe/infrastructure/suppression/composite_repository.py +154 -0
- raxe/infrastructure/suppression/sqlite_repository.py +231 -0
- raxe/infrastructure/suppression/yaml_composite_repository.py +156 -0
- raxe/infrastructure/suppression/yaml_repository.py +510 -0
- raxe/infrastructure/telemetry/__init__.py +79 -0
- raxe/infrastructure/telemetry/acquisition.py +179 -0
- raxe/infrastructure/telemetry/config.py +254 -0
- raxe/infrastructure/telemetry/credential_store.py +947 -0
- raxe/infrastructure/telemetry/dual_queue.py +1123 -0
- raxe/infrastructure/telemetry/flush_helper.py +343 -0
- raxe/infrastructure/telemetry/flush_scheduler.py +776 -0
- raxe/infrastructure/telemetry/health_client.py +394 -0
- raxe/infrastructure/telemetry/hook.py +347 -0
- raxe/infrastructure/telemetry/queue.py +520 -0
- raxe/infrastructure/telemetry/sender.py +476 -0
- raxe/infrastructure/tracking/__init__.py +13 -0
- raxe/infrastructure/tracking/usage.py +389 -0
- raxe/integrations/__init__.py +55 -0
- raxe/integrations/availability.py +143 -0
- raxe/integrations/registry.py +122 -0
- raxe/integrations/utils.py +135 -0
- raxe/mcp/__init__.py +62 -0
- raxe/mcp/cli.py +97 -0
- raxe/mcp/server.py +409 -0
- raxe/monitoring/__init__.py +51 -0
- raxe/monitoring/metrics.py +372 -0
- raxe/monitoring/profiler.py +388 -0
- raxe/monitoring/server.py +136 -0
- raxe/packs/core/v1.0.0/pack.yaml +1394 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-001@1.0.0.yaml +49 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-006@1.0.0.yaml +48 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-014@1.0.0.yaml +54 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-017@1.0.0.yaml +52 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-022@1.0.0.yaml +67 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-023@1.0.0.yaml +91 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-024@1.0.0.yaml +80 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-025@1.0.0.yaml +81 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-026@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-027@1.0.0.yaml +77 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-028@1.0.0.yaml +52 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-029@1.0.0.yaml +51 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-030@1.0.0.yaml +55 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-033@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-034@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-035@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-046@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-047@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-048@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-049@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-050@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-068@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-078@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-2001@1.0.0.yaml +35 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-2004@1.0.0.yaml +39 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-201@1.0.0.yaml +43 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-202@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-203@1.0.0.yaml +46 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-3007@1.0.0.yaml +44 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-3016@1.0.0.yaml +44 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-3026@1.0.0.yaml +39 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-3027@1.0.0.yaml +64 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-3028@1.0.0.yaml +51 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-3029@1.0.0.yaml +53 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-3030@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-3031@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-3032@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-3033@1.0.0.yaml +56 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-3034@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-79@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-80@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-81@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-82@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-83@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-84@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-85@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-86@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-87@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-88@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-89@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-90@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-91@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-92@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-93@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-94@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-95@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-96@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-97@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/PI/pi-98@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-001@1.0.0.yaml +48 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-007@1.0.0.yaml +48 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-015@1.0.0.yaml +56 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-016@1.0.0.yaml +46 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-017@1.0.0.yaml +57 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-021@1.0.0.yaml +46 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-022@1.0.0.yaml +46 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-023@1.0.0.yaml +78 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-024@1.0.0.yaml +46 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-025@1.0.0.yaml +93 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-026@1.0.0.yaml +81 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-027@1.0.0.yaml +82 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-028@1.0.0.yaml +46 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-033@1.0.0.yaml +48 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-036@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-037@1.0.0.yaml +44 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-052@1.0.0.yaml +43 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-054@1.0.0.yaml +44 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-056@1.0.0.yaml +43 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-065@1.0.0.yaml +46 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-075@1.0.0.yaml +45 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-079@1.0.0.yaml +44 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-1080@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-1090@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-1104@1.0.0.yaml +44 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-1105@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-1112@1.0.0.yaml +44 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-201@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-202@1.0.0.yaml +42 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-203@1.0.0.yaml +43 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-204@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-205@1.0.0.yaml +44 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-206@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-207@1.0.0.yaml +46 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-208@1.0.0.yaml +42 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-209@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-210@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-211@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-212@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-213@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-214@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-215@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-216@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-217@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-218@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-219@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-220@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-221@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-222@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-223@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-224@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-225@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-226@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-227@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-228@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-229@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-230@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-231@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-232@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-233@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-234@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-235@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-236@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-237@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/cmd/cmd-238@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-001@1.0.0.yaml +48 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-013@1.0.0.yaml +46 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-019@1.0.0.yaml +43 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-020@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-024@1.0.0.yaml +46 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-029@1.0.0.yaml +44 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-038@1.0.0.yaml +44 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-044@1.0.0.yaml +46 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-067@1.0.0.yaml +42 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-069@1.0.0.yaml +42 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-100@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-101@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-102@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-103@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-104@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-105@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-106@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-107@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-108@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-109@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-110@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-111@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-112@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-113@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-114@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-115@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-116@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-117@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-118@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-119@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-120@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-201@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-202@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-203@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-3004@1.0.0.yaml +40 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-3006@1.0.0.yaml +40 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-3011@1.0.0.yaml +40 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-5016@1.0.0.yaml +46 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-6001@1.0.0.yaml +53 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-6002@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-70@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-71@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-72@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-73@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-74@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-75@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-76@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-77@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-78@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-79@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-80@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-81@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-82@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-83@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-84@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-85@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-86@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-87@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-88@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-89@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-90@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-91@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-92@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-93@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-94@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-95@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-96@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-97@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-98@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/enc/enc-99@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-001@1.0.0.yaml +73 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-002@1.0.0.yaml +71 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-003@1.0.0.yaml +65 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-004@1.0.0.yaml +73 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-101@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-102@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-103@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-104@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-105@1.0.0.yaml +48 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-106@1.0.0.yaml +40 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-107@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-108@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-109@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-110@1.0.0.yaml +56 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-111@1.0.0.yaml +49 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-112@1.0.0.yaml +53 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-113@1.0.0.yaml +52 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-114@1.0.0.yaml +52 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-115@1.0.0.yaml +52 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-116@1.0.0.yaml +53 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-117@1.0.0.yaml +54 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-118@1.0.0.yaml +52 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-119@1.0.0.yaml +51 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-120@1.0.0.yaml +52 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-121@1.0.0.yaml +51 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-122@1.0.0.yaml +51 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-123@1.0.0.yaml +52 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-124@1.0.0.yaml +53 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-125@1.0.0.yaml +53 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-126@1.0.0.yaml +53 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-127@1.0.0.yaml +53 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-128@1.0.0.yaml +53 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-129@1.0.0.yaml +51 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-130@1.0.0.yaml +51 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-131@1.0.0.yaml +51 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-132@1.0.0.yaml +51 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-133@1.0.0.yaml +53 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-134@1.0.0.yaml +51 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-135@1.0.0.yaml +51 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-136@1.0.0.yaml +51 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-137@1.0.0.yaml +51 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-138@1.0.0.yaml +51 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-139@1.0.0.yaml +51 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-140@1.0.0.yaml +51 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-141@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-142@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-143@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-144@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-145@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-146@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-147@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-148@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-149@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-150@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-151@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-152@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-153@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-154@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-155@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-156@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-157@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-158@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-159@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-160@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/hc/hc-161@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-001@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-009@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-020@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-021@1.0.0.yaml +46 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-022@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-028@1.0.0.yaml +43 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-033@1.0.0.yaml +46 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-034@1.0.0.yaml +46 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-036@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-039@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-056@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-066@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-076@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-098@1.0.0.yaml +46 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-103@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-104@1.0.0.yaml +52 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-105@1.0.0.yaml +56 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-110@1.0.0.yaml +56 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-111@1.0.0.yaml +57 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-112@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-113@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-114@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-115@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-116@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-117@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-118@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-119@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-120@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-121@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-122@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-123@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-124@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-125@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-126@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-127@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-128@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-129@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-130@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-131@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-132@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-133@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-134@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-135@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-136@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-137@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-138@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-139@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-140@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-141@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-142@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-143@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-144@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-145@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-146@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-147@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-148@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-149@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-150@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-151@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-152@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-153@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-154@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-155@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-156@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-157@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-158@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-159@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-160@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-161@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-162@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-201@1.0.0.yaml +40 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-202@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-203@1.0.0.yaml +51 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-204@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-205@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-206@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/jb/jb-207@1.0.0.yaml +49 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-001@1.0.0.yaml +48 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-009@1.0.0.yaml +48 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-012@1.0.0.yaml +48 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-017@1.0.0.yaml +48 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-022@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-025@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-027@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-028@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-034@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-037@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-040@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-041@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-044@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-050@1.0.0.yaml +57 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-051@1.0.0.yaml +53 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-052@1.0.0.yaml +52 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-053@1.0.0.yaml +56 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-054@1.0.0.yaml +53 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-055@1.0.0.yaml +51 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-056@1.0.0.yaml +51 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-058@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-2015@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-2025@1.0.0.yaml +35 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-2026@1.0.0.yaml +39 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-2035@1.0.0.yaml +39 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-2037@1.0.0.yaml +39 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-2042@1.0.0.yaml +39 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3001@1.0.0.yaml +39 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3002@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3003@1.0.0.yaml +36 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3004@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3005@1.0.0.yaml +39 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3006@1.0.0.yaml +35 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3007@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3008@1.0.0.yaml +35 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3009@1.0.0.yaml +42 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3010@1.0.0.yaml +39 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3011@1.0.0.yaml +35 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3012@1.0.0.yaml +35 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3013@1.0.0.yaml +36 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3014@1.0.0.yaml +36 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3015@1.0.0.yaml +42 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3016@1.0.0.yaml +42 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3017@1.0.0.yaml +40 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3018@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3019@1.0.0.yaml +40 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3020@1.0.0.yaml +40 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3021@1.0.0.yaml +39 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3022@1.0.0.yaml +36 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3023@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3024@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3025@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3026@1.0.0.yaml +42 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3027@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3028@1.0.0.yaml +42 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3029@1.0.0.yaml +36 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3030@1.0.0.yaml +42 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3031@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3032@1.0.0.yaml +42 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3033@1.0.0.yaml +39 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3034@1.0.0.yaml +40 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3035@1.0.0.yaml +43 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3036@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3037@1.0.0.yaml +35 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3038@1.0.0.yaml +35 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3039@1.0.0.yaml +35 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3040@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3041@1.0.0.yaml +39 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3042@1.0.0.yaml +36 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3043@1.0.0.yaml +35 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3044@1.0.0.yaml +43 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3045@1.0.0.yaml +36 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3046@1.0.0.yaml +37 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3047@1.0.0.yaml +36 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3048@1.0.0.yaml +36 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3049@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3050@1.0.0.yaml +44 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3051@1.0.0.yaml +35 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3052@1.0.0.yaml +36 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3053@1.0.0.yaml +35 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3054@1.0.0.yaml +35 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3055@1.0.0.yaml +40 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3056@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3057@1.0.0.yaml +40 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3058@1.0.0.yaml +43 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3059@1.0.0.yaml +42 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3060@1.0.0.yaml +42 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3061@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3062@1.0.0.yaml +50 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3063@1.0.0.yaml +54 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3064@1.0.0.yaml +78 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3065@1.0.0.yaml +84 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3066@1.0.0.yaml +84 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3067@1.0.0.yaml +88 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3068@1.0.0.yaml +94 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3069@1.0.0.yaml +90 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3070@1.0.0.yaml +99 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3071@1.0.0.yaml +91 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3072@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3073@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3074@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3075@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3076@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3077@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3078@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3079@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3080@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3081@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3082@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3083@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3084@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/pii/pii-3085@1.0.0.yaml +38 -0
- raxe/packs/core/v1.0.0/rules/rag/rag-016@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/rag/rag-028@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/rag/rag-042@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/rag/rag-044@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/rag/rag-045@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/rag/rag-050@1.0.0.yaml +47 -0
- raxe/packs/core/v1.0.0/rules/rag/rag-201@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/rag/rag-202@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/rag/rag-3001@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/rag/rag-3006@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/rag/rag-3009@1.0.0.yaml +41 -0
- raxe/packs/core/v1.0.0/rules/rag/rag-3012@1.0.0.yaml +41 -0
- raxe/plugins/__init__.py +98 -0
- raxe/plugins/custom_rules.py +380 -0
- raxe/plugins/loader.py +389 -0
- raxe/plugins/manager.py +538 -0
- raxe/plugins/protocol.py +428 -0
- raxe/py.typed +0 -0
- raxe/sdk/__init__.py +77 -0
- raxe/sdk/agent_scanner.py +1918 -0
- raxe/sdk/client.py +1603 -0
- raxe/sdk/decorator.py +175 -0
- raxe/sdk/exceptions.py +859 -0
- raxe/sdk/integrations/__init__.py +277 -0
- raxe/sdk/integrations/agent_scanner.py +71 -0
- raxe/sdk/integrations/autogen.py +872 -0
- raxe/sdk/integrations/crewai.py +1368 -0
- raxe/sdk/integrations/dspy.py +845 -0
- raxe/sdk/integrations/extractors.py +363 -0
- raxe/sdk/integrations/huggingface.py +395 -0
- raxe/sdk/integrations/langchain.py +948 -0
- raxe/sdk/integrations/litellm.py +484 -0
- raxe/sdk/integrations/llamaindex.py +1049 -0
- raxe/sdk/integrations/portkey.py +831 -0
- raxe/sdk/suppression_context.py +215 -0
- raxe/sdk/wrappers/__init__.py +163 -0
- raxe/sdk/wrappers/anthropic.py +310 -0
- raxe/sdk/wrappers/openai.py +221 -0
- raxe/sdk/wrappers/vertexai.py +484 -0
- raxe/utils/__init__.py +12 -0
- raxe/utils/error_sanitizer.py +135 -0
- raxe/utils/logging.py +241 -0
- raxe/utils/performance.py +414 -0
- raxe/utils/profiler.py +339 -0
- raxe/utils/validators.py +170 -0
- raxe-0.4.6.dist-info/METADATA +471 -0
- raxe-0.4.6.dist-info/RECORD +668 -0
- raxe-0.4.6.dist-info/WHEEL +5 -0
- raxe-0.4.6.dist-info/entry_points.txt +2 -0
- raxe-0.4.6.dist-info/licenses/LICENSE +56 -0
- raxe-0.4.6.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
"""Individual head voting logic - Pure functions for per-head voting.
|
|
2
|
+
|
|
3
|
+
This module contains ONLY pure functions - no I/O operations.
|
|
4
|
+
Each function takes head output data and configuration, returns a vote.
|
|
5
|
+
|
|
6
|
+
Head Voters:
|
|
7
|
+
- vote_binary: Binary (is_threat) head voting
|
|
8
|
+
- vote_family: Family head voting
|
|
9
|
+
- vote_severity: Severity head voting
|
|
10
|
+
- vote_technique: Technique head voting
|
|
11
|
+
- vote_harm: Harm types head voting
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from raxe.domain.ml.voting.config import (
|
|
15
|
+
BinaryHeadThresholds,
|
|
16
|
+
FamilyHeadThresholds,
|
|
17
|
+
HarmHeadThresholds,
|
|
18
|
+
HeadWeights,
|
|
19
|
+
SeverityHeadThresholds,
|
|
20
|
+
TechniqueHeadThresholds,
|
|
21
|
+
)
|
|
22
|
+
from raxe.domain.ml.voting.models import HeadVoteDetail, Vote
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def vote_binary(
|
|
26
|
+
threat_probability: float,
|
|
27
|
+
safe_probability: float,
|
|
28
|
+
thresholds: BinaryHeadThresholds,
|
|
29
|
+
weight: float,
|
|
30
|
+
) -> HeadVoteDetail:
|
|
31
|
+
"""Cast vote for the binary (is_threat) classifier head.
|
|
32
|
+
|
|
33
|
+
Voting rules:
|
|
34
|
+
- THREAT if threat_probability >= threat_threshold
|
|
35
|
+
- SAFE if threat_probability < safe_threshold
|
|
36
|
+
- ABSTAIN otherwise (gray zone)
|
|
37
|
+
|
|
38
|
+
Args:
|
|
39
|
+
threat_probability: Model output probability of threat (0.0 to 1.0)
|
|
40
|
+
safe_probability: Model output probability of safe (0.0 to 1.0)
|
|
41
|
+
thresholds: Threshold configuration for this head
|
|
42
|
+
weight: Vote weight for this head
|
|
43
|
+
|
|
44
|
+
Returns:
|
|
45
|
+
HeadVoteDetail with the vote, confidence, and rationale
|
|
46
|
+
|
|
47
|
+
Examples:
|
|
48
|
+
>>> detail = vote_binary(0.80, 0.20, BinaryHeadThresholds(), 1.0)
|
|
49
|
+
>>> detail.vote
|
|
50
|
+
<Vote.THREAT: 'threat'>
|
|
51
|
+
>>> detail.confidence
|
|
52
|
+
0.8
|
|
53
|
+
"""
|
|
54
|
+
if threat_probability >= thresholds.threat_threshold:
|
|
55
|
+
vote = Vote.THREAT
|
|
56
|
+
confidence = threat_probability
|
|
57
|
+
threshold_used = thresholds.threat_threshold
|
|
58
|
+
rationale = (
|
|
59
|
+
f"threat_probability ({threat_probability:.2%}) >= "
|
|
60
|
+
f"threat_threshold ({thresholds.threat_threshold:.2%})"
|
|
61
|
+
)
|
|
62
|
+
elif threat_probability < thresholds.safe_threshold:
|
|
63
|
+
vote = Vote.SAFE
|
|
64
|
+
confidence = safe_probability
|
|
65
|
+
threshold_used = thresholds.safe_threshold
|
|
66
|
+
rationale = (
|
|
67
|
+
f"threat_probability ({threat_probability:.2%}) < "
|
|
68
|
+
f"safe_threshold ({thresholds.safe_threshold:.2%})"
|
|
69
|
+
)
|
|
70
|
+
else:
|
|
71
|
+
vote = Vote.ABSTAIN
|
|
72
|
+
# Confidence for abstain is how close to the decision boundary
|
|
73
|
+
confidence = 1.0 - abs(
|
|
74
|
+
threat_probability - (thresholds.threat_threshold + thresholds.safe_threshold) / 2
|
|
75
|
+
) / ((thresholds.threat_threshold - thresholds.safe_threshold) / 2)
|
|
76
|
+
confidence = max(0.0, min(1.0, confidence))
|
|
77
|
+
threshold_used = (thresholds.threat_threshold + thresholds.safe_threshold) / 2
|
|
78
|
+
rationale = (
|
|
79
|
+
f"threat_probability ({threat_probability:.2%}) in gray zone "
|
|
80
|
+
f"[{thresholds.safe_threshold:.2%}, {thresholds.threat_threshold:.2%})"
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
return HeadVoteDetail(
|
|
84
|
+
head_name="binary",
|
|
85
|
+
vote=vote,
|
|
86
|
+
confidence=confidence,
|
|
87
|
+
weight=weight,
|
|
88
|
+
raw_probability=threat_probability,
|
|
89
|
+
threshold_used=threshold_used,
|
|
90
|
+
prediction="threat" if threat_probability >= 0.5 else "safe",
|
|
91
|
+
rationale=rationale,
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def vote_family(
|
|
96
|
+
family_prediction: str,
|
|
97
|
+
family_confidence: float,
|
|
98
|
+
thresholds: FamilyHeadThresholds,
|
|
99
|
+
weight: float,
|
|
100
|
+
) -> HeadVoteDetail:
|
|
101
|
+
"""Cast vote for the family classifier head.
|
|
102
|
+
|
|
103
|
+
Voting rules:
|
|
104
|
+
- THREAT if family != benign AND confidence >= threat_confidence
|
|
105
|
+
- SAFE if family == benign OR confidence < safe_confidence
|
|
106
|
+
- ABSTAIN otherwise
|
|
107
|
+
|
|
108
|
+
Args:
|
|
109
|
+
family_prediction: Predicted threat family (e.g., "benign", "jailbreak")
|
|
110
|
+
family_confidence: Model confidence in the prediction (0.0 to 1.0)
|
|
111
|
+
thresholds: Threshold configuration for this head
|
|
112
|
+
weight: Vote weight for this head
|
|
113
|
+
|
|
114
|
+
Returns:
|
|
115
|
+
HeadVoteDetail with the vote, confidence, and rationale
|
|
116
|
+
|
|
117
|
+
Examples:
|
|
118
|
+
>>> detail = vote_family("jailbreak", 0.75, FamilyHeadThresholds(), 1.2)
|
|
119
|
+
>>> detail.vote
|
|
120
|
+
<Vote.THREAT: 'threat'>
|
|
121
|
+
"""
|
|
122
|
+
family_is_benign = family_prediction.lower() == "benign"
|
|
123
|
+
|
|
124
|
+
if family_is_benign:
|
|
125
|
+
vote = Vote.SAFE
|
|
126
|
+
confidence = family_confidence
|
|
127
|
+
threshold_used = 0.0 # No threshold for benign
|
|
128
|
+
rationale = f"family={family_prediction} is benign"
|
|
129
|
+
elif family_confidence >= thresholds.threat_confidence:
|
|
130
|
+
vote = Vote.THREAT
|
|
131
|
+
confidence = family_confidence
|
|
132
|
+
threshold_used = thresholds.threat_confidence
|
|
133
|
+
rationale = (
|
|
134
|
+
f"family={family_prediction} with confidence ({family_confidence:.2%}) >= "
|
|
135
|
+
f"threat_confidence ({thresholds.threat_confidence:.2%})"
|
|
136
|
+
)
|
|
137
|
+
elif family_confidence < thresholds.safe_confidence:
|
|
138
|
+
vote = Vote.SAFE
|
|
139
|
+
confidence = 1.0 - family_confidence # Low confidence in threat = high confidence in safe
|
|
140
|
+
threshold_used = thresholds.safe_confidence
|
|
141
|
+
rationale = (
|
|
142
|
+
f"family={family_prediction} with confidence ({family_confidence:.2%}) < "
|
|
143
|
+
f"safe_confidence ({thresholds.safe_confidence:.2%})"
|
|
144
|
+
)
|
|
145
|
+
else:
|
|
146
|
+
vote = Vote.ABSTAIN
|
|
147
|
+
# Confidence for abstain reflects uncertainty
|
|
148
|
+
confidence = 0.5
|
|
149
|
+
threshold_used = (thresholds.threat_confidence + thresholds.safe_confidence) / 2
|
|
150
|
+
rationale = (
|
|
151
|
+
f"family={family_prediction} with confidence ({family_confidence:.2%}) in gray zone "
|
|
152
|
+
f"[{thresholds.safe_confidence:.2%}, {thresholds.threat_confidence:.2%})"
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
return HeadVoteDetail(
|
|
156
|
+
head_name="family",
|
|
157
|
+
vote=vote,
|
|
158
|
+
confidence=confidence,
|
|
159
|
+
weight=weight,
|
|
160
|
+
raw_probability=family_confidence,
|
|
161
|
+
threshold_used=threshold_used,
|
|
162
|
+
prediction=family_prediction,
|
|
163
|
+
rationale=rationale,
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
def vote_severity(
|
|
168
|
+
severity_prediction: str,
|
|
169
|
+
severity_confidence: float,
|
|
170
|
+
thresholds: SeverityHeadThresholds,
|
|
171
|
+
weight: float,
|
|
172
|
+
) -> HeadVoteDetail:
|
|
173
|
+
"""Cast vote for the severity classifier head.
|
|
174
|
+
|
|
175
|
+
Voting rules:
|
|
176
|
+
- THREAT if severity in threat_severities (low, medium, high, critical)
|
|
177
|
+
- SAFE if severity in safe_severities (none)
|
|
178
|
+
- No abstain - severity always has an opinion
|
|
179
|
+
|
|
180
|
+
Note: Severity head has the highest weight (1.5) because it directly
|
|
181
|
+
indicates threat severity and has strong signal quality.
|
|
182
|
+
|
|
183
|
+
Args:
|
|
184
|
+
severity_prediction: Predicted severity (e.g., "none", "high", "critical")
|
|
185
|
+
severity_confidence: Model confidence in the prediction (0.0 to 1.0)
|
|
186
|
+
thresholds: Threshold configuration for this head
|
|
187
|
+
weight: Vote weight for this head
|
|
188
|
+
|
|
189
|
+
Returns:
|
|
190
|
+
HeadVoteDetail with the vote, confidence, and rationale
|
|
191
|
+
|
|
192
|
+
Examples:
|
|
193
|
+
>>> detail = vote_severity("high", 0.85, SeverityHeadThresholds(), 1.5)
|
|
194
|
+
>>> detail.vote
|
|
195
|
+
<Vote.THREAT: 'threat'>
|
|
196
|
+
"""
|
|
197
|
+
severity_lower = severity_prediction.lower()
|
|
198
|
+
|
|
199
|
+
if severity_lower in thresholds.safe_severities:
|
|
200
|
+
vote = Vote.SAFE
|
|
201
|
+
confidence = severity_confidence
|
|
202
|
+
threshold_used = 0.0
|
|
203
|
+
rationale = f"severity={severity_prediction} in safe_severities {thresholds.safe_severities}"
|
|
204
|
+
elif severity_lower in thresholds.threat_severities:
|
|
205
|
+
vote = Vote.THREAT
|
|
206
|
+
confidence = severity_confidence
|
|
207
|
+
threshold_used = 0.0
|
|
208
|
+
rationale = f"severity={severity_prediction} in threat_severities {thresholds.threat_severities}"
|
|
209
|
+
else:
|
|
210
|
+
# Unknown severity - vote based on whether it's closer to threat or safe
|
|
211
|
+
# This shouldn't happen with valid model outputs
|
|
212
|
+
vote = Vote.ABSTAIN
|
|
213
|
+
confidence = 0.5
|
|
214
|
+
threshold_used = 0.5
|
|
215
|
+
rationale = f"severity={severity_prediction} not in known categories"
|
|
216
|
+
|
|
217
|
+
return HeadVoteDetail(
|
|
218
|
+
head_name="severity",
|
|
219
|
+
vote=vote,
|
|
220
|
+
confidence=confidence,
|
|
221
|
+
weight=weight,
|
|
222
|
+
raw_probability=severity_confidence,
|
|
223
|
+
threshold_used=threshold_used,
|
|
224
|
+
prediction=severity_prediction,
|
|
225
|
+
rationale=rationale,
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
def vote_technique(
|
|
230
|
+
technique_prediction: str | None,
|
|
231
|
+
technique_confidence: float,
|
|
232
|
+
thresholds: TechniqueHeadThresholds,
|
|
233
|
+
weight: float,
|
|
234
|
+
) -> HeadVoteDetail:
|
|
235
|
+
"""Cast vote for the primary technique classifier head.
|
|
236
|
+
|
|
237
|
+
Voting rules:
|
|
238
|
+
- THREAT if technique not in safe_techniques AND confidence >= threat_confidence
|
|
239
|
+
- SAFE if technique in safe_techniques OR confidence < safe_confidence
|
|
240
|
+
- ABSTAIN otherwise
|
|
241
|
+
|
|
242
|
+
Args:
|
|
243
|
+
technique_prediction: Predicted attack technique (e.g., "none", "instruction_override")
|
|
244
|
+
technique_confidence: Model confidence in the prediction (0.0 to 1.0)
|
|
245
|
+
thresholds: Threshold configuration for this head
|
|
246
|
+
weight: Vote weight for this head
|
|
247
|
+
|
|
248
|
+
Returns:
|
|
249
|
+
HeadVoteDetail with the vote, confidence, and rationale
|
|
250
|
+
|
|
251
|
+
Examples:
|
|
252
|
+
>>> detail = vote_technique("instruction_override", 0.70, TechniqueHeadThresholds(), 1.0)
|
|
253
|
+
>>> detail.vote
|
|
254
|
+
<Vote.THREAT: 'threat'>
|
|
255
|
+
"""
|
|
256
|
+
# Handle None technique prediction
|
|
257
|
+
if technique_prediction is None:
|
|
258
|
+
technique_prediction = "none"
|
|
259
|
+
|
|
260
|
+
technique_lower = technique_prediction.lower()
|
|
261
|
+
is_safe_technique = technique_lower in [t.lower() for t in thresholds.safe_techniques]
|
|
262
|
+
|
|
263
|
+
if is_safe_technique:
|
|
264
|
+
vote = Vote.SAFE
|
|
265
|
+
confidence = technique_confidence
|
|
266
|
+
threshold_used = 0.0
|
|
267
|
+
rationale = f"technique={technique_prediction} in safe_techniques"
|
|
268
|
+
elif technique_confidence >= thresholds.threat_confidence:
|
|
269
|
+
vote = Vote.THREAT
|
|
270
|
+
confidence = technique_confidence
|
|
271
|
+
threshold_used = thresholds.threat_confidence
|
|
272
|
+
rationale = (
|
|
273
|
+
f"technique={technique_prediction} with confidence ({technique_confidence:.2%}) >= "
|
|
274
|
+
f"threat_confidence ({thresholds.threat_confidence:.2%})"
|
|
275
|
+
)
|
|
276
|
+
elif technique_confidence < thresholds.safe_confidence:
|
|
277
|
+
vote = Vote.SAFE
|
|
278
|
+
confidence = 1.0 - technique_confidence
|
|
279
|
+
threshold_used = thresholds.safe_confidence
|
|
280
|
+
rationale = (
|
|
281
|
+
f"technique={technique_prediction} with confidence ({technique_confidence:.2%}) < "
|
|
282
|
+
f"safe_confidence ({thresholds.safe_confidence:.2%})"
|
|
283
|
+
)
|
|
284
|
+
else:
|
|
285
|
+
vote = Vote.ABSTAIN
|
|
286
|
+
confidence = 0.5
|
|
287
|
+
threshold_used = (thresholds.threat_confidence + thresholds.safe_confidence) / 2
|
|
288
|
+
rationale = (
|
|
289
|
+
f"technique={technique_prediction} with confidence ({technique_confidence:.2%}) in gray zone "
|
|
290
|
+
f"[{thresholds.safe_confidence:.2%}, {thresholds.threat_confidence:.2%})"
|
|
291
|
+
)
|
|
292
|
+
|
|
293
|
+
return HeadVoteDetail(
|
|
294
|
+
head_name="technique",
|
|
295
|
+
vote=vote,
|
|
296
|
+
confidence=confidence,
|
|
297
|
+
weight=weight,
|
|
298
|
+
raw_probability=technique_confidence,
|
|
299
|
+
threshold_used=threshold_used,
|
|
300
|
+
prediction=technique_prediction,
|
|
301
|
+
rationale=rationale,
|
|
302
|
+
)
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
def vote_harm(
|
|
306
|
+
max_probability: float,
|
|
307
|
+
active_labels: list[str],
|
|
308
|
+
thresholds: HarmHeadThresholds,
|
|
309
|
+
weight: float,
|
|
310
|
+
) -> HeadVoteDetail:
|
|
311
|
+
"""Cast vote for the harm types (multilabel) classifier head.
|
|
312
|
+
|
|
313
|
+
Voting rules:
|
|
314
|
+
- THREAT if max_probability >= threat_threshold
|
|
315
|
+
- SAFE if max_probability < safe_threshold
|
|
316
|
+
- ABSTAIN otherwise
|
|
317
|
+
|
|
318
|
+
Note: Harm head has the lowest weight (0.8) because it can trigger
|
|
319
|
+
false positives on benign content discussing sensitive topics.
|
|
320
|
+
|
|
321
|
+
Args:
|
|
322
|
+
max_probability: Maximum probability across all harm types (0.0 to 1.0)
|
|
323
|
+
active_labels: List of active harm type labels
|
|
324
|
+
thresholds: Threshold configuration for this head
|
|
325
|
+
weight: Vote weight for this head
|
|
326
|
+
|
|
327
|
+
Returns:
|
|
328
|
+
HeadVoteDetail with the vote, confidence, and rationale
|
|
329
|
+
|
|
330
|
+
Examples:
|
|
331
|
+
>>> detail = vote_harm(0.95, ["violence_or_physical_harm"], HarmHeadThresholds(), 0.8)
|
|
332
|
+
>>> detail.vote
|
|
333
|
+
<Vote.THREAT: 'threat'>
|
|
334
|
+
"""
|
|
335
|
+
# Build prediction string from active labels
|
|
336
|
+
if active_labels:
|
|
337
|
+
prediction = ",".join(active_labels[:3]) # Limit to top 3 for readability
|
|
338
|
+
if len(active_labels) > 3:
|
|
339
|
+
prediction += f",+{len(active_labels) - 3}"
|
|
340
|
+
else:
|
|
341
|
+
prediction = "none"
|
|
342
|
+
|
|
343
|
+
if max_probability >= thresholds.threat_threshold:
|
|
344
|
+
vote = Vote.THREAT
|
|
345
|
+
confidence = max_probability
|
|
346
|
+
threshold_used = thresholds.threat_threshold
|
|
347
|
+
rationale = (
|
|
348
|
+
f"max_probability ({max_probability:.2%}) >= "
|
|
349
|
+
f"threat_threshold ({thresholds.threat_threshold:.2%})"
|
|
350
|
+
)
|
|
351
|
+
elif max_probability < thresholds.safe_threshold:
|
|
352
|
+
vote = Vote.SAFE
|
|
353
|
+
confidence = 1.0 - max_probability
|
|
354
|
+
threshold_used = thresholds.safe_threshold
|
|
355
|
+
rationale = (
|
|
356
|
+
f"max_probability ({max_probability:.2%}) < "
|
|
357
|
+
f"safe_threshold ({thresholds.safe_threshold:.2%})"
|
|
358
|
+
)
|
|
359
|
+
else:
|
|
360
|
+
vote = Vote.ABSTAIN
|
|
361
|
+
# Confidence for abstain reflects uncertainty
|
|
362
|
+
confidence = 0.5
|
|
363
|
+
threshold_used = (thresholds.threat_threshold + thresholds.safe_threshold) / 2
|
|
364
|
+
rationale = (
|
|
365
|
+
f"max_probability ({max_probability:.2%}) in gray zone "
|
|
366
|
+
f"[{thresholds.safe_threshold:.2%}, {thresholds.threat_threshold:.2%})"
|
|
367
|
+
)
|
|
368
|
+
|
|
369
|
+
return HeadVoteDetail(
|
|
370
|
+
head_name="harm",
|
|
371
|
+
vote=vote,
|
|
372
|
+
confidence=confidence,
|
|
373
|
+
weight=weight,
|
|
374
|
+
raw_probability=max_probability,
|
|
375
|
+
threshold_used=threshold_used,
|
|
376
|
+
prediction=prediction,
|
|
377
|
+
rationale=rationale,
|
|
378
|
+
)
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
"""Voting domain models - Pure data structures for ensemble voting.
|
|
2
|
+
|
|
3
|
+
This module contains ONLY pure domain models - no I/O operations.
|
|
4
|
+
All classes are immutable value objects representing voting states and results.
|
|
5
|
+
|
|
6
|
+
Model Hierarchy:
|
|
7
|
+
- Vote: Three-way vote enum (SAFE, ABSTAIN, THREAT)
|
|
8
|
+
- HeadVoteDetail: Detailed vote from a single classifier head
|
|
9
|
+
- VotingResult: Complete voting engine output with full transparency
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from dataclasses import dataclass, field
|
|
13
|
+
from enum import Enum
|
|
14
|
+
from typing import Any
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Vote(str, Enum):
|
|
18
|
+
"""Three-way vote classification.
|
|
19
|
+
|
|
20
|
+
Each classifier head casts one of these votes:
|
|
21
|
+
- SAFE: Head is confident the input is benign
|
|
22
|
+
- ABSTAIN: Head is uncertain (in the "gray zone")
|
|
23
|
+
- THREAT: Head is confident the input is a threat
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
SAFE = "safe"
|
|
27
|
+
ABSTAIN = "abstain"
|
|
28
|
+
THREAT = "threat"
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class Decision(str, Enum):
|
|
32
|
+
"""Final three-way classification decision.
|
|
33
|
+
|
|
34
|
+
The ensemble produces one of these decisions:
|
|
35
|
+
- SAFE: Consensus that input is benign, allow with confidence
|
|
36
|
+
- REVIEW: Uncertain, recommend human review
|
|
37
|
+
- THREAT: Consensus that input is malicious, recommend block
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
SAFE = "safe"
|
|
41
|
+
REVIEW = "review"
|
|
42
|
+
THREAT = "threat"
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@dataclass(frozen=True)
|
|
46
|
+
class HeadVoteDetail:
|
|
47
|
+
"""Detailed vote from a single classifier head.
|
|
48
|
+
|
|
49
|
+
Provides full transparency into each head's voting decision,
|
|
50
|
+
including the raw probabilities and thresholds used.
|
|
51
|
+
|
|
52
|
+
Attributes:
|
|
53
|
+
head_name: Name of the classifier head (binary, family, severity, technique, harm)
|
|
54
|
+
vote: The vote cast by this head
|
|
55
|
+
confidence: Confidence in the vote (0.0 to 1.0)
|
|
56
|
+
weight: Weight applied to this head's vote
|
|
57
|
+
raw_probability: Raw model output probability
|
|
58
|
+
threshold_used: Threshold that triggered this vote
|
|
59
|
+
prediction: The head's prediction label (e.g., "jailbreak", "high")
|
|
60
|
+
rationale: Human-readable explanation for the vote
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
head_name: str
|
|
64
|
+
vote: Vote
|
|
65
|
+
confidence: float
|
|
66
|
+
weight: float
|
|
67
|
+
raw_probability: float
|
|
68
|
+
threshold_used: float
|
|
69
|
+
prediction: str
|
|
70
|
+
rationale: str
|
|
71
|
+
|
|
72
|
+
def __post_init__(self) -> None:
|
|
73
|
+
"""Validate head vote detail."""
|
|
74
|
+
if not 0.0 <= self.confidence <= 1.0:
|
|
75
|
+
raise ValueError(f"confidence must be 0-1, got {self.confidence}")
|
|
76
|
+
if not 0.0 <= self.raw_probability <= 1.0:
|
|
77
|
+
raise ValueError(f"raw_probability must be 0-1, got {self.raw_probability}")
|
|
78
|
+
if self.weight < 0:
|
|
79
|
+
raise ValueError(f"weight must be non-negative, got {self.weight}")
|
|
80
|
+
|
|
81
|
+
def to_dict(self) -> dict[str, Any]:
|
|
82
|
+
"""Convert to JSON-serializable dictionary."""
|
|
83
|
+
return {
|
|
84
|
+
"head_name": self.head_name,
|
|
85
|
+
"vote": self.vote.value,
|
|
86
|
+
"confidence": self.confidence,
|
|
87
|
+
"weight": self.weight,
|
|
88
|
+
"raw_probability": self.raw_probability,
|
|
89
|
+
"threshold_used": self.threshold_used,
|
|
90
|
+
"prediction": self.prediction,
|
|
91
|
+
"rationale": self.rationale,
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
@dataclass(frozen=True)
|
|
96
|
+
class VotingResult:
|
|
97
|
+
"""Complete result from the ensemble voting engine.
|
|
98
|
+
|
|
99
|
+
Provides full transparency into the voting process, including
|
|
100
|
+
per-head votes, aggregated scores, and the decision rationale.
|
|
101
|
+
|
|
102
|
+
Attributes:
|
|
103
|
+
decision: Final classification (SAFE, REVIEW, THREAT)
|
|
104
|
+
confidence: Overall confidence in the decision (0.0 to 1.0)
|
|
105
|
+
preset_used: Name of the voting preset that was applied
|
|
106
|
+
per_head_votes: Detailed vote breakdown for each head
|
|
107
|
+
aggregated_scores: Weighted vote totals {"safe": X, "review": Y, "threat": Z}
|
|
108
|
+
decision_rule_triggered: Which decision rule made the final call
|
|
109
|
+
threat_vote_count: Number of heads that voted THREAT
|
|
110
|
+
safe_vote_count: Number of heads that voted SAFE
|
|
111
|
+
abstain_vote_count: Number of heads that abstained
|
|
112
|
+
weighted_threat_score: Total weighted THREAT votes
|
|
113
|
+
weighted_safe_score: Total weighted SAFE votes
|
|
114
|
+
"""
|
|
115
|
+
|
|
116
|
+
decision: Decision
|
|
117
|
+
confidence: float
|
|
118
|
+
preset_used: str
|
|
119
|
+
per_head_votes: dict[str, HeadVoteDetail]
|
|
120
|
+
aggregated_scores: dict[str, float]
|
|
121
|
+
decision_rule_triggered: str
|
|
122
|
+
threat_vote_count: int
|
|
123
|
+
safe_vote_count: int
|
|
124
|
+
abstain_vote_count: int
|
|
125
|
+
weighted_threat_score: float = 0.0
|
|
126
|
+
weighted_safe_score: float = 0.0
|
|
127
|
+
|
|
128
|
+
def __post_init__(self) -> None:
|
|
129
|
+
"""Validate voting result."""
|
|
130
|
+
if not 0.0 <= self.confidence <= 1.0:
|
|
131
|
+
raise ValueError(f"confidence must be 0-1, got {self.confidence}")
|
|
132
|
+
if self.threat_vote_count < 0:
|
|
133
|
+
raise ValueError(f"threat_vote_count must be non-negative")
|
|
134
|
+
if self.safe_vote_count < 0:
|
|
135
|
+
raise ValueError(f"safe_vote_count must be non-negative")
|
|
136
|
+
if self.abstain_vote_count < 0:
|
|
137
|
+
raise ValueError(f"abstain_vote_count must be non-negative")
|
|
138
|
+
|
|
139
|
+
@property
|
|
140
|
+
def is_threat(self) -> bool:
|
|
141
|
+
"""True if the decision is THREAT."""
|
|
142
|
+
return self.decision == Decision.THREAT
|
|
143
|
+
|
|
144
|
+
@property
|
|
145
|
+
def is_safe(self) -> bool:
|
|
146
|
+
"""True if the decision is SAFE."""
|
|
147
|
+
return self.decision == Decision.SAFE
|
|
148
|
+
|
|
149
|
+
@property
|
|
150
|
+
def is_review(self) -> bool:
|
|
151
|
+
"""True if the decision is REVIEW (uncertain)."""
|
|
152
|
+
return self.decision == Decision.REVIEW
|
|
153
|
+
|
|
154
|
+
@property
|
|
155
|
+
def total_votes(self) -> int:
|
|
156
|
+
"""Total number of votes cast (excluding abstentions for ratio calc)."""
|
|
157
|
+
return self.threat_vote_count + self.safe_vote_count
|
|
158
|
+
|
|
159
|
+
@property
|
|
160
|
+
def threat_ratio(self) -> float:
|
|
161
|
+
"""Ratio of THREAT votes to total votes (excluding abstentions)."""
|
|
162
|
+
if self.total_votes == 0:
|
|
163
|
+
return 0.0
|
|
164
|
+
return self.threat_vote_count / self.total_votes
|
|
165
|
+
|
|
166
|
+
@property
|
|
167
|
+
def weighted_ratio(self) -> float:
|
|
168
|
+
"""Ratio of weighted THREAT votes to weighted SAFE votes."""
|
|
169
|
+
if self.weighted_safe_score == 0:
|
|
170
|
+
return float("inf") if self.weighted_threat_score > 0 else 0.0
|
|
171
|
+
return self.weighted_threat_score / self.weighted_safe_score
|
|
172
|
+
|
|
173
|
+
def to_dict(self) -> dict[str, Any]:
|
|
174
|
+
"""Convert to JSON-serializable dictionary."""
|
|
175
|
+
# Handle infinity for JSON serialization (JSON doesn't support Infinity)
|
|
176
|
+
ratio = self.weighted_ratio
|
|
177
|
+
if ratio == float("inf"):
|
|
178
|
+
ratio = 999.0 # Sentinel value for "infinitely more threat than safe"
|
|
179
|
+
|
|
180
|
+
return {
|
|
181
|
+
"decision": self.decision.value,
|
|
182
|
+
"confidence": self.confidence,
|
|
183
|
+
"preset_used": self.preset_used,
|
|
184
|
+
"per_head_votes": {
|
|
185
|
+
name: vote.to_dict() for name, vote in self.per_head_votes.items()
|
|
186
|
+
},
|
|
187
|
+
"aggregated_scores": self.aggregated_scores,
|
|
188
|
+
"decision_rule_triggered": self.decision_rule_triggered,
|
|
189
|
+
"threat_vote_count": self.threat_vote_count,
|
|
190
|
+
"safe_vote_count": self.safe_vote_count,
|
|
191
|
+
"abstain_vote_count": self.abstain_vote_count,
|
|
192
|
+
"weighted_threat_score": self.weighted_threat_score,
|
|
193
|
+
"weighted_safe_score": self.weighted_safe_score,
|
|
194
|
+
"weighted_ratio": ratio,
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
@dataclass(frozen=True)
|
|
199
|
+
class HeadOutput:
|
|
200
|
+
"""Raw output from a classifier head before voting.
|
|
201
|
+
|
|
202
|
+
This is an intermediate data structure used to pass head outputs
|
|
203
|
+
to the voting engine without coupling to GemmaClassificationResult.
|
|
204
|
+
|
|
205
|
+
Attributes:
|
|
206
|
+
head_name: Name of the head (binary, family, severity, technique, harm)
|
|
207
|
+
prediction: Predicted class label
|
|
208
|
+
confidence: Confidence in the prediction
|
|
209
|
+
probabilities: Full probability distribution (optional)
|
|
210
|
+
is_threat_indicator: Whether this prediction indicates a threat
|
|
211
|
+
"""
|
|
212
|
+
|
|
213
|
+
head_name: str
|
|
214
|
+
prediction: str
|
|
215
|
+
confidence: float
|
|
216
|
+
probabilities: tuple[float, ...] | None = None
|
|
217
|
+
is_threat_indicator: bool = False
|
|
218
|
+
|
|
219
|
+
def __post_init__(self) -> None:
|
|
220
|
+
"""Validate head output."""
|
|
221
|
+
if not 0.0 <= self.confidence <= 1.0:
|
|
222
|
+
raise ValueError(f"confidence must be 0-1, got {self.confidence}")
|
raxe/domain/models.py
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""Core domain models for RAXE CE.
|
|
2
|
+
|
|
3
|
+
All models are immutable value objects (frozen=True).
|
|
4
|
+
Pure domain layer - no I/O operations.
|
|
5
|
+
"""
|
|
6
|
+
from dataclasses import dataclass
|
|
7
|
+
from enum import Enum
|
|
8
|
+
|
|
9
|
+
# Re-export Detection and ScanResult from executor for convenience
|
|
10
|
+
from raxe.domain.engine.executor import Detection, ScanResult
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ThreatType(Enum):
|
|
14
|
+
"""Categories of threats.
|
|
15
|
+
|
|
16
|
+
Maps to rule families but provides more semantic categorization.
|
|
17
|
+
"""
|
|
18
|
+
PROMPT_INJECTION = "PROMPT_INJECTION"
|
|
19
|
+
JAILBREAK = "JAILBREAK"
|
|
20
|
+
PII_LEAK = "PII_LEAK"
|
|
21
|
+
DATA_EXFILTRATION = "DATA_EXFIL"
|
|
22
|
+
SECURITY = "SECURITY"
|
|
23
|
+
QUALITY = "QUALITY"
|
|
24
|
+
CUSTOM = "CUSTOM"
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@dataclass(frozen=True)
|
|
28
|
+
class ScanRequest:
|
|
29
|
+
"""Request to scan text for threats.
|
|
30
|
+
|
|
31
|
+
Immutable value object for scan input.
|
|
32
|
+
|
|
33
|
+
Attributes:
|
|
34
|
+
text: The text to scan for threats
|
|
35
|
+
context: Optional context metadata (user_id, session_id, etc.)
|
|
36
|
+
rule_filters: Optional list of rule IDs to apply (None = all rules)
|
|
37
|
+
max_text_length: Maximum allowed text length (default 1MB)
|
|
38
|
+
"""
|
|
39
|
+
text: str
|
|
40
|
+
context: dict[str, str] | None = None
|
|
41
|
+
rule_filters: list[str] | None = None
|
|
42
|
+
max_text_length: int = 1_000_000 # 1MB default limit
|
|
43
|
+
|
|
44
|
+
def __post_init__(self) -> None:
|
|
45
|
+
"""Validate request after construction.
|
|
46
|
+
|
|
47
|
+
Raises:
|
|
48
|
+
ValueError: If validation fails
|
|
49
|
+
"""
|
|
50
|
+
if not self.text:
|
|
51
|
+
raise ValueError("Text cannot be empty")
|
|
52
|
+
|
|
53
|
+
if len(self.text) > self.max_text_length:
|
|
54
|
+
raise ValueError(
|
|
55
|
+
f"Text exceeds maximum length of {self.max_text_length} "
|
|
56
|
+
f"(got {len(self.text)} chars)"
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
if self.rule_filters is not None and not self.rule_filters:
|
|
60
|
+
raise ValueError("rule_filters cannot be empty list (use None for all rules)")
|
|
61
|
+
|
|
62
|
+
@property
|
|
63
|
+
def text_length(self) -> int:
|
|
64
|
+
"""Length of text to scan."""
|
|
65
|
+
return len(self.text)
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
def has_filters(self) -> bool:
|
|
69
|
+
"""True if rule filters are specified."""
|
|
70
|
+
return self.rule_filters is not None
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
# Note: BlockAction and ScanPolicy have been removed.
|
|
74
|
+
# The advanced policy system in domain/policies/ replaces this functionality.
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
__all__ = [
|
|
78
|
+
"Detection",
|
|
79
|
+
"ScanRequest",
|
|
80
|
+
"ScanResult",
|
|
81
|
+
"ThreatType",
|
|
82
|
+
]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Domain models for rule packs.
|
|
2
|
+
|
|
3
|
+
Pure domain layer - NO I/O operations.
|
|
4
|
+
"""
|
|
5
|
+
from raxe.domain.packs.models import (
|
|
6
|
+
PackManifest,
|
|
7
|
+
PackRule,
|
|
8
|
+
PackType,
|
|
9
|
+
RulePack,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
"PackManifest",
|
|
14
|
+
"PackRule",
|
|
15
|
+
"PackType",
|
|
16
|
+
"RulePack",
|
|
17
|
+
]
|