📚 cwe enum relationship
列出 CWE 关系类型(RelationshipNature)的所有合法取值,如 ChildOf、ParentOf、CanPrecede 等。
语法
bash
cwe enum relationship [flags]参数
本命令无位置参数。
Flags
仅支持 全局参数 -o/--output。
示例
text 输出
bash
cwe enum relationshiptext
关系类型 (ChildOf/ParentOf/CanPrecede等) (N 项):
- ChildOf
- ParentOf
- CanPrecede
- CanFollow
- Requires
- RequiredBy
- CanAlsoBe
- PeerOf
...JSON 输出
bash
cwe enum relationship -o jsonjson
[
"ChildOf",
"ParentOf",
"CanPrecede",
"CanFollow",
"Requires",
"RequiredBy",
"CanAlsoBe",
"PeerOf"
]常见取值含义
| 取值 | 含义 |
|---|---|
ChildOf / ParentOf | 层级父子关系 |
CanPrecede / CanFollow | 顺序关系,前者可先于后者发生 |
Requires / RequiredBy | 依赖关系 |
CanAlsoBe | 同一弱点也可表现为另一弱点 |
PeerOf | 对等关系 |
使用场景
- 理解
nav各子命令对应的关系语义。 - 解读
show或registry get输出的Relationships字段。 - 自定义关系分析时获取合法取值集合。
与导航命令对应
nav 的 precede/follow/requires/required-by/can-also-be/peers 等子命令正是基于这些关系类型实现。