[attack] Extend attack configuration validation before simulation startup

Abierto
#214 1 comentario 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@xxxdvt ya está trabajando en esto.

Desde el 11/11/2026.

  • #228 de @xxxdvt — abierto

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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

Lenguaje dominante
Python
Estrellas
11
Forks
11
Merge medio
1 d 16 h
PR fusionados (30 d)
12

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de CAVISE/OpenCDA

Todos los issues de CAVISE/OpenCDA

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.