[attacks] Add message filtering to attack stages

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

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

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

2026年11月11日 から。

評価

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

説明

enhancement
Problem or motivation

Attack targets currently select service instances using simulation state. Once an interceptor is installed, spoofing rules apply to matching message structures, while dropping affects the entire output or randomly selected batch elements.

There is no shared mechanism for selecting individual messages by sender, recipient, payload type, or payload field values. This limits experiments that should affect a specific vehicle or message category while preserving other traffic handled by the same service.

Introduce reusable message filters for spoofing, dropping, replay, and future stages. Messages that do not match a filter should pass through unchanged.

Proposed solution

Add an optional message_filter to the stage configuration. The existing target selector chooses service instances, and the filter determines which messages handled by those services the stage applies to.

Support matching by sender ID, recipient ID, payload type, and exact payload field values. A message matches only if all configured conditions are met. If a field referenced by a condition is missing, the message does not match. Validate the filter configuration when loading the scenario.

Evaluate the filter at the input to each stage for every message, including each element of a batch. Messages that do not match pass through unchanged and can still be processed by subsequent stages. Preserve the relative order of messages that remain in the batch.

Use the same filtering logic for spoofing, dropping, replay, and future stages. When message_filter is omitted, the stage retains its current behavior.

Add tests for batches containing both matching and non-matching messages, missing fields, multiple conditions, and scenarios without a filter. Document an example that selects messages of a given type from one simulated vehicle.

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 を短くまとめたダイジェスト。