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,845 @@
|
|
|
1
|
+
"""DSPy Integration.
|
|
2
|
+
|
|
3
|
+
This module provides RAXE integration with DSPy for automatic security
|
|
4
|
+
scanning of LLM pipelines and modules.
|
|
5
|
+
|
|
6
|
+
DSPy is a framework for programming language models through declarative
|
|
7
|
+
signatures and automatic optimization. RAXE integrates as a callback
|
|
8
|
+
to scan inputs/outputs at various stages of DSPy module execution.
|
|
9
|
+
|
|
10
|
+
Default behavior is LOG-ONLY (safe to add to production without breaking flows).
|
|
11
|
+
Enable blocking with appropriate ScanMode for strict mode.
|
|
12
|
+
|
|
13
|
+
Usage (Callback Mode):
|
|
14
|
+
import dspy
|
|
15
|
+
from raxe import Raxe
|
|
16
|
+
from raxe.sdk.integrations.dspy import RaxeDSPyCallback
|
|
17
|
+
|
|
18
|
+
# Create and register callback
|
|
19
|
+
callback = RaxeDSPyCallback(Raxe())
|
|
20
|
+
dspy.configure(callbacks=[callback])
|
|
21
|
+
|
|
22
|
+
# All DSPy module calls are now scanned
|
|
23
|
+
class MyModule(dspy.Module):
|
|
24
|
+
def forward(self, question):
|
|
25
|
+
...
|
|
26
|
+
|
|
27
|
+
Usage (Module Wrapper Mode):
|
|
28
|
+
from raxe.sdk.integrations.dspy import RaxeModuleGuard
|
|
29
|
+
|
|
30
|
+
# Create guard
|
|
31
|
+
guard = RaxeModuleGuard(Raxe())
|
|
32
|
+
|
|
33
|
+
# Wrap module
|
|
34
|
+
protected_module = guard.wrap_module(my_module)
|
|
35
|
+
|
|
36
|
+
# Calls are automatically scanned
|
|
37
|
+
result = protected_module(question="What is AI?")
|
|
38
|
+
|
|
39
|
+
For comprehensive tracing, combine with DSPy's built-in tracing:
|
|
40
|
+
with dspy.settings.trace():
|
|
41
|
+
result = protected_module(question="...")
|
|
42
|
+
history = dspy.settings.trace_history
|
|
43
|
+
"""
|
|
44
|
+
from __future__ import annotations
|
|
45
|
+
|
|
46
|
+
import logging
|
|
47
|
+
from dataclasses import dataclass
|
|
48
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
49
|
+
|
|
50
|
+
from raxe.sdk.agent_scanner import (
|
|
51
|
+
AgentScannerConfig,
|
|
52
|
+
MessageType,
|
|
53
|
+
ScanContext,
|
|
54
|
+
ThreatDetectedError,
|
|
55
|
+
create_agent_scanner,
|
|
56
|
+
)
|
|
57
|
+
from raxe.sdk.exceptions import SecurityException
|
|
58
|
+
|
|
59
|
+
if TYPE_CHECKING:
|
|
60
|
+
from raxe.sdk.client import Raxe
|
|
61
|
+
|
|
62
|
+
logger = logging.getLogger(__name__)
|
|
63
|
+
|
|
64
|
+
T = TypeVar("T")
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
# =============================================================================
|
|
68
|
+
# Configuration
|
|
69
|
+
# =============================================================================
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
@dataclass
|
|
73
|
+
class DSPyConfig:
|
|
74
|
+
"""Configuration for DSPy integration.
|
|
75
|
+
|
|
76
|
+
Attributes:
|
|
77
|
+
block_on_threats: Whether to raise exception on threat detection.
|
|
78
|
+
Default is False (log-only mode, safe for production).
|
|
79
|
+
scan_module_inputs: Scan inputs to DSPy modules.
|
|
80
|
+
scan_module_outputs: Scan outputs from DSPy modules.
|
|
81
|
+
scan_lm_prompts: Scan prompts sent to language models.
|
|
82
|
+
scan_lm_responses: Scan responses from language models.
|
|
83
|
+
scan_tool_calls: Scan tool/function call arguments.
|
|
84
|
+
scan_tool_results: Scan tool/function results.
|
|
85
|
+
|
|
86
|
+
Example:
|
|
87
|
+
# Log-only mode (default)
|
|
88
|
+
config = DSPyConfig()
|
|
89
|
+
|
|
90
|
+
# Blocking mode for LM calls
|
|
91
|
+
config = DSPyConfig(
|
|
92
|
+
block_on_threats=True,
|
|
93
|
+
scan_lm_prompts=True,
|
|
94
|
+
scan_lm_responses=True,
|
|
95
|
+
)
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
block_on_threats: bool = False
|
|
99
|
+
scan_module_inputs: bool = True
|
|
100
|
+
scan_module_outputs: bool = True
|
|
101
|
+
scan_lm_prompts: bool = True
|
|
102
|
+
scan_lm_responses: bool = True
|
|
103
|
+
scan_tool_calls: bool = True
|
|
104
|
+
scan_tool_results: bool = True
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
# =============================================================================
|
|
108
|
+
# Callback Handler
|
|
109
|
+
# =============================================================================
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class RaxeDSPyCallback:
|
|
113
|
+
"""DSPy callback handler for RAXE security scanning.
|
|
114
|
+
|
|
115
|
+
This class implements the DSPy BaseCallback interface to provide
|
|
116
|
+
automatic security scanning at various stages of module execution.
|
|
117
|
+
|
|
118
|
+
Attributes:
|
|
119
|
+
raxe: Raxe client for scanning
|
|
120
|
+
config: Integration configuration
|
|
121
|
+
|
|
122
|
+
Example:
|
|
123
|
+
import dspy
|
|
124
|
+
from raxe import Raxe
|
|
125
|
+
from raxe.sdk.integrations.dspy import RaxeDSPyCallback
|
|
126
|
+
|
|
127
|
+
# Create and register callback
|
|
128
|
+
callback = RaxeDSPyCallback(Raxe())
|
|
129
|
+
dspy.configure(callbacks=[callback])
|
|
130
|
+
|
|
131
|
+
# Define and run module
|
|
132
|
+
class QA(dspy.Module):
|
|
133
|
+
def forward(self, question):
|
|
134
|
+
return dspy.ChainOfThought("question -> answer")(question=question)
|
|
135
|
+
|
|
136
|
+
result = QA()(question="What is AI?")
|
|
137
|
+
"""
|
|
138
|
+
|
|
139
|
+
def __init__(
|
|
140
|
+
self,
|
|
141
|
+
raxe: "Raxe | None" = None,
|
|
142
|
+
config: DSPyConfig | None = None,
|
|
143
|
+
) -> None:
|
|
144
|
+
"""Initialize DSPy callback handler.
|
|
145
|
+
|
|
146
|
+
Args:
|
|
147
|
+
raxe: Raxe client for scanning. Created if not provided.
|
|
148
|
+
config: Integration configuration. Uses defaults if not provided.
|
|
149
|
+
"""
|
|
150
|
+
if raxe is None:
|
|
151
|
+
from raxe.sdk.client import Raxe
|
|
152
|
+
|
|
153
|
+
raxe = Raxe()
|
|
154
|
+
|
|
155
|
+
self.raxe = raxe
|
|
156
|
+
self.config = config or DSPyConfig()
|
|
157
|
+
|
|
158
|
+
# Create AgentScanner for unified scanning with integration telemetry
|
|
159
|
+
scanner_config = AgentScannerConfig(
|
|
160
|
+
scan_prompts=True,
|
|
161
|
+
scan_responses=True,
|
|
162
|
+
on_threat="block" if self.config.block_on_threats else "log",
|
|
163
|
+
)
|
|
164
|
+
self._scanner = create_agent_scanner(raxe, scanner_config, integration_type="dspy")
|
|
165
|
+
|
|
166
|
+
# Statistics
|
|
167
|
+
self._stats = {
|
|
168
|
+
"module_calls": 0,
|
|
169
|
+
"lm_calls": 0,
|
|
170
|
+
"tool_calls": 0,
|
|
171
|
+
"threats_detected": 0,
|
|
172
|
+
"threats_blocked": 0,
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
logger.debug(
|
|
176
|
+
f"RaxeDSPyCallback initialized: block={self.config.block_on_threats}"
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
def on_module_start(
|
|
180
|
+
self,
|
|
181
|
+
call_id: str,
|
|
182
|
+
instance: Any,
|
|
183
|
+
inputs: dict[str, Any],
|
|
184
|
+
) -> None:
|
|
185
|
+
"""Called when a DSPy Module starts execution.
|
|
186
|
+
|
|
187
|
+
Args:
|
|
188
|
+
call_id: Unique identifier for this call
|
|
189
|
+
instance: Module instance
|
|
190
|
+
inputs: Input arguments to the module
|
|
191
|
+
"""
|
|
192
|
+
self._stats["module_calls"] += 1
|
|
193
|
+
|
|
194
|
+
if not self.config.scan_module_inputs:
|
|
195
|
+
return
|
|
196
|
+
|
|
197
|
+
try:
|
|
198
|
+
# Extract and scan text from inputs
|
|
199
|
+
for key, value in inputs.items():
|
|
200
|
+
text = self._extract_text(value)
|
|
201
|
+
if text and text.strip():
|
|
202
|
+
self._scan_text(
|
|
203
|
+
text,
|
|
204
|
+
scan_type="prompt",
|
|
205
|
+
context_source="module_input",
|
|
206
|
+
context_key=key,
|
|
207
|
+
call_id=call_id,
|
|
208
|
+
)
|
|
209
|
+
except ThreatDetectedError:
|
|
210
|
+
raise
|
|
211
|
+
except Exception as e:
|
|
212
|
+
logger.error(
|
|
213
|
+
"dspy_module_input_scan_error",
|
|
214
|
+
extra={"error": str(e), "call_id": call_id},
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
def on_module_end(
|
|
218
|
+
self,
|
|
219
|
+
call_id: str,
|
|
220
|
+
outputs: Any,
|
|
221
|
+
exception: Exception | None,
|
|
222
|
+
) -> None:
|
|
223
|
+
"""Called when a DSPy Module completes execution.
|
|
224
|
+
|
|
225
|
+
Args:
|
|
226
|
+
call_id: Unique identifier for this call
|
|
227
|
+
outputs: Output from the module
|
|
228
|
+
exception: Exception if module failed
|
|
229
|
+
"""
|
|
230
|
+
if exception is not None or not self.config.scan_module_outputs:
|
|
231
|
+
return
|
|
232
|
+
|
|
233
|
+
try:
|
|
234
|
+
# Extract and scan text from outputs
|
|
235
|
+
if hasattr(outputs, "__dict__"):
|
|
236
|
+
for key, value in vars(outputs).items():
|
|
237
|
+
if not key.startswith("_"):
|
|
238
|
+
text = self._extract_text(value)
|
|
239
|
+
if text and text.strip():
|
|
240
|
+
self._scan_text(
|
|
241
|
+
text,
|
|
242
|
+
scan_type="response",
|
|
243
|
+
context_source="module_output",
|
|
244
|
+
context_key=key,
|
|
245
|
+
call_id=call_id,
|
|
246
|
+
)
|
|
247
|
+
else:
|
|
248
|
+
text = self._extract_text(outputs)
|
|
249
|
+
if text and text.strip():
|
|
250
|
+
self._scan_text(
|
|
251
|
+
text,
|
|
252
|
+
scan_type="response",
|
|
253
|
+
context_source="module_output",
|
|
254
|
+
call_id=call_id,
|
|
255
|
+
)
|
|
256
|
+
except ThreatDetectedError:
|
|
257
|
+
raise
|
|
258
|
+
except Exception as e:
|
|
259
|
+
logger.error(
|
|
260
|
+
"dspy_module_output_scan_error",
|
|
261
|
+
extra={"error": str(e), "call_id": call_id},
|
|
262
|
+
)
|
|
263
|
+
|
|
264
|
+
def on_lm_start(
|
|
265
|
+
self,
|
|
266
|
+
call_id: str,
|
|
267
|
+
instance: Any,
|
|
268
|
+
inputs: dict[str, Any],
|
|
269
|
+
) -> None:
|
|
270
|
+
"""Called when a DSPy LM (language model) call starts.
|
|
271
|
+
|
|
272
|
+
Args:
|
|
273
|
+
call_id: Unique identifier for this call
|
|
274
|
+
instance: LM instance
|
|
275
|
+
inputs: Input to the LM (prompt, messages, etc.)
|
|
276
|
+
"""
|
|
277
|
+
self._stats["lm_calls"] += 1
|
|
278
|
+
|
|
279
|
+
if not self.config.scan_lm_prompts:
|
|
280
|
+
return
|
|
281
|
+
|
|
282
|
+
try:
|
|
283
|
+
# Extract prompt text
|
|
284
|
+
prompt = inputs.get("prompt", "")
|
|
285
|
+
messages = inputs.get("messages", [])
|
|
286
|
+
|
|
287
|
+
if prompt and isinstance(prompt, str) and prompt.strip():
|
|
288
|
+
self._scan_text(
|
|
289
|
+
prompt,
|
|
290
|
+
scan_type="prompt",
|
|
291
|
+
context_source="lm_prompt",
|
|
292
|
+
call_id=call_id,
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
if messages:
|
|
296
|
+
for msg in messages:
|
|
297
|
+
if isinstance(msg, dict):
|
|
298
|
+
role = msg.get("role", "")
|
|
299
|
+
content = msg.get("content", "")
|
|
300
|
+
if role == "user" and content:
|
|
301
|
+
text = self._extract_text(content)
|
|
302
|
+
if text and text.strip():
|
|
303
|
+
self._scan_text(
|
|
304
|
+
text,
|
|
305
|
+
scan_type="prompt",
|
|
306
|
+
context_source="lm_message",
|
|
307
|
+
call_id=call_id,
|
|
308
|
+
)
|
|
309
|
+
|
|
310
|
+
except ThreatDetectedError:
|
|
311
|
+
raise
|
|
312
|
+
except Exception as e:
|
|
313
|
+
logger.error(
|
|
314
|
+
"dspy_lm_prompt_scan_error",
|
|
315
|
+
extra={"error": str(e), "call_id": call_id},
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
def on_lm_end(
|
|
319
|
+
self,
|
|
320
|
+
call_id: str,
|
|
321
|
+
outputs: Any,
|
|
322
|
+
exception: Exception | None,
|
|
323
|
+
) -> None:
|
|
324
|
+
"""Called when a DSPy LM call completes.
|
|
325
|
+
|
|
326
|
+
Args:
|
|
327
|
+
call_id: Unique identifier for this call
|
|
328
|
+
outputs: LM response
|
|
329
|
+
exception: Exception if LM call failed
|
|
330
|
+
"""
|
|
331
|
+
if exception is not None or not self.config.scan_lm_responses:
|
|
332
|
+
return
|
|
333
|
+
|
|
334
|
+
try:
|
|
335
|
+
# Extract response text
|
|
336
|
+
text = self._extract_text(outputs)
|
|
337
|
+
if text and text.strip():
|
|
338
|
+
self._scan_text(
|
|
339
|
+
text,
|
|
340
|
+
scan_type="response",
|
|
341
|
+
context_source="lm_response",
|
|
342
|
+
call_id=call_id,
|
|
343
|
+
)
|
|
344
|
+
except ThreatDetectedError:
|
|
345
|
+
raise
|
|
346
|
+
except Exception as e:
|
|
347
|
+
logger.error(
|
|
348
|
+
"dspy_lm_response_scan_error",
|
|
349
|
+
extra={"error": str(e), "call_id": call_id},
|
|
350
|
+
)
|
|
351
|
+
|
|
352
|
+
def on_tool_start(
|
|
353
|
+
self,
|
|
354
|
+
call_id: str,
|
|
355
|
+
instance: Any,
|
|
356
|
+
inputs: dict[str, Any],
|
|
357
|
+
) -> None:
|
|
358
|
+
"""Called when a DSPy Tool call starts.
|
|
359
|
+
|
|
360
|
+
Args:
|
|
361
|
+
call_id: Unique identifier for this call
|
|
362
|
+
instance: Tool instance
|
|
363
|
+
inputs: Tool input arguments
|
|
364
|
+
"""
|
|
365
|
+
self._stats["tool_calls"] += 1
|
|
366
|
+
|
|
367
|
+
if not self.config.scan_tool_calls:
|
|
368
|
+
return
|
|
369
|
+
|
|
370
|
+
try:
|
|
371
|
+
# Scan tool arguments
|
|
372
|
+
for key, value in inputs.items():
|
|
373
|
+
text = self._extract_text(value)
|
|
374
|
+
if text and text.strip():
|
|
375
|
+
self._scan_text(
|
|
376
|
+
text,
|
|
377
|
+
scan_type="prompt",
|
|
378
|
+
context_source="tool_input",
|
|
379
|
+
context_key=key,
|
|
380
|
+
call_id=call_id,
|
|
381
|
+
)
|
|
382
|
+
except ThreatDetectedError:
|
|
383
|
+
raise
|
|
384
|
+
except Exception as e:
|
|
385
|
+
logger.error(
|
|
386
|
+
"dspy_tool_input_scan_error",
|
|
387
|
+
extra={"error": str(e), "call_id": call_id},
|
|
388
|
+
)
|
|
389
|
+
|
|
390
|
+
def on_tool_end(
|
|
391
|
+
self,
|
|
392
|
+
call_id: str,
|
|
393
|
+
outputs: Any,
|
|
394
|
+
exception: Exception | None,
|
|
395
|
+
) -> None:
|
|
396
|
+
"""Called when a DSPy Tool call completes.
|
|
397
|
+
|
|
398
|
+
Args:
|
|
399
|
+
call_id: Unique identifier for this call
|
|
400
|
+
outputs: Tool output
|
|
401
|
+
exception: Exception if tool failed
|
|
402
|
+
"""
|
|
403
|
+
if exception is not None or not self.config.scan_tool_results:
|
|
404
|
+
return
|
|
405
|
+
|
|
406
|
+
try:
|
|
407
|
+
text = self._extract_text(outputs)
|
|
408
|
+
if text and text.strip():
|
|
409
|
+
self._scan_text(
|
|
410
|
+
text,
|
|
411
|
+
scan_type="response",
|
|
412
|
+
context_source="tool_output",
|
|
413
|
+
call_id=call_id,
|
|
414
|
+
)
|
|
415
|
+
except ThreatDetectedError:
|
|
416
|
+
raise
|
|
417
|
+
except Exception as e:
|
|
418
|
+
logger.error(
|
|
419
|
+
"dspy_tool_output_scan_error",
|
|
420
|
+
extra={"error": str(e), "call_id": call_id},
|
|
421
|
+
)
|
|
422
|
+
|
|
423
|
+
def on_adapter_format_start(
|
|
424
|
+
self,
|
|
425
|
+
call_id: str,
|
|
426
|
+
instance: Any,
|
|
427
|
+
inputs: dict[str, Any],
|
|
428
|
+
) -> None:
|
|
429
|
+
"""Called when adapter starts formatting prompt."""
|
|
430
|
+
pass # Not scanning adapter formatting
|
|
431
|
+
|
|
432
|
+
def on_adapter_format_end(
|
|
433
|
+
self,
|
|
434
|
+
call_id: str,
|
|
435
|
+
outputs: Any,
|
|
436
|
+
exception: Exception | None,
|
|
437
|
+
) -> None:
|
|
438
|
+
"""Called when adapter finishes formatting prompt."""
|
|
439
|
+
pass # Not scanning adapter formatting
|
|
440
|
+
|
|
441
|
+
def on_adapter_parse_start(
|
|
442
|
+
self,
|
|
443
|
+
call_id: str,
|
|
444
|
+
instance: Any,
|
|
445
|
+
inputs: dict[str, Any],
|
|
446
|
+
) -> None:
|
|
447
|
+
"""Called when adapter starts parsing output."""
|
|
448
|
+
pass # Not scanning adapter parsing
|
|
449
|
+
|
|
450
|
+
def on_adapter_parse_end(
|
|
451
|
+
self,
|
|
452
|
+
call_id: str,
|
|
453
|
+
outputs: Any,
|
|
454
|
+
exception: Exception | None,
|
|
455
|
+
) -> None:
|
|
456
|
+
"""Called when adapter finishes parsing output."""
|
|
457
|
+
pass # Not scanning adapter parsing
|
|
458
|
+
|
|
459
|
+
def on_evaluate_start(
|
|
460
|
+
self,
|
|
461
|
+
call_id: str,
|
|
462
|
+
instance: Any,
|
|
463
|
+
inputs: dict[str, Any],
|
|
464
|
+
) -> None:
|
|
465
|
+
"""Called when evaluation starts."""
|
|
466
|
+
pass # Not scanning evaluation
|
|
467
|
+
|
|
468
|
+
def on_evaluate_end(
|
|
469
|
+
self,
|
|
470
|
+
call_id: str,
|
|
471
|
+
outputs: Any,
|
|
472
|
+
exception: Exception | None,
|
|
473
|
+
) -> None:
|
|
474
|
+
"""Called when evaluation ends."""
|
|
475
|
+
pass # Not scanning evaluation
|
|
476
|
+
|
|
477
|
+
def _scan_text(
|
|
478
|
+
self,
|
|
479
|
+
text: str,
|
|
480
|
+
scan_type: str,
|
|
481
|
+
context_source: str,
|
|
482
|
+
context_key: str | None = None,
|
|
483
|
+
call_id: str | None = None,
|
|
484
|
+
) -> None:
|
|
485
|
+
"""Scan text for threats.
|
|
486
|
+
|
|
487
|
+
Args:
|
|
488
|
+
text: Text to scan
|
|
489
|
+
scan_type: "prompt" or "response"
|
|
490
|
+
context_source: Source of the text (module_input, lm_prompt, etc.)
|
|
491
|
+
context_key: Optional key/field name
|
|
492
|
+
call_id: Optional call identifier
|
|
493
|
+
|
|
494
|
+
Raises:
|
|
495
|
+
ThreatDetectedError: If blocking is enabled and threat detected
|
|
496
|
+
"""
|
|
497
|
+
if scan_type == "prompt":
|
|
498
|
+
result = self._scanner.scan_prompt(text)
|
|
499
|
+
else:
|
|
500
|
+
result = self._scanner.scan_response(text)
|
|
501
|
+
|
|
502
|
+
if result.has_threats:
|
|
503
|
+
self._stats["threats_detected"] += 1
|
|
504
|
+
logger.warning(
|
|
505
|
+
"dspy_threat_detected",
|
|
506
|
+
extra={
|
|
507
|
+
"source": context_source,
|
|
508
|
+
"key": context_key,
|
|
509
|
+
"severity": result.severity,
|
|
510
|
+
"rule_ids": result.rule_ids,
|
|
511
|
+
"call_id": call_id,
|
|
512
|
+
},
|
|
513
|
+
)
|
|
514
|
+
|
|
515
|
+
if result.should_block:
|
|
516
|
+
self._stats["threats_blocked"] += 1
|
|
517
|
+
raise ThreatDetectedError(result)
|
|
518
|
+
|
|
519
|
+
def _extract_text(self, value: Any) -> str:
|
|
520
|
+
"""Extract text from various value types.
|
|
521
|
+
|
|
522
|
+
Args:
|
|
523
|
+
value: Value to extract text from
|
|
524
|
+
|
|
525
|
+
Returns:
|
|
526
|
+
Extracted text string
|
|
527
|
+
"""
|
|
528
|
+
if isinstance(value, str):
|
|
529
|
+
return value
|
|
530
|
+
|
|
531
|
+
if isinstance(value, list):
|
|
532
|
+
texts = []
|
|
533
|
+
for item in value:
|
|
534
|
+
text = self._extract_text(item)
|
|
535
|
+
if text:
|
|
536
|
+
texts.append(text)
|
|
537
|
+
return " ".join(texts)
|
|
538
|
+
|
|
539
|
+
if isinstance(value, dict):
|
|
540
|
+
# Handle message dict
|
|
541
|
+
if "content" in value:
|
|
542
|
+
return self._extract_text(value["content"])
|
|
543
|
+
if "text" in value:
|
|
544
|
+
return value["text"]
|
|
545
|
+
|
|
546
|
+
# Try to convert to string
|
|
547
|
+
if value is not None:
|
|
548
|
+
try:
|
|
549
|
+
return str(value)
|
|
550
|
+
except Exception:
|
|
551
|
+
pass
|
|
552
|
+
|
|
553
|
+
return ""
|
|
554
|
+
|
|
555
|
+
@property
|
|
556
|
+
def stats(self) -> dict[str, int]:
|
|
557
|
+
"""Get callback statistics."""
|
|
558
|
+
return self._stats.copy()
|
|
559
|
+
|
|
560
|
+
def reset_stats(self) -> None:
|
|
561
|
+
"""Reset statistics."""
|
|
562
|
+
self._stats = {
|
|
563
|
+
"module_calls": 0,
|
|
564
|
+
"lm_calls": 0,
|
|
565
|
+
"tool_calls": 0,
|
|
566
|
+
"threats_detected": 0,
|
|
567
|
+
"threats_blocked": 0,
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
def __repr__(self) -> str:
|
|
571
|
+
"""String representation."""
|
|
572
|
+
return (
|
|
573
|
+
f"RaxeDSPyCallback(block_on_threats={self.config.block_on_threats}, "
|
|
574
|
+
f"scan_lm_prompts={self.config.scan_lm_prompts})"
|
|
575
|
+
)
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
# =============================================================================
|
|
579
|
+
# Module Guard Wrapper
|
|
580
|
+
# =============================================================================
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
class RaxeModuleGuard:
|
|
584
|
+
"""Guard wrapper for DSPy modules.
|
|
585
|
+
|
|
586
|
+
Wraps a DSPy module to automatically scan inputs and outputs.
|
|
587
|
+
Useful when you can't or don't want to use global callbacks.
|
|
588
|
+
|
|
589
|
+
Attributes:
|
|
590
|
+
raxe: Raxe client for scanning
|
|
591
|
+
config: Guard configuration
|
|
592
|
+
|
|
593
|
+
Example:
|
|
594
|
+
from raxe import Raxe
|
|
595
|
+
from raxe.sdk.integrations.dspy import RaxeModuleGuard
|
|
596
|
+
|
|
597
|
+
guard = RaxeModuleGuard(Raxe())
|
|
598
|
+
|
|
599
|
+
# Wrap module
|
|
600
|
+
protected = guard.wrap_module(my_module)
|
|
601
|
+
|
|
602
|
+
# Use protected module
|
|
603
|
+
result = protected(question="What is AI?")
|
|
604
|
+
"""
|
|
605
|
+
|
|
606
|
+
def __init__(
|
|
607
|
+
self,
|
|
608
|
+
raxe: "Raxe | None" = None,
|
|
609
|
+
config: DSPyConfig | None = None,
|
|
610
|
+
) -> None:
|
|
611
|
+
"""Initialize module guard.
|
|
612
|
+
|
|
613
|
+
Args:
|
|
614
|
+
raxe: Raxe client for scanning. Created if not provided.
|
|
615
|
+
config: Guard configuration. Uses defaults if not provided.
|
|
616
|
+
"""
|
|
617
|
+
if raxe is None:
|
|
618
|
+
from raxe.sdk.client import Raxe
|
|
619
|
+
|
|
620
|
+
raxe = Raxe()
|
|
621
|
+
|
|
622
|
+
self.raxe = raxe
|
|
623
|
+
self.config = config or DSPyConfig()
|
|
624
|
+
|
|
625
|
+
# Create AgentScanner
|
|
626
|
+
scanner_config = AgentScannerConfig(
|
|
627
|
+
scan_prompts=True,
|
|
628
|
+
scan_responses=True,
|
|
629
|
+
on_threat="block" if self.config.block_on_threats else "log",
|
|
630
|
+
)
|
|
631
|
+
self._scanner = create_agent_scanner(raxe, scanner_config, integration_type="dspy")
|
|
632
|
+
|
|
633
|
+
# Statistics
|
|
634
|
+
self._stats = {
|
|
635
|
+
"total_calls": 0,
|
|
636
|
+
"threats_detected": 0,
|
|
637
|
+
"threats_blocked": 0,
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
def wrap_module(self, module: T) -> T:
|
|
641
|
+
"""Wrap a DSPy module with RAXE scanning.
|
|
642
|
+
|
|
643
|
+
Args:
|
|
644
|
+
module: DSPy module to wrap
|
|
645
|
+
|
|
646
|
+
Returns:
|
|
647
|
+
Wrapped module with scanning enabled
|
|
648
|
+
"""
|
|
649
|
+
return _ModuleWrapper(module, self) # type: ignore
|
|
650
|
+
|
|
651
|
+
def scan_inputs(self, inputs: dict[str, Any]) -> None:
|
|
652
|
+
"""Scan module inputs for threats.
|
|
653
|
+
|
|
654
|
+
Args:
|
|
655
|
+
inputs: Input arguments
|
|
656
|
+
|
|
657
|
+
Raises:
|
|
658
|
+
ThreatDetectedError: If blocking and threat detected
|
|
659
|
+
"""
|
|
660
|
+
self._stats["total_calls"] += 1
|
|
661
|
+
|
|
662
|
+
if not self.config.scan_module_inputs:
|
|
663
|
+
return
|
|
664
|
+
|
|
665
|
+
for key, value in inputs.items():
|
|
666
|
+
text = self._extract_text(value)
|
|
667
|
+
if text and text.strip():
|
|
668
|
+
result = self._scanner.scan_prompt(text)
|
|
669
|
+
|
|
670
|
+
if result.has_threats:
|
|
671
|
+
self._stats["threats_detected"] += 1
|
|
672
|
+
logger.warning(
|
|
673
|
+
"dspy_guard_input_threat",
|
|
674
|
+
extra={
|
|
675
|
+
"key": key,
|
|
676
|
+
"severity": result.severity,
|
|
677
|
+
"rule_ids": result.rule_ids,
|
|
678
|
+
},
|
|
679
|
+
)
|
|
680
|
+
|
|
681
|
+
if result.should_block:
|
|
682
|
+
self._stats["threats_blocked"] += 1
|
|
683
|
+
raise ThreatDetectedError(result)
|
|
684
|
+
|
|
685
|
+
def scan_outputs(self, outputs: Any) -> None:
|
|
686
|
+
"""Scan module outputs for threats.
|
|
687
|
+
|
|
688
|
+
Args:
|
|
689
|
+
outputs: Module outputs
|
|
690
|
+
"""
|
|
691
|
+
if not self.config.scan_module_outputs:
|
|
692
|
+
return
|
|
693
|
+
|
|
694
|
+
if hasattr(outputs, "__dict__"):
|
|
695
|
+
for key, value in vars(outputs).items():
|
|
696
|
+
if not key.startswith("_"):
|
|
697
|
+
text = self._extract_text(value)
|
|
698
|
+
if text and text.strip():
|
|
699
|
+
result = self._scanner.scan_response(text)
|
|
700
|
+
|
|
701
|
+
if result.has_threats:
|
|
702
|
+
self._stats["threats_detected"] += 1
|
|
703
|
+
logger.warning(
|
|
704
|
+
"dspy_guard_output_threat",
|
|
705
|
+
extra={
|
|
706
|
+
"key": key,
|
|
707
|
+
"severity": result.severity,
|
|
708
|
+
"rule_ids": result.rule_ids,
|
|
709
|
+
},
|
|
710
|
+
)
|
|
711
|
+
else:
|
|
712
|
+
text = self._extract_text(outputs)
|
|
713
|
+
if text and text.strip():
|
|
714
|
+
result = self._scanner.scan_response(text)
|
|
715
|
+
|
|
716
|
+
if result.has_threats:
|
|
717
|
+
self._stats["threats_detected"] += 1
|
|
718
|
+
logger.warning(
|
|
719
|
+
"dspy_guard_output_threat",
|
|
720
|
+
extra={
|
|
721
|
+
"severity": result.severity,
|
|
722
|
+
"rule_ids": result.rule_ids,
|
|
723
|
+
},
|
|
724
|
+
)
|
|
725
|
+
|
|
726
|
+
def _extract_text(self, value: Any) -> str:
|
|
727
|
+
"""Extract text from value."""
|
|
728
|
+
if isinstance(value, str):
|
|
729
|
+
return value
|
|
730
|
+
|
|
731
|
+
if isinstance(value, list):
|
|
732
|
+
texts = [self._extract_text(v) for v in value]
|
|
733
|
+
return " ".join(filter(None, texts))
|
|
734
|
+
|
|
735
|
+
if value is not None:
|
|
736
|
+
try:
|
|
737
|
+
return str(value)
|
|
738
|
+
except Exception:
|
|
739
|
+
pass
|
|
740
|
+
|
|
741
|
+
return ""
|
|
742
|
+
|
|
743
|
+
@property
|
|
744
|
+
def stats(self) -> dict[str, int]:
|
|
745
|
+
"""Get guard statistics."""
|
|
746
|
+
return self._stats.copy()
|
|
747
|
+
|
|
748
|
+
def reset_stats(self) -> None:
|
|
749
|
+
"""Reset statistics."""
|
|
750
|
+
self._stats = {
|
|
751
|
+
"total_calls": 0,
|
|
752
|
+
"threats_detected": 0,
|
|
753
|
+
"threats_blocked": 0,
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
class _ModuleWrapper:
|
|
758
|
+
"""Internal wrapper for DSPy modules."""
|
|
759
|
+
|
|
760
|
+
def __init__(self, module: Any, guard: RaxeModuleGuard) -> None:
|
|
761
|
+
self._module = module
|
|
762
|
+
self._guard = guard
|
|
763
|
+
|
|
764
|
+
def __call__(self, **kwargs: Any) -> Any:
|
|
765
|
+
"""Execute wrapped module with scanning."""
|
|
766
|
+
# Scan inputs
|
|
767
|
+
self._guard.scan_inputs(kwargs)
|
|
768
|
+
|
|
769
|
+
# Execute module
|
|
770
|
+
result = self._module(**kwargs)
|
|
771
|
+
|
|
772
|
+
# Scan outputs
|
|
773
|
+
self._guard.scan_outputs(result)
|
|
774
|
+
|
|
775
|
+
return result
|
|
776
|
+
|
|
777
|
+
def __getattr__(self, name: str) -> Any:
|
|
778
|
+
"""Proxy attribute access to wrapped module."""
|
|
779
|
+
return getattr(self._module, name)
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
# =============================================================================
|
|
783
|
+
# Convenience Factory Functions
|
|
784
|
+
# =============================================================================
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
def create_dspy_callback(
|
|
788
|
+
raxe: "Raxe | None" = None,
|
|
789
|
+
*,
|
|
790
|
+
block_on_threats: bool = False,
|
|
791
|
+
scan_lm_prompts: bool = True,
|
|
792
|
+
scan_lm_responses: bool = True,
|
|
793
|
+
) -> RaxeDSPyCallback:
|
|
794
|
+
"""Create a DSPy callback handler.
|
|
795
|
+
|
|
796
|
+
Factory function for creating a configured callback handler.
|
|
797
|
+
|
|
798
|
+
Args:
|
|
799
|
+
raxe: Raxe client. Created if not provided.
|
|
800
|
+
block_on_threats: Whether to block on threat detection.
|
|
801
|
+
scan_lm_prompts: Whether to scan LM prompts.
|
|
802
|
+
scan_lm_responses: Whether to scan LM responses.
|
|
803
|
+
|
|
804
|
+
Returns:
|
|
805
|
+
Configured RaxeDSPyCallback
|
|
806
|
+
|
|
807
|
+
Example:
|
|
808
|
+
import dspy
|
|
809
|
+
from raxe.sdk.integrations.dspy import create_dspy_callback
|
|
810
|
+
|
|
811
|
+
callback = create_dspy_callback(block_on_threats=True)
|
|
812
|
+
dspy.configure(callbacks=[callback])
|
|
813
|
+
"""
|
|
814
|
+
config = DSPyConfig(
|
|
815
|
+
block_on_threats=block_on_threats,
|
|
816
|
+
scan_lm_prompts=scan_lm_prompts,
|
|
817
|
+
scan_lm_responses=scan_lm_responses,
|
|
818
|
+
)
|
|
819
|
+
return RaxeDSPyCallback(raxe, config)
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
def create_module_guard(
|
|
823
|
+
raxe: "Raxe | None" = None,
|
|
824
|
+
*,
|
|
825
|
+
block_on_threats: bool = False,
|
|
826
|
+
) -> RaxeModuleGuard:
|
|
827
|
+
"""Create a DSPy module guard.
|
|
828
|
+
|
|
829
|
+
Factory function for creating a module guard.
|
|
830
|
+
|
|
831
|
+
Args:
|
|
832
|
+
raxe: Raxe client. Created if not provided.
|
|
833
|
+
block_on_threats: Whether to block on threat detection.
|
|
834
|
+
|
|
835
|
+
Returns:
|
|
836
|
+
Configured RaxeModuleGuard
|
|
837
|
+
|
|
838
|
+
Example:
|
|
839
|
+
from raxe.sdk.integrations.dspy import create_module_guard
|
|
840
|
+
|
|
841
|
+
guard = create_module_guard(block_on_threats=True)
|
|
842
|
+
protected = guard.wrap_module(my_module)
|
|
843
|
+
"""
|
|
844
|
+
config = DSPyConfig(block_on_threats=block_on_threats)
|
|
845
|
+
return RaxeModuleGuard(raxe, config)
|