1
1
# Importer
2
2
3
- ## Create a new CSAF importer
3
+ ## Server configuration
4
+
5
+ The ` importer ` service is started using ` trustd ` , e.g.
6
+
7
+ ``` shell
8
+ trustd importer --concurrency=4 --working-dir=" .trustify/importer"
9
+ ```
10
+
11
+ The default value for ` concurrency ` is 1. This is the maximum number
12
+ of importer jobs run simultaneously by the service.
13
+
14
+ The ` importer ` should be started with the same database and storage
15
+ options as the associated ` api ` service. Run the following to see what
16
+ those are:
17
+
18
+ ``` shell
19
+ trustd importer --help
20
+ ```
21
+
22
+ ## Client API
23
+
24
+ ### Create a new CSAF importer
4
25
5
26
``` shell
6
27
http POST localhost:8080/api/v2/importer/redhat-csaf csaf[source]=https://redhat.com/.well-known/csaf/provider-metadata.json csaf[disabled]:=false csaf[onlyPatterns][]=" ^cve-2023-" csaf[period]=30s csaf[v3Signatures]:=true
7
28
```
8
29
9
- ## Create a new OSV importer
30
+ ### Create a new OSV importer
10
31
11
32
``` shell
12
33
http POST localhost:8080/api/v2/importer/osv-r osv[source]=https://github.com/RConsortium/r-advisory-database osv[path]=vulns osv[disabled]:=false osv[period]=30s
13
34
```
14
35
15
- ## Create a new SBOM importer
36
+ ### Create a new SBOM importer
16
37
17
38
Quarkus & RHEL 9 data:
18
39
19
40
``` shell
20
41
http POST localhost:8080/api/v2/importer/redhat-sbom sbom[source]=https://access.redhat.com/security/data/sbom/beta/ sbom[keys][]=https://access.redhat.com/security/data/97f5eac4.txt#77E79ABE93673533ED09EBE2DCE3823597F5EAC4 sbom[disabled]:=false sbom[onlyPatterns][]=quarkus sbom[onlyPatterns][]=rhel-9 sbom[period]=30s sbom[v3Signatures]:=true
21
42
```
22
43
23
- ## Get all importers
44
+ ### Get all importers
24
45
25
46
``` shell
26
47
http GET localhost:8080/api/v2/importer
27
48
```
28
49
29
- ## Get a specific importer
50
+ ### Get a specific importer
30
51
31
52
``` shell
32
53
http GET localhost:8080/api/v2/importer/redhat-csaf
33
54
http GET localhost:8080/api/v2/importer/redhat-sbom
34
55
```
35
56
36
- ## Get reports
57
+ ### Get reports
37
58
38
59
``` shell
39
60
http GET localhost:8080/api/v2/importer/redhat-csaf/report
40
61
http GET localhost:8080/api/v2/importer/redhat-sbom/report
41
62
```
42
63
43
- ## Update an importer configuration
64
+ ### Update an importer configuration
44
65
45
66
``` shell
46
67
http PUT localhost:8080/api/v2/importer/redhat-csaf csaf[source]=https://redhat.com/.well-known/csaf/provider-metadata.json csaf[disabled]:=false csaf[period]=30s csaf[v3Signatures]:=true csaf[fetchRetries]:=50
@@ -58,29 +79,27 @@ To execute:
58
79
http GET localhost:8080/api/v2/importer/redhat-csaf | jq .configuration | jq .csaf.fetchRetries=50 | http PUT localhost:8080/api/v2/importer/redhat-csaf
59
80
```
60
81
61
- ## Patch an importer configuration
82
+ ### Patch an importer configuration
62
83
63
84
``` shell
64
85
http PATCH localhost:8080/api/v2/importer/redhat-csaf " Content-Type:application/merge-patch+json" csaf[fetchRetries]:=50
65
86
```
66
87
67
- ## Delete an importer
88
+ ### Delete an importer
68
89
69
90
``` shell
70
91
http DELETE localhost:8080/api/v2/importer/redhat-csaf
71
92
http DELETE localhost:8080/api/v2/importer/redhat-sbom
72
93
```
73
94
74
- ## Set the enabled state of an importer
95
+ ### Set the enabled state of an importer
75
96
76
97
``` shell
77
98
echo true | http PUT localhost:8080/api/v2/importer/redhat-sbom/enabled
78
99
```
79
100
80
- ## Force an importer run
101
+ ### Force an importer run
81
102
82
103
``` shell
83
104
http PUT localhost:8080/api/v2/importer/redhat-sbom/force
84
105
```
85
-
86
-
0 commit comments