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,221 @@
|
|
|
1
|
+
"""OpenAI client wrapper with automatic RAXE scanning.
|
|
2
|
+
|
|
3
|
+
Drop-in replacement for openai.OpenAI that scans all prompts and responses.
|
|
4
|
+
|
|
5
|
+
This wrapper allows users to replace:
|
|
6
|
+
from openai import OpenAI
|
|
7
|
+
client = OpenAI()
|
|
8
|
+
|
|
9
|
+
With:
|
|
10
|
+
from raxe import RaxeOpenAI
|
|
11
|
+
client = RaxeOpenAI() # All calls automatically scanned
|
|
12
|
+
|
|
13
|
+
The wrapper intercepts chat.completions.create calls, scans user messages
|
|
14
|
+
before sending to OpenAI, and optionally scans responses.
|
|
15
|
+
|
|
16
|
+
Default behavior is LOG-ONLY (safe to add to production without breaking flows).
|
|
17
|
+
Enable blocking with `raxe_block_on_threat=True` for strict mode.
|
|
18
|
+
"""
|
|
19
|
+
from __future__ import annotations
|
|
20
|
+
|
|
21
|
+
import logging
|
|
22
|
+
from typing import TYPE_CHECKING, Any
|
|
23
|
+
|
|
24
|
+
from raxe.sdk.agent_scanner import (
|
|
25
|
+
AgentScanner,
|
|
26
|
+
AgentScannerConfig,
|
|
27
|
+
ScanType,
|
|
28
|
+
create_agent_scanner,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
if TYPE_CHECKING:
|
|
32
|
+
from raxe.sdk.client import Raxe
|
|
33
|
+
|
|
34
|
+
# Try to import OpenAI at module level
|
|
35
|
+
try:
|
|
36
|
+
from openai import OpenAI
|
|
37
|
+
except ImportError:
|
|
38
|
+
# Create a dummy class if OpenAI is not installed
|
|
39
|
+
class OpenAI:
|
|
40
|
+
def __init__(self, *args, **kwargs):
|
|
41
|
+
raise ImportError(
|
|
42
|
+
"openai package is required for RaxeOpenAI. "
|
|
43
|
+
"Install with: pip install openai"
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
logger = logging.getLogger(__name__)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class RaxeOpenAI(OpenAI):
|
|
50
|
+
"""Drop-in replacement for openai.OpenAI with automatic scanning.
|
|
51
|
+
|
|
52
|
+
This wrapper inherits from OpenAI client and intercepts all
|
|
53
|
+
chat.completions.create calls to scan prompts and responses.
|
|
54
|
+
|
|
55
|
+
Usage:
|
|
56
|
+
# Instead of:
|
|
57
|
+
from openai import OpenAI
|
|
58
|
+
client = OpenAI(api_key="sk-...")
|
|
59
|
+
|
|
60
|
+
# Use:
|
|
61
|
+
from raxe import RaxeOpenAI
|
|
62
|
+
client = RaxeOpenAI(api_key="sk-...")
|
|
63
|
+
|
|
64
|
+
# All chat.completions.create calls are automatically scanned
|
|
65
|
+
response = client.chat.completions.create(
|
|
66
|
+
model="gpt-4",
|
|
67
|
+
messages=[{"role": "user", "content": "Hello"}]
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
Attributes:
|
|
71
|
+
raxe: Raxe client instance for scanning
|
|
72
|
+
raxe_block_on_threat: Whether to block requests on threat detection
|
|
73
|
+
raxe_scan_responses: Whether to scan OpenAI responses
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
def __init__(
|
|
77
|
+
self,
|
|
78
|
+
*args,
|
|
79
|
+
raxe: Raxe | None = None,
|
|
80
|
+
raxe_block_on_threat: bool = False,
|
|
81
|
+
raxe_scan_responses: bool = True,
|
|
82
|
+
**kwargs
|
|
83
|
+
):
|
|
84
|
+
"""Initialize RaxeOpenAI client.
|
|
85
|
+
|
|
86
|
+
Args:
|
|
87
|
+
*args: Passed to OpenAI.__init__
|
|
88
|
+
raxe: Optional Raxe client (creates default if not provided)
|
|
89
|
+
raxe_block_on_threat: Block requests on threat detection.
|
|
90
|
+
Default is False (log-only mode, safe for production).
|
|
91
|
+
raxe_scan_responses: Also scan OpenAI responses
|
|
92
|
+
**kwargs: Passed to OpenAI.__init__
|
|
93
|
+
|
|
94
|
+
Example:
|
|
95
|
+
# With default Raxe client (log-only mode)
|
|
96
|
+
client = RaxeOpenAI(api_key="sk-...")
|
|
97
|
+
|
|
98
|
+
# With custom Raxe client
|
|
99
|
+
raxe = Raxe(telemetry=False)
|
|
100
|
+
client = RaxeOpenAI(api_key="sk-...", raxe=raxe)
|
|
101
|
+
|
|
102
|
+
# Enable blocking (strict mode)
|
|
103
|
+
client = RaxeOpenAI(
|
|
104
|
+
api_key="sk-...",
|
|
105
|
+
raxe_block_on_threat=True
|
|
106
|
+
)
|
|
107
|
+
"""
|
|
108
|
+
# Initialize parent OpenAI client
|
|
109
|
+
super().__init__(*args, **kwargs)
|
|
110
|
+
|
|
111
|
+
# Create or use provided Raxe client
|
|
112
|
+
if raxe is None:
|
|
113
|
+
from raxe.sdk.client import Raxe
|
|
114
|
+
raxe = Raxe()
|
|
115
|
+
|
|
116
|
+
self.raxe = raxe
|
|
117
|
+
self.raxe_block_on_threat = raxe_block_on_threat
|
|
118
|
+
self.raxe_scan_responses = raxe_scan_responses
|
|
119
|
+
|
|
120
|
+
# Create AgentScanner for unified scanning
|
|
121
|
+
config = AgentScannerConfig(
|
|
122
|
+
scan_prompts=True,
|
|
123
|
+
scan_responses=raxe_scan_responses,
|
|
124
|
+
on_threat="block" if raxe_block_on_threat else "log",
|
|
125
|
+
)
|
|
126
|
+
self._scanner = create_agent_scanner(raxe, config, integration_type="openai")
|
|
127
|
+
|
|
128
|
+
# Wrap the chat completions resource
|
|
129
|
+
self._wrap_chat_completions()
|
|
130
|
+
|
|
131
|
+
logger.debug(
|
|
132
|
+
f"RaxeOpenAI initialized: block={raxe_block_on_threat}, "
|
|
133
|
+
f"scan_responses={raxe_scan_responses}"
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
def _wrap_chat_completions(self):
|
|
137
|
+
"""Wrap chat.completions.create method with scanning."""
|
|
138
|
+
# Get original create method
|
|
139
|
+
original_create = super().chat.completions.create
|
|
140
|
+
|
|
141
|
+
def wrapped_create(*args, **kwargs):
|
|
142
|
+
"""Wrapped chat.completions.create with RAXE scanning."""
|
|
143
|
+
# Extract messages
|
|
144
|
+
messages = kwargs.get("messages", [])
|
|
145
|
+
|
|
146
|
+
# Scan each user message
|
|
147
|
+
for message in messages:
|
|
148
|
+
if isinstance(message, dict):
|
|
149
|
+
# Handle dict-style messages
|
|
150
|
+
if message.get("role") == "user":
|
|
151
|
+
content = message.get("content", "")
|
|
152
|
+
if content:
|
|
153
|
+
self._scan_message(content)
|
|
154
|
+
elif hasattr(message, "role") and hasattr(message, "content"):
|
|
155
|
+
# Handle object-style messages
|
|
156
|
+
if message.role == "user":
|
|
157
|
+
self._scan_message(message.content)
|
|
158
|
+
|
|
159
|
+
# Call original OpenAI
|
|
160
|
+
response = original_create(*args, **kwargs)
|
|
161
|
+
|
|
162
|
+
# Optionally scan response
|
|
163
|
+
if self.raxe_scan_responses and hasattr(response, "choices"):
|
|
164
|
+
self._scan_response(response)
|
|
165
|
+
|
|
166
|
+
return response
|
|
167
|
+
|
|
168
|
+
# Replace the method
|
|
169
|
+
self.chat.completions.create = wrapped_create
|
|
170
|
+
|
|
171
|
+
def _scan_message(self, content: str):
|
|
172
|
+
"""Scan a user message for threats.
|
|
173
|
+
|
|
174
|
+
Args:
|
|
175
|
+
content: Message content to scan
|
|
176
|
+
|
|
177
|
+
Raises:
|
|
178
|
+
ThreatDetectedError: If threat detected and blocking enabled
|
|
179
|
+
"""
|
|
180
|
+
# Use AgentScanner for unified scanning with integration telemetry
|
|
181
|
+
result = self._scanner.scan_prompt(content)
|
|
182
|
+
|
|
183
|
+
# AgentScanner handles blocking if configured
|
|
184
|
+
# Log for monitoring
|
|
185
|
+
if result.has_threats:
|
|
186
|
+
logger.warning(
|
|
187
|
+
f"Threat detected in user message: {result.severity} "
|
|
188
|
+
f"(action={result.action_taken})"
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
def _scan_response(self, response: Any):
|
|
192
|
+
"""Scan OpenAI response for threats.
|
|
193
|
+
|
|
194
|
+
Args:
|
|
195
|
+
response: OpenAI response object
|
|
196
|
+
"""
|
|
197
|
+
try:
|
|
198
|
+
for choice in response.choices:
|
|
199
|
+
if hasattr(choice, "message") and hasattr(choice.message, "content"):
|
|
200
|
+
content = choice.message.content
|
|
201
|
+
if content:
|
|
202
|
+
# Scan response (AgentScanner handles blocking based on config)
|
|
203
|
+
result = self._scanner.scan_response(content)
|
|
204
|
+
if result.has_threats:
|
|
205
|
+
logger.info(
|
|
206
|
+
f"Threat detected in OpenAI response: {result.severity}"
|
|
207
|
+
)
|
|
208
|
+
except Exception as e:
|
|
209
|
+
# Don't fail on response scanning
|
|
210
|
+
logger.error(f"Failed to scan response: {e}")
|
|
211
|
+
|
|
212
|
+
def __repr__(self) -> str:
|
|
213
|
+
"""String representation of RaxeOpenAI client.
|
|
214
|
+
|
|
215
|
+
Returns:
|
|
216
|
+
Human-readable string
|
|
217
|
+
"""
|
|
218
|
+
return (
|
|
219
|
+
f"RaxeOpenAI(block_on_threat={self.raxe_block_on_threat}, "
|
|
220
|
+
f"scan_responses={self.raxe_scan_responses})"
|
|
221
|
+
)
|
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
"""Google Vertex AI wrapper with automatic RAXE scanning.
|
|
2
|
+
|
|
3
|
+
Wrapper for Google Cloud Vertex AI that scans all prompts and responses.
|
|
4
|
+
|
|
5
|
+
This wrapper provides a convenient interface for using RAXE with Vertex AI
|
|
6
|
+
models including PaLM and Gemini.
|
|
7
|
+
|
|
8
|
+
Usage:
|
|
9
|
+
from raxe.sdk.wrappers import RaxeVertexAI
|
|
10
|
+
|
|
11
|
+
# Initialize with Google Cloud project
|
|
12
|
+
client = RaxeVertexAI(
|
|
13
|
+
project="my-project",
|
|
14
|
+
location="us-central1"
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
# Generate with automatic scanning
|
|
18
|
+
response = client.generate(
|
|
19
|
+
prompt="What is the capital of France?",
|
|
20
|
+
model="text-bison"
|
|
21
|
+
)
|
|
22
|
+
"""
|
|
23
|
+
from __future__ import annotations
|
|
24
|
+
|
|
25
|
+
import logging
|
|
26
|
+
from typing import TYPE_CHECKING, Any
|
|
27
|
+
|
|
28
|
+
if TYPE_CHECKING:
|
|
29
|
+
from raxe.sdk.client import Raxe
|
|
30
|
+
|
|
31
|
+
logger = logging.getLogger(__name__)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class RaxeVertexAI:
|
|
35
|
+
"""Vertex AI wrapper with RAXE protection.
|
|
36
|
+
|
|
37
|
+
This wrapper provides a simplified interface for using Google Vertex AI
|
|
38
|
+
with automatic RAXE scanning of prompts and responses.
|
|
39
|
+
|
|
40
|
+
Supports:
|
|
41
|
+
- PaLM 2 models (text-bison, chat-bison)
|
|
42
|
+
- Gemini models (gemini-pro, gemini-pro-vision)
|
|
43
|
+
- Both generate() and chat() interfaces
|
|
44
|
+
|
|
45
|
+
Attributes:
|
|
46
|
+
raxe: Raxe client instance for scanning
|
|
47
|
+
project: Google Cloud project ID
|
|
48
|
+
location: Google Cloud location
|
|
49
|
+
raxe_block_on_threat: Whether to block requests on threat detection
|
|
50
|
+
raxe_scan_responses: Whether to scan model responses
|
|
51
|
+
|
|
52
|
+
Example:
|
|
53
|
+
>>> from raxe.sdk.wrappers import RaxeVertexAI
|
|
54
|
+
>>>
|
|
55
|
+
>>> # Initialize
|
|
56
|
+
>>> client = RaxeVertexAI(
|
|
57
|
+
... project="my-project",
|
|
58
|
+
... location="us-central1"
|
|
59
|
+
... )
|
|
60
|
+
>>>
|
|
61
|
+
>>> # Generate text
|
|
62
|
+
>>> response = client.generate(
|
|
63
|
+
... prompt="Explain quantum computing",
|
|
64
|
+
... model="text-bison"
|
|
65
|
+
... )
|
|
66
|
+
>>>
|
|
67
|
+
>>> # Chat interface
|
|
68
|
+
>>> chat = client.start_chat(model="chat-bison")
|
|
69
|
+
>>> response = chat.send_message("Hello")
|
|
70
|
+
"""
|
|
71
|
+
|
|
72
|
+
def __init__(
|
|
73
|
+
self,
|
|
74
|
+
project: str,
|
|
75
|
+
location: str = "us-central1",
|
|
76
|
+
*,
|
|
77
|
+
raxe: Raxe | None = None,
|
|
78
|
+
raxe_block_on_threat: bool = False,
|
|
79
|
+
raxe_scan_responses: bool = True,
|
|
80
|
+
credentials: Any | None = None,
|
|
81
|
+
):
|
|
82
|
+
"""Initialize RaxeVertexAI client.
|
|
83
|
+
|
|
84
|
+
Args:
|
|
85
|
+
project: Google Cloud project ID
|
|
86
|
+
location: Google Cloud location (default: us-central1)
|
|
87
|
+
raxe: Optional Raxe client (creates default if not provided)
|
|
88
|
+
raxe_block_on_threat: Block requests on threat detection (default: False)
|
|
89
|
+
raxe_scan_responses: Also scan model responses
|
|
90
|
+
credentials: Optional Google Cloud credentials
|
|
91
|
+
|
|
92
|
+
Example:
|
|
93
|
+
# With default settings (log-only mode)
|
|
94
|
+
client = RaxeVertexAI(
|
|
95
|
+
project="my-project",
|
|
96
|
+
location="us-central1"
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
# With custom Raxe client
|
|
100
|
+
raxe = Raxe(telemetry=False)
|
|
101
|
+
client = RaxeVertexAI(
|
|
102
|
+
project="my-project",
|
|
103
|
+
raxe=raxe
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
# Enable blocking mode
|
|
107
|
+
client = RaxeVertexAI(
|
|
108
|
+
project="my-project",
|
|
109
|
+
raxe_block_on_threat=True
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
Raises:
|
|
113
|
+
ImportError: If google-cloud-aiplatform package not installed
|
|
114
|
+
"""
|
|
115
|
+
# Try to import Vertex AI
|
|
116
|
+
try:
|
|
117
|
+
from google.cloud import aiplatform
|
|
118
|
+
except ImportError as e:
|
|
119
|
+
raise ImportError(
|
|
120
|
+
"google-cloud-aiplatform package is required for RaxeVertexAI. "
|
|
121
|
+
"Install with: pip install google-cloud-aiplatform"
|
|
122
|
+
) from e
|
|
123
|
+
|
|
124
|
+
# Initialize Vertex AI
|
|
125
|
+
aiplatform.init(
|
|
126
|
+
project=project,
|
|
127
|
+
location=location,
|
|
128
|
+
credentials=credentials,
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
# Create or use provided Raxe client
|
|
132
|
+
if raxe is None:
|
|
133
|
+
from raxe.sdk.client import Raxe
|
|
134
|
+
raxe = Raxe()
|
|
135
|
+
|
|
136
|
+
self.raxe = raxe
|
|
137
|
+
self.project = project
|
|
138
|
+
self.location = location
|
|
139
|
+
self.raxe_block_on_threat = raxe_block_on_threat
|
|
140
|
+
self.raxe_scan_responses = raxe_scan_responses
|
|
141
|
+
self._aiplatform = aiplatform
|
|
142
|
+
|
|
143
|
+
logger.debug(
|
|
144
|
+
f"RaxeVertexAI initialized: project={project}, location={location}, "
|
|
145
|
+
f"block={raxe_block_on_threat}, scan_responses={raxe_scan_responses}"
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
def generate(
|
|
149
|
+
self,
|
|
150
|
+
prompt: str,
|
|
151
|
+
*,
|
|
152
|
+
model: str = "text-bison",
|
|
153
|
+
temperature: float = 0.2,
|
|
154
|
+
max_output_tokens: int = 1024,
|
|
155
|
+
top_p: float = 0.95,
|
|
156
|
+
top_k: int = 40,
|
|
157
|
+
**kwargs
|
|
158
|
+
) -> str:
|
|
159
|
+
"""Generate text with automatic scanning.
|
|
160
|
+
|
|
161
|
+
Args:
|
|
162
|
+
prompt: Input prompt to generate from
|
|
163
|
+
model: Model name (text-bison, gemini-pro, etc.)
|
|
164
|
+
temperature: Sampling temperature (0.0-1.0)
|
|
165
|
+
max_output_tokens: Maximum tokens to generate
|
|
166
|
+
top_p: Nucleus sampling parameter
|
|
167
|
+
top_k: Top-k sampling parameter
|
|
168
|
+
**kwargs: Additional model parameters
|
|
169
|
+
|
|
170
|
+
Returns:
|
|
171
|
+
Generated text response
|
|
172
|
+
|
|
173
|
+
Raises:
|
|
174
|
+
RaxeBlockedError: If threat detected and blocking enabled
|
|
175
|
+
|
|
176
|
+
Example:
|
|
177
|
+
>>> client = RaxeVertexAI(project="my-project")
|
|
178
|
+
>>> response = client.generate(
|
|
179
|
+
... prompt="Explain photosynthesis",
|
|
180
|
+
... model="text-bison",
|
|
181
|
+
... temperature=0.3
|
|
182
|
+
... )
|
|
183
|
+
>>> print(response)
|
|
184
|
+
"""
|
|
185
|
+
# Scan prompt before sending
|
|
186
|
+
self._scan_prompt(prompt)
|
|
187
|
+
|
|
188
|
+
# Generate with Vertex AI
|
|
189
|
+
if model.startswith("gemini"):
|
|
190
|
+
response_text = self._generate_gemini(
|
|
191
|
+
prompt=prompt,
|
|
192
|
+
model=model,
|
|
193
|
+
temperature=temperature,
|
|
194
|
+
max_output_tokens=max_output_tokens,
|
|
195
|
+
**kwargs
|
|
196
|
+
)
|
|
197
|
+
else:
|
|
198
|
+
response_text = self._generate_palm(
|
|
199
|
+
prompt=prompt,
|
|
200
|
+
model=model,
|
|
201
|
+
temperature=temperature,
|
|
202
|
+
max_output_tokens=max_output_tokens,
|
|
203
|
+
top_p=top_p,
|
|
204
|
+
top_k=top_k,
|
|
205
|
+
**kwargs
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
# Scan response
|
|
209
|
+
if self.raxe_scan_responses and response_text:
|
|
210
|
+
self._scan_response(response_text)
|
|
211
|
+
|
|
212
|
+
return response_text
|
|
213
|
+
|
|
214
|
+
def start_chat(
|
|
215
|
+
self,
|
|
216
|
+
*,
|
|
217
|
+
model: str = "chat-bison",
|
|
218
|
+
context: str | None = None,
|
|
219
|
+
examples: list[dict[str, str]] | None = None,
|
|
220
|
+
temperature: float = 0.2,
|
|
221
|
+
max_output_tokens: int = 1024,
|
|
222
|
+
top_p: float = 0.95,
|
|
223
|
+
top_k: int = 40,
|
|
224
|
+
**kwargs
|
|
225
|
+
) -> RaxeVertexAIChat:
|
|
226
|
+
"""Start a chat session with automatic scanning.
|
|
227
|
+
|
|
228
|
+
Args:
|
|
229
|
+
model: Chat model name (chat-bison, gemini-pro, etc.)
|
|
230
|
+
context: Optional conversation context
|
|
231
|
+
examples: Optional example exchanges
|
|
232
|
+
temperature: Sampling temperature (0.0-1.0)
|
|
233
|
+
max_output_tokens: Maximum tokens to generate
|
|
234
|
+
top_p: Nucleus sampling parameter
|
|
235
|
+
top_k: Top-k sampling parameter
|
|
236
|
+
**kwargs: Additional model parameters
|
|
237
|
+
|
|
238
|
+
Returns:
|
|
239
|
+
RaxeVertexAIChat session object
|
|
240
|
+
|
|
241
|
+
Example:
|
|
242
|
+
>>> client = RaxeVertexAI(project="my-project")
|
|
243
|
+
>>> chat = client.start_chat(model="chat-bison")
|
|
244
|
+
>>> response = chat.send_message("Hello!")
|
|
245
|
+
>>> print(response)
|
|
246
|
+
"""
|
|
247
|
+
return RaxeVertexAIChat(
|
|
248
|
+
parent=self,
|
|
249
|
+
model=model,
|
|
250
|
+
context=context,
|
|
251
|
+
examples=examples,
|
|
252
|
+
temperature=temperature,
|
|
253
|
+
max_output_tokens=max_output_tokens,
|
|
254
|
+
top_p=top_p,
|
|
255
|
+
top_k=top_k,
|
|
256
|
+
**kwargs
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
def _generate_palm(
|
|
260
|
+
self,
|
|
261
|
+
prompt: str,
|
|
262
|
+
model: str,
|
|
263
|
+
temperature: float,
|
|
264
|
+
max_output_tokens: int,
|
|
265
|
+
top_p: float,
|
|
266
|
+
top_k: int,
|
|
267
|
+
**kwargs
|
|
268
|
+
) -> str:
|
|
269
|
+
"""Generate with PaLM models.
|
|
270
|
+
|
|
271
|
+
Args:
|
|
272
|
+
prompt: Input prompt
|
|
273
|
+
model: PaLM model name
|
|
274
|
+
temperature: Sampling temperature
|
|
275
|
+
max_output_tokens: Max tokens
|
|
276
|
+
top_p: Nucleus sampling
|
|
277
|
+
top_k: Top-k sampling
|
|
278
|
+
**kwargs: Additional parameters
|
|
279
|
+
|
|
280
|
+
Returns:
|
|
281
|
+
Generated text
|
|
282
|
+
"""
|
|
283
|
+
from vertexai.language_models import TextGenerationModel
|
|
284
|
+
|
|
285
|
+
model_instance = TextGenerationModel.from_pretrained(model)
|
|
286
|
+
|
|
287
|
+
response = model_instance.predict(
|
|
288
|
+
prompt,
|
|
289
|
+
temperature=temperature,
|
|
290
|
+
max_output_tokens=max_output_tokens,
|
|
291
|
+
top_p=top_p,
|
|
292
|
+
top_k=top_k,
|
|
293
|
+
**kwargs
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
return response.text if hasattr(response, "text") else str(response)
|
|
297
|
+
|
|
298
|
+
def _generate_gemini(
|
|
299
|
+
self,
|
|
300
|
+
prompt: str,
|
|
301
|
+
model: str,
|
|
302
|
+
temperature: float,
|
|
303
|
+
max_output_tokens: int,
|
|
304
|
+
**kwargs
|
|
305
|
+
) -> str:
|
|
306
|
+
"""Generate with Gemini models.
|
|
307
|
+
|
|
308
|
+
Args:
|
|
309
|
+
prompt: Input prompt
|
|
310
|
+
model: Gemini model name
|
|
311
|
+
temperature: Sampling temperature
|
|
312
|
+
max_output_tokens: Max tokens
|
|
313
|
+
**kwargs: Additional parameters
|
|
314
|
+
|
|
315
|
+
Returns:
|
|
316
|
+
Generated text
|
|
317
|
+
"""
|
|
318
|
+
from vertexai.generative_models import GenerativeModel
|
|
319
|
+
|
|
320
|
+
model_instance = GenerativeModel(model)
|
|
321
|
+
|
|
322
|
+
response = model_instance.generate_content(
|
|
323
|
+
prompt,
|
|
324
|
+
generation_config={
|
|
325
|
+
"temperature": temperature,
|
|
326
|
+
"max_output_tokens": max_output_tokens,
|
|
327
|
+
**kwargs
|
|
328
|
+
}
|
|
329
|
+
)
|
|
330
|
+
|
|
331
|
+
return response.text if hasattr(response, "text") else str(response)
|
|
332
|
+
|
|
333
|
+
def _scan_prompt(self, prompt: str):
|
|
334
|
+
"""Scan a prompt for threats.
|
|
335
|
+
|
|
336
|
+
Args:
|
|
337
|
+
prompt: Prompt to scan
|
|
338
|
+
|
|
339
|
+
Raises:
|
|
340
|
+
RaxeBlockedError: If threat detected and blocking enabled
|
|
341
|
+
"""
|
|
342
|
+
result = self.raxe.scan(
|
|
343
|
+
prompt,
|
|
344
|
+
block_on_threat=self.raxe_block_on_threat
|
|
345
|
+
)
|
|
346
|
+
|
|
347
|
+
if result.has_threats:
|
|
348
|
+
logger.warning(
|
|
349
|
+
f"Threat detected in Vertex AI prompt: {result.severity} "
|
|
350
|
+
f"(block={self.raxe_block_on_threat})"
|
|
351
|
+
)
|
|
352
|
+
|
|
353
|
+
def _scan_response(self, response: str):
|
|
354
|
+
"""Scan a model response for threats.
|
|
355
|
+
|
|
356
|
+
Args:
|
|
357
|
+
response: Response to scan
|
|
358
|
+
"""
|
|
359
|
+
try:
|
|
360
|
+
result = self.raxe.scan(response, block_on_threat=False)
|
|
361
|
+
if result.has_threats:
|
|
362
|
+
logger.info(
|
|
363
|
+
f"Threat detected in Vertex AI response: {result.severity}"
|
|
364
|
+
)
|
|
365
|
+
except Exception as e:
|
|
366
|
+
logger.error(f"Failed to scan response: {e}")
|
|
367
|
+
|
|
368
|
+
def __repr__(self) -> str:
|
|
369
|
+
"""String representation of RaxeVertexAI client.
|
|
370
|
+
|
|
371
|
+
Returns:
|
|
372
|
+
Human-readable string
|
|
373
|
+
"""
|
|
374
|
+
return (
|
|
375
|
+
f"RaxeVertexAI(project={self.project!r}, location={self.location!r}, "
|
|
376
|
+
f"block_on_threat={self.raxe_block_on_threat})"
|
|
377
|
+
)
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
class RaxeVertexAIChat:
|
|
381
|
+
"""Chat session for Vertex AI with RAXE protection.
|
|
382
|
+
|
|
383
|
+
Manages a multi-turn conversation with automatic scanning of
|
|
384
|
+
all messages in both directions.
|
|
385
|
+
|
|
386
|
+
Attributes:
|
|
387
|
+
parent: Parent RaxeVertexAI client
|
|
388
|
+
model: Chat model name
|
|
389
|
+
history: Conversation history
|
|
390
|
+
|
|
391
|
+
Example:
|
|
392
|
+
>>> chat = client.start_chat(model="chat-bison")
|
|
393
|
+
>>> response1 = chat.send_message("What is AI?")
|
|
394
|
+
>>> response2 = chat.send_message("How does it work?")
|
|
395
|
+
"""
|
|
396
|
+
|
|
397
|
+
def __init__(
|
|
398
|
+
self,
|
|
399
|
+
parent: RaxeVertexAI,
|
|
400
|
+
model: str,
|
|
401
|
+
context: str | None,
|
|
402
|
+
examples: list[dict[str, str]] | None,
|
|
403
|
+
temperature: float,
|
|
404
|
+
max_output_tokens: int,
|
|
405
|
+
top_p: float,
|
|
406
|
+
top_k: int,
|
|
407
|
+
**kwargs
|
|
408
|
+
):
|
|
409
|
+
"""Initialize chat session.
|
|
410
|
+
|
|
411
|
+
Args:
|
|
412
|
+
parent: Parent RaxeVertexAI client
|
|
413
|
+
model: Chat model name
|
|
414
|
+
context: Optional context
|
|
415
|
+
examples: Optional examples
|
|
416
|
+
temperature: Sampling temperature
|
|
417
|
+
max_output_tokens: Max tokens
|
|
418
|
+
top_p: Nucleus sampling
|
|
419
|
+
top_k: Top-k sampling
|
|
420
|
+
**kwargs: Additional parameters
|
|
421
|
+
"""
|
|
422
|
+
self.parent = parent
|
|
423
|
+
self.model = model
|
|
424
|
+
self.history: list[dict[str, str]] = []
|
|
425
|
+
|
|
426
|
+
# Initialize appropriate chat model
|
|
427
|
+
if model.startswith("gemini"):
|
|
428
|
+
from vertexai.generative_models import GenerativeModel
|
|
429
|
+
model_instance = GenerativeModel(model)
|
|
430
|
+
self._chat = model_instance.start_chat()
|
|
431
|
+
else:
|
|
432
|
+
from vertexai.language_models import ChatModel
|
|
433
|
+
model_instance = ChatModel.from_pretrained(model)
|
|
434
|
+
self._chat = model_instance.start_chat(
|
|
435
|
+
context=context,
|
|
436
|
+
examples=examples,
|
|
437
|
+
temperature=temperature,
|
|
438
|
+
max_output_tokens=max_output_tokens,
|
|
439
|
+
top_p=top_p,
|
|
440
|
+
top_k=top_k,
|
|
441
|
+
**kwargs
|
|
442
|
+
)
|
|
443
|
+
|
|
444
|
+
def send_message(self, message: str) -> str:
|
|
445
|
+
"""Send a message in the chat with automatic scanning.
|
|
446
|
+
|
|
447
|
+
Args:
|
|
448
|
+
message: User message to send
|
|
449
|
+
|
|
450
|
+
Returns:
|
|
451
|
+
Model response text
|
|
452
|
+
|
|
453
|
+
Raises:
|
|
454
|
+
RaxeBlockedError: If threat detected and blocking enabled
|
|
455
|
+
|
|
456
|
+
Example:
|
|
457
|
+
>>> chat = client.start_chat()
|
|
458
|
+
>>> response = chat.send_message("Hello!")
|
|
459
|
+
>>> print(response)
|
|
460
|
+
"""
|
|
461
|
+
# Scan user message
|
|
462
|
+
self.parent._scan_prompt(message)
|
|
463
|
+
|
|
464
|
+
# Send to model
|
|
465
|
+
response = self._chat.send_message(message)
|
|
466
|
+
response_text = response.text if hasattr(response, "text") else str(response)
|
|
467
|
+
|
|
468
|
+
# Scan response
|
|
469
|
+
if self.parent.raxe_scan_responses and response_text:
|
|
470
|
+
self.parent._scan_response(response_text)
|
|
471
|
+
|
|
472
|
+
# Update history
|
|
473
|
+
self.history.append({"role": "user", "content": message})
|
|
474
|
+
self.history.append({"role": "assistant", "content": response_text})
|
|
475
|
+
|
|
476
|
+
return response_text
|
|
477
|
+
|
|
478
|
+
def __repr__(self) -> str:
|
|
479
|
+
"""String representation of chat session.
|
|
480
|
+
|
|
481
|
+
Returns:
|
|
482
|
+
Human-readable string
|
|
483
|
+
"""
|
|
484
|
+
return f"RaxeVertexAIChat(model={self.model!r}, messages={len(self.history)})"
|
raxe/utils/__init__.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Utilities - Shared Helper Functions
|
|
3
|
+
|
|
4
|
+
Cross-cutting concerns used across layers.
|
|
5
|
+
|
|
6
|
+
Modules (to be implemented):
|
|
7
|
+
- logging.py: Structured logging setup
|
|
8
|
+
- hashing.py: Privacy-preserving hashing (SHA-256)
|
|
9
|
+
- performance.py: Circuit breaker, rate limiting
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
__all__ = []
|