[attack] Extend attack configuration validation before simulation startup

オープン
#214 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@xxxdvt がすでに取り組んでいます。

2026年11月11日 から。

  • #228 @xxxdvt による — オープン

評価

この issue はまだ評価されていません。

説明

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

主要言語
Python
スター
11
フォーク
11
平均マージ
1日 16時間
マージ済み PR(30日)
12

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CAVISE/OpenCDA のほかの issue

CAVISE/OpenCDA の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。