Skip to content

Commit 9010a66

Browse files
committed
Add EVIDENCE_DESCRIPTION property to FINDING nodes.
1 parent 01e35ff commit 9010a66

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

schema/src/main/scala/io/shiftleft/codepropertygraph/schema/Finding.scala

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,23 @@ object Finding extends SchemaBase {
5454
.protoId(ProtoIds.KeyValuePair)
5555
.addProperties(key, value)
5656

57-
// node relations
57+
val evidenceDescription = builder
58+
.addProperty(
59+
name = "EVIDENCE_DESCRIPTION",
60+
valueType = ValueType.String,
61+
comment =
62+
"""Optional description for nodes in evidence. Used to give a hint about the kind of evidence
63+
|provided by a node. The evidence description and evidence nodes are associated by index.
64+
|""".stripMargin
65+
)
66+
.asList
67+
.protoId(ProtoIds.EvidenceDescription)
68+
69+
// node relations
5870
finding
5971
.addContainedNode(builder.anyNode, "evidence", Cardinality.List)
6072
.addContainedNode(keyValuePair, "keyValuePairs", Cardinality.List)
61-
73+
.addProperty(evidenceDescription)
6274
// constants
6375

6476
}

schema/src/main/scala/io/shiftleft/codepropertygraph/schema/ProtoIds.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,4 +171,5 @@ object ProtoIds {
171171
val FieldIdentifier = 2001081
172172
val CanonicalName = 2001092
173173
val ContainedRef = 2007161
174+
val EvidenceDescription = 2007162
174175
}

0 commit comments

Comments
 (0)