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,381 @@
|
|
|
1
|
+
"""Pack registry with precedence resolution.
|
|
2
|
+
|
|
3
|
+
Manages multiple loaded packs and resolves rule conflicts based on precedence.
|
|
4
|
+
Infrastructure layer - coordinates pack loading and rule resolution.
|
|
5
|
+
"""
|
|
6
|
+
import logging
|
|
7
|
+
from dataclasses import dataclass, field
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
from raxe.domain.packs.models import RulePack
|
|
11
|
+
from raxe.domain.rules.models import Rule
|
|
12
|
+
from raxe.infrastructure.packs.loader import PackLoader, PackLoadError
|
|
13
|
+
|
|
14
|
+
logger = logging.getLogger(__name__)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@dataclass
|
|
18
|
+
class RegistryConfig:
|
|
19
|
+
"""Configuration for pack registry.
|
|
20
|
+
|
|
21
|
+
Attributes:
|
|
22
|
+
packs_root: Root directory containing pack type subdirectories
|
|
23
|
+
(e.g., ~/.raxe/packs/)
|
|
24
|
+
precedence: Pack type precedence order (highest to lowest priority).
|
|
25
|
+
Default: ["custom", "community", "core"]
|
|
26
|
+
Custom rules override community, community overrides core.
|
|
27
|
+
strict: If True, fail on first error. If False, log warnings and continue.
|
|
28
|
+
"""
|
|
29
|
+
packs_root: Path
|
|
30
|
+
precedence: list[str] = field(default_factory=lambda: ["custom", "community", "core"])
|
|
31
|
+
strict: bool = False
|
|
32
|
+
|
|
33
|
+
def __post_init__(self) -> None:
|
|
34
|
+
"""Validate configuration after construction."""
|
|
35
|
+
if not self.precedence:
|
|
36
|
+
raise ValueError("Precedence list cannot be empty")
|
|
37
|
+
|
|
38
|
+
# Ensure packs_root is absolute path
|
|
39
|
+
if not self.packs_root.is_absolute():
|
|
40
|
+
self.packs_root = self.packs_root.resolve()
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class PackRegistry:
|
|
44
|
+
"""Manages loaded rule packs with precedence.
|
|
45
|
+
|
|
46
|
+
Handles:
|
|
47
|
+
- Loading packs from filesystem (core, community, custom)
|
|
48
|
+
- Precedence resolution (custom > community > core by default)
|
|
49
|
+
- Rule deduplication (keeps highest precedence version)
|
|
50
|
+
- Version conflict handling
|
|
51
|
+
|
|
52
|
+
Example usage:
|
|
53
|
+
config = RegistryConfig(packs_root=Path("~/.raxe/packs"))
|
|
54
|
+
registry = PackRegistry(config)
|
|
55
|
+
registry.load_all_packs()
|
|
56
|
+
|
|
57
|
+
# Get rule (respects precedence)
|
|
58
|
+
rule = registry.get_rule("pi-001")
|
|
59
|
+
|
|
60
|
+
# Get all unique rules
|
|
61
|
+
all_rules = registry.get_all_rules()
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
def __init__(self, config: RegistryConfig):
|
|
65
|
+
"""Initialize pack registry.
|
|
66
|
+
|
|
67
|
+
Args:
|
|
68
|
+
config: Registry configuration
|
|
69
|
+
"""
|
|
70
|
+
self.config = config
|
|
71
|
+
self.loader = PackLoader(strict=config.strict)
|
|
72
|
+
self.packs: dict[str, RulePack] = {}
|
|
73
|
+
|
|
74
|
+
def load_all_packs(self) -> None:
|
|
75
|
+
"""Load all packs from configured root directory.
|
|
76
|
+
|
|
77
|
+
Loads latest version from each pack type:
|
|
78
|
+
- packs_root/core/v*.*.*/pack.yaml
|
|
79
|
+
- packs_root/community/v*.*.*/pack.yaml
|
|
80
|
+
- packs_root/custom/*/pack.yaml (any subdirectory)
|
|
81
|
+
|
|
82
|
+
Logs summary of loaded packs.
|
|
83
|
+
"""
|
|
84
|
+
if not self.config.packs_root.exists():
|
|
85
|
+
logger.warning(
|
|
86
|
+
f"Packs root directory does not exist: {self.config.packs_root}"
|
|
87
|
+
)
|
|
88
|
+
return
|
|
89
|
+
|
|
90
|
+
loaded_count = 0
|
|
91
|
+
|
|
92
|
+
# Load from each pack type in precedence order
|
|
93
|
+
for pack_type in self.config.precedence:
|
|
94
|
+
pack_type_dir = self.config.packs_root / pack_type
|
|
95
|
+
|
|
96
|
+
if not pack_type_dir.exists():
|
|
97
|
+
logger.debug(f"Pack type directory does not exist: {pack_type_dir}")
|
|
98
|
+
continue
|
|
99
|
+
|
|
100
|
+
try:
|
|
101
|
+
# Load latest version from this type
|
|
102
|
+
latest_pack = self.loader.load_latest_pack(pack_type_dir)
|
|
103
|
+
|
|
104
|
+
if latest_pack:
|
|
105
|
+
self.packs[pack_type] = latest_pack
|
|
106
|
+
loaded_count += 1
|
|
107
|
+
logger.info(
|
|
108
|
+
f"Loaded {pack_type} pack: {latest_pack.manifest.versioned_id} "
|
|
109
|
+
f"with {len(latest_pack.rules)} rules"
|
|
110
|
+
)
|
|
111
|
+
else:
|
|
112
|
+
logger.debug(f"No valid pack found in {pack_type_dir}")
|
|
113
|
+
|
|
114
|
+
except PackLoadError as e:
|
|
115
|
+
logger.error(f"Failed to load {pack_type} pack: {e}")
|
|
116
|
+
if self.config.strict:
|
|
117
|
+
raise
|
|
118
|
+
|
|
119
|
+
logger.info(
|
|
120
|
+
f"Pack registry loaded {loaded_count} packs from {self.config.packs_root}"
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
def load_pack_type(self, pack_type: str) -> RulePack | None:
|
|
124
|
+
"""Load or reload a specific pack type.
|
|
125
|
+
|
|
126
|
+
Args:
|
|
127
|
+
pack_type: Pack type identifier ('core', 'community', 'custom')
|
|
128
|
+
|
|
129
|
+
Returns:
|
|
130
|
+
Loaded pack, or None if not found
|
|
131
|
+
|
|
132
|
+
Raises:
|
|
133
|
+
PackLoadError: If strict mode enabled and load fails
|
|
134
|
+
"""
|
|
135
|
+
pack_type_dir = self.config.packs_root / pack_type
|
|
136
|
+
|
|
137
|
+
if not pack_type_dir.exists():
|
|
138
|
+
logger.warning(f"Pack type directory not found: {pack_type_dir}")
|
|
139
|
+
return None
|
|
140
|
+
|
|
141
|
+
try:
|
|
142
|
+
latest_pack = self.loader.load_latest_pack(pack_type_dir)
|
|
143
|
+
|
|
144
|
+
if latest_pack:
|
|
145
|
+
self.packs[pack_type] = latest_pack
|
|
146
|
+
logger.info(
|
|
147
|
+
f"Loaded {pack_type} pack: {latest_pack.manifest.versioned_id}"
|
|
148
|
+
)
|
|
149
|
+
return latest_pack
|
|
150
|
+
else:
|
|
151
|
+
logger.warning(f"No valid pack found in {pack_type_dir}")
|
|
152
|
+
return None
|
|
153
|
+
|
|
154
|
+
except PackLoadError as e:
|
|
155
|
+
logger.error(f"Failed to load {pack_type} pack: {e}")
|
|
156
|
+
if self.config.strict:
|
|
157
|
+
raise
|
|
158
|
+
return None
|
|
159
|
+
|
|
160
|
+
def get_rule(self, rule_id: str) -> Rule | None:
|
|
161
|
+
"""Get rule by ID, respecting precedence.
|
|
162
|
+
|
|
163
|
+
Returns the first matching rule found when searching packs
|
|
164
|
+
in precedence order. Higher precedence packs override lower.
|
|
165
|
+
|
|
166
|
+
Args:
|
|
167
|
+
rule_id: Rule identifier (e.g., 'pi-001')
|
|
168
|
+
|
|
169
|
+
Returns:
|
|
170
|
+
Rule from highest-precedence pack, or None if not found
|
|
171
|
+
|
|
172
|
+
Example:
|
|
173
|
+
# If custom pack has pi-001 v2.0.0 and core has pi-001 v1.0.0,
|
|
174
|
+
# returns custom pack's version (custom > core precedence)
|
|
175
|
+
rule = registry.get_rule("pi-001")
|
|
176
|
+
"""
|
|
177
|
+
# Check packs in precedence order
|
|
178
|
+
for pack_type in self.config.precedence:
|
|
179
|
+
pack = self.packs.get(pack_type)
|
|
180
|
+
if not pack:
|
|
181
|
+
continue
|
|
182
|
+
|
|
183
|
+
rule = pack.get_rule(rule_id)
|
|
184
|
+
if rule:
|
|
185
|
+
logger.debug(
|
|
186
|
+
f"Found rule {rule_id} in {pack_type} pack "
|
|
187
|
+
f"(version {rule.version})"
|
|
188
|
+
)
|
|
189
|
+
return rule
|
|
190
|
+
|
|
191
|
+
logger.debug(f"Rule {rule_id} not found in any loaded pack")
|
|
192
|
+
return None
|
|
193
|
+
|
|
194
|
+
def get_rule_versioned(self, rule_id: str, version: str) -> Rule | None:
|
|
195
|
+
"""Get rule by ID and specific version.
|
|
196
|
+
|
|
197
|
+
Searches all packs for exact rule_id@version match.
|
|
198
|
+
Does NOT respect precedence - returns first exact match found.
|
|
199
|
+
|
|
200
|
+
Args:
|
|
201
|
+
rule_id: Rule identifier (e.g., 'pi-001')
|
|
202
|
+
version: Semantic version (e.g., '0.0.1')
|
|
203
|
+
|
|
204
|
+
Returns:
|
|
205
|
+
Rule with exact version, or None if not found
|
|
206
|
+
"""
|
|
207
|
+
for pack_type in self.config.precedence:
|
|
208
|
+
pack = self.packs.get(pack_type)
|
|
209
|
+
if not pack:
|
|
210
|
+
continue
|
|
211
|
+
|
|
212
|
+
rule = pack.get_rule_versioned(rule_id, version)
|
|
213
|
+
if rule:
|
|
214
|
+
logger.debug(
|
|
215
|
+
f"Found rule {rule_id}@{version} in {pack_type} pack"
|
|
216
|
+
)
|
|
217
|
+
return rule
|
|
218
|
+
|
|
219
|
+
logger.debug(f"Rule {rule_id}@{version} not found in any loaded pack")
|
|
220
|
+
return None
|
|
221
|
+
|
|
222
|
+
def get_all_rules(self) -> list[Rule]:
|
|
223
|
+
"""Get all unique rules from all packs.
|
|
224
|
+
|
|
225
|
+
Deduplicates by rule_id, keeping highest precedence version.
|
|
226
|
+
If custom pack has pi-001 and core pack has pi-001, only
|
|
227
|
+
custom version is returned.
|
|
228
|
+
|
|
229
|
+
Returns:
|
|
230
|
+
List of unique rules (deduplicated by rule_id)
|
|
231
|
+
|
|
232
|
+
Example:
|
|
233
|
+
all_rules = registry.get_all_rules()
|
|
234
|
+
# Returns: [pi-001 (custom), pi-002 (core), ...]
|
|
235
|
+
"""
|
|
236
|
+
seen_ids = set()
|
|
237
|
+
rules = []
|
|
238
|
+
|
|
239
|
+
# Iterate in precedence order
|
|
240
|
+
for pack_type in self.config.precedence:
|
|
241
|
+
pack = self.packs.get(pack_type)
|
|
242
|
+
if not pack:
|
|
243
|
+
continue
|
|
244
|
+
|
|
245
|
+
for rule in pack.rules:
|
|
246
|
+
# Only add if we haven't seen this rule_id yet
|
|
247
|
+
if rule.rule_id not in seen_ids:
|
|
248
|
+
rules.append(rule)
|
|
249
|
+
seen_ids.add(rule.rule_id)
|
|
250
|
+
else:
|
|
251
|
+
logger.debug(
|
|
252
|
+
f"Skipping duplicate rule {rule.rule_id} from {pack_type} pack "
|
|
253
|
+
f"(already loaded from higher precedence pack)"
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
logger.debug(
|
|
257
|
+
f"Collected {len(rules)} unique rules from {len(self.packs)} packs"
|
|
258
|
+
)
|
|
259
|
+
return rules
|
|
260
|
+
|
|
261
|
+
def get_all_rules_with_versions(self) -> list[Rule]:
|
|
262
|
+
"""Get all rules from all packs, including duplicates.
|
|
263
|
+
|
|
264
|
+
Does NOT deduplicate. Returns every rule from every pack,
|
|
265
|
+
so you may get multiple versions of the same rule_id.
|
|
266
|
+
|
|
267
|
+
Returns:
|
|
268
|
+
List of all rules from all packs (may contain duplicate rule_ids)
|
|
269
|
+
|
|
270
|
+
Example:
|
|
271
|
+
all_rules = registry.get_all_rules_with_versions()
|
|
272
|
+
# Returns: [pi-001@1.0.0 (core), pi-001@2.0.0 (custom), ...]
|
|
273
|
+
"""
|
|
274
|
+
rules = []
|
|
275
|
+
|
|
276
|
+
for pack_type in self.config.precedence:
|
|
277
|
+
pack = self.packs.get(pack_type)
|
|
278
|
+
if not pack:
|
|
279
|
+
continue
|
|
280
|
+
|
|
281
|
+
rules.extend(pack.rules)
|
|
282
|
+
|
|
283
|
+
logger.debug(
|
|
284
|
+
f"Collected {len(rules)} rules (including duplicates) from {len(self.packs)} packs"
|
|
285
|
+
)
|
|
286
|
+
return rules
|
|
287
|
+
|
|
288
|
+
def get_rules_by_family(self, family: str) -> list[Rule]:
|
|
289
|
+
"""Get all unique rules in a specific family.
|
|
290
|
+
|
|
291
|
+
Respects precedence - deduplicates by rule_id.
|
|
292
|
+
|
|
293
|
+
Args:
|
|
294
|
+
family: Rule family code (e.g., 'PI', 'JB', 'PII')
|
|
295
|
+
|
|
296
|
+
Returns:
|
|
297
|
+
List of unique rules in the specified family
|
|
298
|
+
"""
|
|
299
|
+
all_rules = self.get_all_rules()
|
|
300
|
+
return [r for r in all_rules if r.family.value == family]
|
|
301
|
+
|
|
302
|
+
def get_rules_by_severity(self, severity: str) -> list[Rule]:
|
|
303
|
+
"""Get all unique rules with a specific severity.
|
|
304
|
+
|
|
305
|
+
Respects precedence - deduplicates by rule_id.
|
|
306
|
+
|
|
307
|
+
Args:
|
|
308
|
+
severity: Severity level (e.g., 'critical', 'high', 'medium')
|
|
309
|
+
|
|
310
|
+
Returns:
|
|
311
|
+
List of unique rules with the specified severity
|
|
312
|
+
"""
|
|
313
|
+
all_rules = self.get_all_rules()
|
|
314
|
+
return [r for r in all_rules if r.severity.value == severity]
|
|
315
|
+
|
|
316
|
+
def list_packs(self) -> list[RulePack]:
|
|
317
|
+
"""List all loaded packs.
|
|
318
|
+
|
|
319
|
+
Returns:
|
|
320
|
+
List of loaded packs in precedence order
|
|
321
|
+
"""
|
|
322
|
+
return [
|
|
323
|
+
self.packs[pack_type]
|
|
324
|
+
for pack_type in self.config.precedence
|
|
325
|
+
if pack_type in self.packs
|
|
326
|
+
]
|
|
327
|
+
|
|
328
|
+
def get_pack(self, pack_type: str) -> RulePack | None:
|
|
329
|
+
"""Get pack by type.
|
|
330
|
+
|
|
331
|
+
Args:
|
|
332
|
+
pack_type: Pack type identifier ('core', 'community', 'custom')
|
|
333
|
+
|
|
334
|
+
Returns:
|
|
335
|
+
Pack if loaded, None otherwise
|
|
336
|
+
"""
|
|
337
|
+
return self.packs.get(pack_type)
|
|
338
|
+
|
|
339
|
+
def get_pack_info(self) -> dict[str, dict[str, any]]:
|
|
340
|
+
"""Get summary information about all loaded packs.
|
|
341
|
+
|
|
342
|
+
Returns:
|
|
343
|
+
Dictionary mapping pack_type to pack metadata
|
|
344
|
+
|
|
345
|
+
Example:
|
|
346
|
+
{
|
|
347
|
+
'core': {
|
|
348
|
+
'version': '0.0.1',
|
|
349
|
+
'rule_count': 5,
|
|
350
|
+
'pack_type': 'OFFICIAL',
|
|
351
|
+
},
|
|
352
|
+
'custom': {
|
|
353
|
+
'version': '0.0.1',
|
|
354
|
+
'rule_count': 2,
|
|
355
|
+
'pack_type': 'CUSTOM',
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
"""
|
|
359
|
+
info = {}
|
|
360
|
+
|
|
361
|
+
for pack_type, pack in self.packs.items():
|
|
362
|
+
info[pack_type] = {
|
|
363
|
+
'id': pack.manifest.id,
|
|
364
|
+
'version': pack.manifest.version,
|
|
365
|
+
'name': pack.manifest.name,
|
|
366
|
+
'pack_type': pack.manifest.pack_type.value,
|
|
367
|
+
'rule_count': len(pack.rules),
|
|
368
|
+
'schema_version': pack.manifest.schema_version,
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
return info
|
|
372
|
+
|
|
373
|
+
def reload_all_packs(self) -> None:
|
|
374
|
+
"""Reload all packs from filesystem.
|
|
375
|
+
|
|
376
|
+
Clears current packs and loads fresh from disk.
|
|
377
|
+
Useful for picking up rule updates.
|
|
378
|
+
"""
|
|
379
|
+
logger.info("Reloading all packs from filesystem")
|
|
380
|
+
self.packs.clear()
|
|
381
|
+
self.load_all_packs()
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Policy infrastructure layer.
|
|
2
|
+
|
|
3
|
+
I/O implementations for loading and validating policies:
|
|
4
|
+
- YAML file loader (local .raxe/policies.yaml)
|
|
5
|
+
- API client (cloud-hosted policies)
|
|
6
|
+
- Policy validator (signature verification)
|
|
7
|
+
"""
|
|
8
|
+
from raxe.infrastructure.policies.api_client import PolicyAPIClient
|
|
9
|
+
from raxe.infrastructure.policies.validator import PolicyValidator
|
|
10
|
+
from raxe.infrastructure.policies.yaml_loader import YAMLPolicyLoader
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
"PolicyAPIClient",
|
|
14
|
+
"PolicyValidator",
|
|
15
|
+
"YAMLPolicyLoader",
|
|
16
|
+
]
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
"""Policy API client.
|
|
2
|
+
|
|
3
|
+
Fetches policies from RAXE cloud API for cloud customers.
|
|
4
|
+
Caches policies locally for offline operation.
|
|
5
|
+
"""
|
|
6
|
+
import json
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from typing import Protocol
|
|
9
|
+
|
|
10
|
+
from raxe.domain.policies.models import Policy
|
|
11
|
+
from raxe.infrastructure.policies.yaml_loader import YAMLPolicyLoader
|
|
12
|
+
from raxe.infrastructure.security.auth import APIKey
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class HTTPClient(Protocol):
|
|
16
|
+
"""HTTP client protocol for dependency injection.
|
|
17
|
+
|
|
18
|
+
Allows testing without real HTTP calls.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
def get(self, url: str, headers: dict[str, str]) -> dict:
|
|
22
|
+
"""Execute GET request.
|
|
23
|
+
|
|
24
|
+
Args:
|
|
25
|
+
url: URL to fetch
|
|
26
|
+
headers: HTTP headers
|
|
27
|
+
|
|
28
|
+
Returns:
|
|
29
|
+
Response data as dictionary
|
|
30
|
+
|
|
31
|
+
Raises:
|
|
32
|
+
Exception: On HTTP errors
|
|
33
|
+
"""
|
|
34
|
+
...
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class PolicyAPIError(Exception):
|
|
38
|
+
"""Error fetching policies from API."""
|
|
39
|
+
pass
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def _get_default_api_base() -> str:
|
|
43
|
+
"""Get default API base URL from centralized config."""
|
|
44
|
+
from raxe.infrastructure.config.endpoints import get_api_base
|
|
45
|
+
return get_api_base()
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class PolicyAPIClient:
|
|
49
|
+
"""Fetch policies from RAXE cloud API.
|
|
50
|
+
|
|
51
|
+
Policies are cached locally for offline operation.
|
|
52
|
+
Cache is refreshed on each successful fetch.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
def __init__(
|
|
56
|
+
self,
|
|
57
|
+
api_base_url: str = "", # Will use centralized config if empty
|
|
58
|
+
cache_dir: Path | None = None,
|
|
59
|
+
http_client: HTTPClient | None = None,
|
|
60
|
+
) -> None:
|
|
61
|
+
"""Initialize API client.
|
|
62
|
+
|
|
63
|
+
Args:
|
|
64
|
+
api_base_url: Base URL for RAXE API (uses centralized config if empty)
|
|
65
|
+
cache_dir: Directory for policy cache (None = ~/.raxe/cache)
|
|
66
|
+
http_client: HTTP client implementation (None = use requests)
|
|
67
|
+
"""
|
|
68
|
+
self.api_base_url = (api_base_url or _get_default_api_base()).rstrip("/")
|
|
69
|
+
self.cache_dir = cache_dir or Path.home() / ".raxe" / "cache"
|
|
70
|
+
self.http_client = http_client or self._default_http_client()
|
|
71
|
+
self.yaml_loader = YAMLPolicyLoader()
|
|
72
|
+
|
|
73
|
+
# Ensure cache directory exists
|
|
74
|
+
self.cache_dir.mkdir(parents=True, exist_ok=True)
|
|
75
|
+
|
|
76
|
+
def fetch_policies(
|
|
77
|
+
self,
|
|
78
|
+
api_key: APIKey,
|
|
79
|
+
*,
|
|
80
|
+
use_cache_on_error: bool = True,
|
|
81
|
+
) -> list[Policy]:
|
|
82
|
+
"""Fetch policies for customer from API.
|
|
83
|
+
|
|
84
|
+
Downloads policies, caches them locally, and returns as Policy objects.
|
|
85
|
+
|
|
86
|
+
Args:
|
|
87
|
+
api_key: Validated API key
|
|
88
|
+
use_cache_on_error: If True, return cached policies on API error
|
|
89
|
+
|
|
90
|
+
Returns:
|
|
91
|
+
List of Policy objects for customer
|
|
92
|
+
|
|
93
|
+
Raises:
|
|
94
|
+
PolicyAPIError: If API call fails and no cache available
|
|
95
|
+
"""
|
|
96
|
+
try:
|
|
97
|
+
# Fetch from API
|
|
98
|
+
policies_data = self._fetch_from_api(api_key)
|
|
99
|
+
|
|
100
|
+
# Cache response
|
|
101
|
+
self._save_to_cache(api_key.customer_id, policies_data)
|
|
102
|
+
|
|
103
|
+
# Parse to domain models
|
|
104
|
+
return self._parse_response(policies_data)
|
|
105
|
+
|
|
106
|
+
except Exception as e:
|
|
107
|
+
if use_cache_on_error:
|
|
108
|
+
# Try to load from cache
|
|
109
|
+
try:
|
|
110
|
+
return self.load_from_cache(api_key.customer_id)
|
|
111
|
+
except Exception:
|
|
112
|
+
# Cache also failed, re-raise original error
|
|
113
|
+
raise PolicyAPIError(
|
|
114
|
+
f"Failed to fetch policies and no cache available: {e}"
|
|
115
|
+
) from e
|
|
116
|
+
else:
|
|
117
|
+
raise PolicyAPIError(f"Failed to fetch policies: {e}") from e
|
|
118
|
+
|
|
119
|
+
def load_from_cache(self, customer_id: str) -> list[Policy]:
|
|
120
|
+
"""Load policies from local cache.
|
|
121
|
+
|
|
122
|
+
Args:
|
|
123
|
+
customer_id: Customer ID to load policies for
|
|
124
|
+
|
|
125
|
+
Returns:
|
|
126
|
+
List of cached policies
|
|
127
|
+
|
|
128
|
+
Raises:
|
|
129
|
+
PolicyAPIError: If cache doesn't exist or is invalid
|
|
130
|
+
"""
|
|
131
|
+
cache_file = self._get_cache_path(customer_id)
|
|
132
|
+
|
|
133
|
+
if not cache_file.exists():
|
|
134
|
+
raise PolicyAPIError(f"No cached policies for {customer_id}")
|
|
135
|
+
|
|
136
|
+
try:
|
|
137
|
+
with open(cache_file) as f:
|
|
138
|
+
policies_data = json.load(f)
|
|
139
|
+
return self._parse_response(policies_data)
|
|
140
|
+
except (OSError, json.JSONDecodeError, ValueError) as e:
|
|
141
|
+
raise PolicyAPIError(f"Invalid policy cache: {e}") from e
|
|
142
|
+
|
|
143
|
+
def clear_cache(self, customer_id: str | None = None) -> None:
|
|
144
|
+
"""Clear policy cache.
|
|
145
|
+
|
|
146
|
+
Args:
|
|
147
|
+
customer_id: Specific customer to clear (None = clear all)
|
|
148
|
+
"""
|
|
149
|
+
if customer_id:
|
|
150
|
+
cache_file = self._get_cache_path(customer_id)
|
|
151
|
+
if cache_file.exists():
|
|
152
|
+
cache_file.unlink()
|
|
153
|
+
else:
|
|
154
|
+
# Clear all cache files
|
|
155
|
+
for cache_file in self.cache_dir.glob("policies_*.json"):
|
|
156
|
+
cache_file.unlink()
|
|
157
|
+
|
|
158
|
+
def _fetch_from_api(self, api_key: APIKey) -> dict:
|
|
159
|
+
"""Fetch policies from API.
|
|
160
|
+
|
|
161
|
+
Args:
|
|
162
|
+
api_key: API key for authentication
|
|
163
|
+
|
|
164
|
+
Returns:
|
|
165
|
+
Response data as dictionary
|
|
166
|
+
|
|
167
|
+
Raises:
|
|
168
|
+
Exception: On HTTP errors
|
|
169
|
+
"""
|
|
170
|
+
url = f"{self.api_base_url}/v1/policies"
|
|
171
|
+
headers = {
|
|
172
|
+
"Authorization": f"Bearer {api_key.raw_key}",
|
|
173
|
+
"Content-Type": "application/json",
|
|
174
|
+
"User-Agent": "raxe-ce/1.0.0",
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return self.http_client.get(url, headers)
|
|
178
|
+
|
|
179
|
+
def _parse_response(self, data: dict) -> list[Policy]:
|
|
180
|
+
"""Parse API response to Policy objects.
|
|
181
|
+
|
|
182
|
+
Args:
|
|
183
|
+
data: Response data from API
|
|
184
|
+
|
|
185
|
+
Returns:
|
|
186
|
+
List of Policy objects
|
|
187
|
+
|
|
188
|
+
Raises:
|
|
189
|
+
ValueError: If response format invalid
|
|
190
|
+
"""
|
|
191
|
+
# API returns same format as YAML for consistency
|
|
192
|
+
# Convert to YAML string and use existing parser
|
|
193
|
+
# (This avoids duplicating parsing logic)
|
|
194
|
+
|
|
195
|
+
if "policies" not in data:
|
|
196
|
+
raise ValueError("API response missing 'policies' field")
|
|
197
|
+
|
|
198
|
+
# Use YAML loader's parsing logic
|
|
199
|
+
return self.yaml_loader._parse_yaml_data(data, "<api>")
|
|
200
|
+
|
|
201
|
+
def _save_to_cache(self, customer_id: str, data: dict) -> None:
|
|
202
|
+
"""Save policies to local cache.
|
|
203
|
+
|
|
204
|
+
Args:
|
|
205
|
+
customer_id: Customer ID
|
|
206
|
+
data: Policy data to cache
|
|
207
|
+
"""
|
|
208
|
+
cache_file = self._get_cache_path(customer_id)
|
|
209
|
+
|
|
210
|
+
try:
|
|
211
|
+
with open(cache_file, "w") as f:
|
|
212
|
+
json.dump(data, f, indent=2)
|
|
213
|
+
except OSError:
|
|
214
|
+
# Cache write failed - not critical, just log and continue
|
|
215
|
+
# (Domain layer can't log, but application layer should)
|
|
216
|
+
pass
|
|
217
|
+
|
|
218
|
+
def _get_cache_path(self, customer_id: str) -> Path:
|
|
219
|
+
"""Get cache file path for customer.
|
|
220
|
+
|
|
221
|
+
Args:
|
|
222
|
+
customer_id: Customer ID
|
|
223
|
+
|
|
224
|
+
Returns:
|
|
225
|
+
Path to cache file
|
|
226
|
+
"""
|
|
227
|
+
# Sanitize customer_id for filename
|
|
228
|
+
safe_id = customer_id.replace("/", "_").replace("\\", "_")
|
|
229
|
+
return self.cache_dir / f"policies_{safe_id}.json"
|
|
230
|
+
|
|
231
|
+
def _default_http_client(self) -> HTTPClient:
|
|
232
|
+
"""Create default HTTP client using requests.
|
|
233
|
+
|
|
234
|
+
Returns:
|
|
235
|
+
HTTP client implementation
|
|
236
|
+
"""
|
|
237
|
+
try:
|
|
238
|
+
import requests
|
|
239
|
+
|
|
240
|
+
class RequestsHTTPClient:
|
|
241
|
+
def get(self, url: str, headers: dict[str, str]) -> dict:
|
|
242
|
+
response = requests.get(url, headers=headers, timeout=10)
|
|
243
|
+
response.raise_for_status()
|
|
244
|
+
return response.json()
|
|
245
|
+
|
|
246
|
+
return RequestsHTTPClient()
|
|
247
|
+
|
|
248
|
+
except ImportError:
|
|
249
|
+
# requests not available - return stub that raises error
|
|
250
|
+
class NoHTTPClient:
|
|
251
|
+
def get(self, url: str, headers: dict[str, str]) -> dict:
|
|
252
|
+
raise PolicyAPIError(
|
|
253
|
+
"HTTP client not available. Install 'requests' package."
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
return NoHTTPClient()
|