[attacks] Add message filtering to attack stages
维护者通常 1 天内回复
@Dorguy 已经在做这个了。
开始于 2026年11月11日。
评估
这个 Issue 还没有评估数据。
描述
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 小时
- 30 天内合并 PR
- 12
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CAVISE/OpenCDA 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 54/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 47/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
documentation good first issue help wanted
难度 1/5 1 小时以内 新手友好度 90/100
-
documentation good first issue help wanted
难度 1/5 1 小时以内 新手友好度 88/100
-
documentation good first issue help wanted
难度 2/5 1-3 小时 新手友好度 78/100
-
good first issue help wanted
难度 2/5 1-3 小时 新手友好度 82/100