src/eric7/Documentation/Source/eric7.CycloneDXInterface.CycloneDXUtilities.html

branch
eric7
changeset 9209
b99e7fd55fd3
parent 9141
7085ece52151
child 9509
c06561080e32
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.CycloneDXInterface.CycloneDXUtilities</title>
4 <meta charset="UTF-8">
5 <link rel="stylesheet" href="styles.css">
6 </head>
7 <body>
8 <a NAME="top" ID="top"></a>
9 <h1>eric7.CycloneDXInterface.CycloneDXUtilities</h1>
10
11 <p>
12 Module implementing the interface to CycloneDX.
13 </p>
14 <h3>Global Attributes</h3>
15
16 <table>
17 <tr><td>None</td></tr>
18 </table>
19 <h3>Classes</h3>
20
21 <table>
22
23 <tr>
24 <td><a href="#CycloneDXEnvironmentParser">CycloneDXEnvironmentParser</a></td>
25 <td>Class implementing a parser to get package data for a named environment.</td>
26 </tr>
27 </table>
28 <h3>Functions</h3>
29
30 <table>
31
32 <tr>
33 <td><a href="#_addCycloneDXDependency">_addCycloneDXDependency</a></td>
34 <td>Function to add a dependency to the given list of components.</td>
35 </tr>
36 <tr>
37 <td><a href="#_amendMetaData">_amendMetaData</a></td>
38 <td>Function to amend the SBOM meta data according the given data.</td>
39 </tr>
40 <tr>
41 <td><a href="#addCycloneDXDependencies">addCycloneDXDependencies</a></td>
42 <td>Function to add dependency data to the list of created components.</td>
43 </tr>
44 <tr>
45 <td><a href="#addCycloneDXVulnerabilities">addCycloneDXVulnerabilities</a></td>
46 <td>Function to add vulnerability data to the list of created components.</td>
47 </tr>
48 <tr>
49 <td><a href="#createCycloneDXFile">createCycloneDXFile</a></td>
50 <td>Function to create a CyccloneDX SBOM file.</td>
51 </tr>
52 <tr>
53 <td><a href="#findCyccloneDXComponent">findCyccloneDXComponent</a></td>
54 <td>Function to find a component in a given list of components.</td>
55 </tr>
56 </table>
57 <hr />
58 <hr />
59 <a NAME="CycloneDXEnvironmentParser" ID="CycloneDXEnvironmentParser"></a>
60 <h2>CycloneDXEnvironmentParser</h2>
61
62 <p>
63 Class implementing a parser to get package data for a named environment.
64 </p>
65 <h3>Derived from</h3>
66 BaseParser
67 <h3>Class Attributes</h3>
68
69 <table>
70 <tr><td>None</td></tr>
71 </table>
72 <h3>Class Methods</h3>
73
74 <table>
75 <tr><td>None</td></tr>
76 </table>
77 <h3>Methods</h3>
78
79 <table>
80
81 <tr>
82 <td><a href="#CycloneDXEnvironmentParser.__init__">CycloneDXEnvironmentParser</a></td>
83 <td>Constructor</td>
84 </tr>
85 </table>
86 <h3>Static Methods</h3>
87
88 <table>
89 <tr><td>None</td></tr>
90 </table>
91
92 <a NAME="CycloneDXEnvironmentParser.__init__" ID="CycloneDXEnvironmentParser.__init__"></a>
93 <h4>CycloneDXEnvironmentParser (Constructor)</h4>
94 <b>CycloneDXEnvironmentParser</b>(<i>venvName</i>)
95
96 <p>
97 Constructor
98 </p>
99 <dl>
100
101 <dt><i>venvName</i> (str)</dt>
102 <dd>
103 name of the virtual environment
104 </dd>
105 </dl>
106 <div align="right"><a href="#top">Up</a></div>
107 <hr />
108 <hr />
109 <a NAME="_addCycloneDXDependency" ID="_addCycloneDXDependency"></a>
110 <h2>_addCycloneDXDependency</h2>
111 <b>_addCycloneDXDependency</b>(<i>dependency, components</i>)
112
113 <p>
114 Function to add a dependency to the given list of components.
115 </p>
116 <dl>
117
118 <dt><i>dependency</i> (dict)</dt>
119 <dd>
120 dependency to be added
121 </dd>
122 <dt><i>components</i> (list of Component)</dt>
123 <dd>
124 list of components
125 </dd>
126 </dl>
127 <div align="right"><a href="#top">Up</a></div>
128 <hr />
129 <hr />
130 <a NAME="_amendMetaData" ID="_amendMetaData"></a>
131 <h2>_amendMetaData</h2>
132 <b>_amendMetaData</b>(<i>bomMetaData, metadataDict</i>)
133
134 <p>
135 Function to amend the SBOM meta data according the given data.
136 </p>
137 <p>
138 The modifications done are:
139 <ul>
140 <li>add eric7 to the tools</li>
141 </ul>
142 </p>
143 <dl>
144
145 <dt><i>bomMetaData</i> (BomMetaData)</dt>
146 <dd>
147 reference to the SBOM meta data object
148 </dd>
149 <dt><i>metadataDict</i> (dict)</dt>
150 <dd>
151 dictionary containing additional meta data
152 </dd>
153 </dl>
154 <dl>
155 <dt>Return:</dt>
156 <dd>
157 reference to the modified SBOM meta data object
158 </dd>
159 </dl>
160 <dl>
161 <dt>Return Type:</dt>
162 <dd>
163 BomMetaData
164 </dd>
165 </dl>
166 <div align="right"><a href="#top">Up</a></div>
167 <hr />
168 <hr />
169 <a NAME="addCycloneDXDependencies" ID="addCycloneDXDependencies"></a>
170 <h2>addCycloneDXDependencies</h2>
171 <b>addCycloneDXDependencies</b>(<i>parser, venvName</i>)
172
173 <p>
174 Function to add dependency data to the list of created components.
175 </p>
176 <dl>
177
178 <dt><i>parser</i> (BaseParser)</dt>
179 <dd>
180 reference to the parser object containing the list of
181 components
182 </dd>
183 <dt><i>venvName</i> (str)</dt>
184 <dd>
185 name of the virtual environment
186 </dd>
187 </dl>
188 <div align="right"><a href="#top">Up</a></div>
189 <hr />
190 <hr />
191 <a NAME="addCycloneDXVulnerabilities" ID="addCycloneDXVulnerabilities"></a>
192 <h2>addCycloneDXVulnerabilities</h2>
193 <b>addCycloneDXVulnerabilities</b>(<i>parser</i>)
194
195 <p>
196 Function to add vulnerability data to the list of created components.
197 </p>
198 <dl>
199
200 <dt><i>parser</i> (BaseParser)</dt>
201 <dd>
202 reference to the parser object containing the list of
203 components
204 </dd>
205 </dl>
206 <div align="right"><a href="#top">Up</a></div>
207 <hr />
208 <hr />
209 <a NAME="createCycloneDXFile" ID="createCycloneDXFile"></a>
210 <h2>createCycloneDXFile</h2>
211 <b>createCycloneDXFile</b>(<i>venvName</i>)
212
213 <p>
214 Function to create a CyccloneDX SBOM file.
215 </p>
216 <dl>
217
218 <dt><i>venvName</i> (str)</dt>
219 <dd>
220 name of the virtual environment
221 </dd>
222 </dl>
223 <dl>
224
225 <dt>Raises <b>RuntimeError</b>:</dt>
226 <dd>
227 raised to indicate illegal creation parameters
228 </dd>
229 </dl>
230 <div align="right"><a href="#top">Up</a></div>
231 <hr />
232 <hr />
233 <a NAME="findCyccloneDXComponent" ID="findCyccloneDXComponent"></a>
234 <h2>findCyccloneDXComponent</h2>
235 <b>findCyccloneDXComponent</b>(<i>components, name</i>)
236
237 <p>
238 Function to find a component in a given list of components.
239 </p>
240 <dl>
241
242 <dt><i>components</i> (list of Component)</dt>
243 <dd>
244 list of components to scan
245 </dd>
246 <dt><i>name</i> (str)</dt>
247 <dd>
248 name of the component to search for
249 </dd>
250 </dl>
251 <dl>
252 <dt>Return:</dt>
253 <dd>
254 reference to the found component or None
255 </dd>
256 </dl>
257 <dl>
258 <dt>Return Type:</dt>
259 <dd>
260 Component or None
261 </dd>
262 </dl>
263 <div align="right"><a href="#top">Up</a></div>
264 <hr />
265 </body></html>

eric ide

mercurial