File tree Expand file tree Collapse file tree 6 files changed +55
-5
lines changed
tools/src/test/resources/1.7 Expand file tree Collapse file tree 6 files changed +55
-5
lines changed Original file line number Diff line number Diff line change 3232 {
3333 "bom-ref" : " citation-1" ,
3434 "pointers" : [ " /components/0/name" ],
35- "expressions" : [ " expression here " ],
35+ "expressions" : [ " $..[?(@.bom-ref=='component-1')].version " ],
3636 "timestamp" : " 2025-05-01T14:00:00Z" ,
3737 "note" : " Should not have both a pointer and expression."
3838 }
Original file line number Diff line number Diff line change @@ -17,7 +17,32 @@ components {
1717 bom_ref: " component-1"
1818 name: " example-lib"
1919 version: " 1.2.3"
20-
20+ licenses {
21+ license {
22+ id: " Apache-2.0"
23+ }
24+ }
2125}
2226
23- // continue here
27+ # # !! NO formal check possible
28+ # citations {
29+ # bom_ref: "citation-1"
30+ # pointers: { pointer: "/components/0/name" }
31+ # timestamp {
32+ # seconds: 1746108000
33+ # nanos: 0
34+ # }
35+ # note: "Should have at least one of the following property sets: property 'attributedTo' or property 'process'"
36+ # }
37+
38+
39+ citations {
40+ bom_ref: " citation-1"
41+ pointers: { pointer: " /components/0/name" }
42+ expressions: { expression: " $..[?(bom_ref=='component-1')].version" }
43+ timestamp {
44+ seconds: 1746108000
45+ nanos: 0
46+ }
47+ note: " Should not have both a pointer and expression."
48+ }
Original file line number Diff line number Diff line change 8989 <pointer >/components/0/licenses/0/license/id</pointer >
9090 </pointers >
9191 <expressions >
92- <expression >expression here </expression >
92+ <expression >//*[@bom-ref='component-1']/version </expression >
9393 </expressions >
9494 <timestamp >2025-05-01T14:05:00Z</timestamp >
9595 <process >task-license-scan</process >
Original file line number Diff line number Diff line change 4646 },
4747 {
4848 "bom-ref" : " citation-3" ,
49+ "expression" : " $..[?(@.bom-ref=='component-1')].version" ,
50+ "timestamp" : " 2025-05-01T14:00:00Z" ,
51+ "process" : " task-license-scan" ,
52+ "note" : " Semi-manually entered by Alice Example - with `process`"
53+ },
54+ {
55+ "bom-ref" : " citation-4" ,
4956 "expressions" : [ " $.components[*].licenses[*].license.id" ],
5057 "timestamp" : " 2025-05-01T14:05:00Z" ,
5158 "attributedTo" : " scan-tool-1" ,
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ citations [
4141 note: " Manually entered by Alice Example"
4242 },
4343 {
44- bom_ref: " citation-1 "
44+ bom_ref: " citation-2 "
4545 pointers: { pointer: " /components/0/name" }
4646 timestamp: {
4747 seconds: 1746108000
@@ -52,6 +52,16 @@ citations [
5252 },
5353 {
5454 bom_ref: " citation-3"
55+ expressions: { expression: " $..[?(bom_ref=='component-1')].version" }
56+ timestamp: {
57+ seconds: 1746108000
58+ nanos: 0
59+ }
60+ process: " task-license-scan"
61+ note: " Semi-manually entered by Alice Example - with `process`"
62+ },
63+ {
64+ bom_ref: " citation-4"
5565 expressions: { expression: " $.components[*].licenses[*].license.id" }
5666 timestamp: {
5767 seconds: 1746108000
Original file line number Diff line number Diff line change 6767 <note >Semi-manually entered by Alice Example - with `process`</note >
6868 </citation >
6969 <citation bom-ref =" citation-3" >
70+ <expressions >
71+ <expression >//*[@bom-ref='component-1']/version</expression >
72+ </expressions >
73+ <timestamp >2025-05-01T14:00:00Z</timestamp >
74+ <attributedTo >person-1</attributedTo >
75+ <note >Semi-manually entered by Alice Example - with `process`</note >
76+ </citation >
77+ <citation bom-ref =" citation-4" >
7078 <expressions >
7179 <expression >/components/component/licenses/license/id</expression >
7280 </expressions >
You can’t perform that action at this time.
0 commit comments