[attack] Extend attack configuration validation before simulation startup

Đang mở
#214 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@xxxdvt đang làm issue này rồi.

Từ ngày 11/11/2026.

  • #228 của @xxxdvt — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

enhancement
Problem or motivation

Attack configuration validation currently covers condition structure, duplicate stage IDs, registered stage types, supported capabilities, and selected stage parameters. Compatibility with actual target services is checked during execution, while missing message paths in spoofing rules are silently skipped.

Extend validation to check service compatibility, stage references, and known message fields before the simulation starts. Report configuration errors with their exact locations and warn about clearly inconsistent trigger conditions. Fields that depend on runtime data should have explicit runtime diagnostics instead of silently producing no effect.

Proposed solution
  • Add validation.py to validate attack definitions against the scenario’s merged participant configurations. Check that target services are configured and provide the required capabilities. Recursively walk attack and stage conditions to validate stage references and warn about simple trigger inconsistencies.
  • Add class-level message-type metadata alongside service capability definitions. Use existing message dataclasses to validate envelope and nested payload paths without creating service instances. Leave optional values and sequence lengths to runtime checks.
  • Refactor attack loading in scenario.py so configuration parsing and validation happen before participant creation and simulation ticks. Keep runtime target resolution and compatibility checks.
  • Pass the configuration filename and full field path through parsing and validation, including existing checks in attack_spec.py, stage_registry.py, and stage parameter parsing.
  • Update SpooferStage path resolution to distinguish missing attributes, unavailable optional values, and invalid indices. Report failures with attack, stage, rule, and path context instead of silently skipping them.
  • Add tests for early validation, precise error locations, trigger warnings, and runtime path diagnostics, while preserving existing valid configurations and interception behavior.
Area

Simulation

Alternatives considered

No response

Additional context

No response

Ngôn ngữ chính
Python
Star
11
Fork
11
Merge trung bình
1 ngày 16 giờ
Pull request đã merge (30 ngày)
12

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CAVISE/OpenCDA

Tất cả issue của CAVISE/OpenCDA

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.