Fri, 27 Oct 2023 14:09:40 +0200
Regenerated the source documentation with the corrected module parser.
<!DOCTYPE html> <html><head> <title>eric7.CycloneDXInterface.CycloneDXUtilities</title> <meta charset="UTF-8"> <link rel="stylesheet" href="styles.css"> </head> <body> <a NAME="top" ID="top"></a> <h1>eric7.CycloneDXInterface.CycloneDXUtilities</h1> <p> Module implementing the interface to CycloneDX. </p> <h3>Global Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> <table> <tr> <td><a href="#CycloneDXEnvironmentParser">CycloneDXEnvironmentParser</a></td> <td>Class implementing a parser to get package data for a named environment.</td> </tr> </table> <h3>Functions</h3> <table> <tr> <td><a href="#_addCycloneDXDependency">_addCycloneDXDependency</a></td> <td>Function to add a dependency to the given list of components.</td> </tr> <tr> <td><a href="#_amendMetaData">_amendMetaData</a></td> <td>Function to amend the SBOM meta data according the given data.</td> </tr> <tr> <td><a href="#_prettifyJSON">_prettifyJSON</a></td> <td>Function to prettify the SBOM JSON output generated by CycloneDX.</td> </tr> <tr> <td><a href="#_prettifyXML">_prettifyXML</a></td> <td>Function to prettify the SBOM XML output generated by CycloneDX.</td> </tr> <tr> <td><a href="#addCycloneDXDependencies">addCycloneDXDependencies</a></td> <td>Function to add dependency data to the list of created components.</td> </tr> <tr> <td><a href="#addCycloneDXVulnerabilities">addCycloneDXVulnerabilities</a></td> <td>Function to add vulnerability data to the list of created components.</td> </tr> <tr> <td><a href="#createCycloneDXFile">createCycloneDXFile</a></td> <td>Function to create a CyccloneDX SBOM file.</td> </tr> <tr> <td><a href="#findCyccloneDXComponent">findCyccloneDXComponent</a></td> <td>Function to find a component in a given list of components.</td> </tr> </table> <hr /> <hr /> <a NAME="CycloneDXEnvironmentParser" ID="CycloneDXEnvironmentParser"></a> <h2>CycloneDXEnvironmentParser</h2> <p> Class implementing a parser to get package data for a named environment. </p> <h3>Derived from</h3> BaseParser <h3>Class Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Class Methods</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#CycloneDXEnvironmentParser.__init__">CycloneDXEnvironmentParser</a></td> <td>Constructor</td> </tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> <a NAME="CycloneDXEnvironmentParser.__init__" ID="CycloneDXEnvironmentParser.__init__"></a> <h4>CycloneDXEnvironmentParser (Constructor)</h4> <b>CycloneDXEnvironmentParser</b>(<i>venvName</i>) <p> Constructor </p> <dl> <dt><i>venvName</i> (str)</dt> <dd> name of the virtual environment </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="_addCycloneDXDependency" ID="_addCycloneDXDependency"></a> <h2>_addCycloneDXDependency</h2> <b>_addCycloneDXDependency</b>(<i>dependency, components</i>) <p> Function to add a dependency to the given list of components. </p> <dl> <dt><i>dependency</i> (dict)</dt> <dd> dependency to be added </dd> <dt><i>components</i> (list of Component)</dt> <dd> list of components </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="_amendMetaData" ID="_amendMetaData"></a> <h2>_amendMetaData</h2> <b>_amendMetaData</b>(<i>bomMetaData, metadataDict</i>) <p> Function to amend the SBOM meta data according the given data. </p> <p> The modifications done are: <ul> <li>add eric7 to the tools</li> </ul> </p> <dl> <dt><i>bomMetaData</i> (BomMetaData)</dt> <dd> reference to the SBOM meta data object </dd> <dt><i>metadataDict</i> (dict)</dt> <dd> dictionary containing additional meta data </dd> </dl> <dl> <dt>Return:</dt> <dd> reference to the modified SBOM meta data object </dd> </dl> <dl> <dt>Return Type:</dt> <dd> BomMetaData </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="_prettifyJSON" ID="_prettifyJSON"></a> <h2>_prettifyJSON</h2> <b>_prettifyJSON</b>(<i>inputStr</i>) <p> Function to prettify the SBOM JSON output generated by CycloneDX. </p> <dl> <dt><i>inputStr</i> (str)</dt> <dd> output generated by CycloneDX </dd> </dl> <dl> <dt>Return:</dt> <dd> prettified SBOM string </dd> </dl> <dl> <dt>Return Type:</dt> <dd> str </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="_prettifyXML" ID="_prettifyXML"></a> <h2>_prettifyXML</h2> <b>_prettifyXML</b>(<i>inputStr</i>) <p> Function to prettify the SBOM XML output generated by CycloneDX. </p> <p> Note: Prettifying an XML tree works only with Python 3.9 and above! </p> <dl> <dt><i>inputStr</i> (str)</dt> <dd> output generated by CycloneDX </dd> </dl> <dl> <dt>Return:</dt> <dd> prettified SBOM string </dd> </dl> <dl> <dt>Return Type:</dt> <dd> str </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="addCycloneDXDependencies" ID="addCycloneDXDependencies"></a> <h2>addCycloneDXDependencies</h2> <b>addCycloneDXDependencies</b>(<i>parser, venvName</i>) <p> Function to add dependency data to the list of created components. </p> <dl> <dt><i>parser</i> (BaseParser)</dt> <dd> reference to the parser object containing the list of components </dd> <dt><i>venvName</i> (str)</dt> <dd> name of the virtual environment </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="addCycloneDXVulnerabilities" ID="addCycloneDXVulnerabilities"></a> <h2>addCycloneDXVulnerabilities</h2> <b>addCycloneDXVulnerabilities</b>(<i>parser</i>) <p> Function to add vulnerability data to the list of created components. </p> <dl> <dt><i>parser</i> (BaseParser)</dt> <dd> reference to the parser object containing the list of components </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="createCycloneDXFile" ID="createCycloneDXFile"></a> <h2>createCycloneDXFile</h2> <b>createCycloneDXFile</b>(<i>venvName</i>) <p> Function to create a CyccloneDX SBOM file. </p> <dl> <dt><i>venvName</i> (str)</dt> <dd> name of the virtual environment </dd> </dl> <dl> <dt>Raises <b>RuntimeError</b>:</dt> <dd> raised to indicate illegal creation parameters </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="findCyccloneDXComponent" ID="findCyccloneDXComponent"></a> <h2>findCyccloneDXComponent</h2> <b>findCyccloneDXComponent</b>(<i>components, name</i>) <p> Function to find a component in a given list of components. </p> <dl> <dt><i>components</i> (list of Component)</dt> <dd> list of components to scan </dd> <dt><i>name</i> (str)</dt> <dd> name of the component to search for </dd> </dl> <dl> <dt>Return:</dt> <dd> reference to the found component or None </dd> </dl> <dl> <dt>Return Type:</dt> <dd> Component or None </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> </body></html>