Skip to content

Commit 57e9dc7

Browse files
committed
doc: updated documentation with Conda support (and missed updates for externalReferences)
Signed-off-by: Paul Horton <[email protected]>
1 parent bd29c78 commit 57e9dc7

File tree

2 files changed

+31
-21
lines changed

2 files changed

+31
-21
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ You can use one of the parsers to obtain information about your project or envir
4949

5050
| Parser | Class / Import | Description |
5151
| ------- | ------ | ------ |
52+
| CondaListJsonParser | `from cyclonedx.parser.conda import CondaListJsonParser` | Parses input provided as a `str` that is output from `conda list --json` |
53+
| CondaListExplicitParser | `from cyclonedx.parser.conda import CondaListExplicitParser` | Parses input provided as a `str` that is output from `conda list --explicit` or `conda list --explicit --md5` |
5254
| Environment | `from cyclonedx.parser.environment import EnvironmentParser` | Looks at the packaged installed in your current Python environment. |
5355
| PipEnvParser | `from cyclonedx.parser.pipenv import PipEnvParser` | Parses `Pipfile.lock` content passed in as a string. |
5456
| PipEnvFileParser | `from cyclonedx.parser.pipenv import PipEnvFileParser` | Parses the `Pipfile.lock` file at the supplied path. |
@@ -194,6 +196,11 @@ _Note: We refer throughout using XPath, but the same is true for both XML and JS
194196
<td>Y</td><td>Y</td><td>Y</td><td>Y</td>
195197
<td>&nbsp;</td>
196198
</tr>
199+
<tr>
200+
<td><code>./externalReferences</code></td>
201+
<td>Y</td><td>Y</td><td>Y</td><td>N/A</td>
202+
<td>Not all Parsers have this information. It will be populated where there is information available.</td>
203+
</tr>
197204
<tr>
198205
<td><code>./hashes</code></td>
199206
<td>Y</td><td>Y</td><td>Y</td><td>Y</td>

cyclonedx/parser/__init__.py

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,28 @@
2424
information is obtained by each set of Parsers. It does NOT guarantee the information is output in the resulting
2525
CycloneDX BOM document.
2626
27-
| Data Path | Environment | Pipenv | Poetry | Requirements |
27+
| Data Path | Conda | Environment | Pipenv | Poetry | Requirements |
2828
| ----------- | ----------- | ----------- | ----------- | ----------- |
29-
| `component.supplier` | N (if in package METADATA) | N/A | | |
30-
| `component.author` | Y (if in package METADATA) | N/A | | |
31-
| `component.publisher` | N (if in package METADATA) | N/A | | |
32-
| `component.group` | - | - | - | - |
33-
| `component.name` | Y | Y | Y | Y |
34-
| `component.version` | Y | Y | Y | Y |
35-
| `component.description` | N | N/A | N | N/A |
36-
| `component.scope` | N | N/A | N | N/A |
37-
| `component.hashes` | N/A | Y - see below (1) | Y - see below (1) | N/A |
38-
| `component.licenses` | Y (if in package METADATA) | N/A | N/A | N/A |
39-
| `component.copyright` | N (if in package METADATA) | N/A | N/A | N/A |
40-
| `component.cpe` | _Deprecated_ | _Deprecated_ | _Deprecated_ | _Deprecated_ |
41-
| `component.purl` | Y | Y | Y | Y |
42-
| `component.swid` | N/A | N/A | N/A | N/A |
43-
| `component.modified` | _Deprecated_ | _Deprecated_ | _Deprecated_ | _Deprecated_ |
44-
| `component.pedigree` | N/A | N/A | N/A | N/A |
45-
| `component.externalReferences` | N/A | Y - see below (1) | Y - see below (1) | N/A |
46-
| `component.properties` | N/A | N/A | N/A | N/A |
47-
| `component.components` | N/A | N/A | N/A | N/A |
48-
| `component.evidence` | N/A | N/A | N/A | N/A |
29+
| `component.supplier` | N | N (if in package METADATA) | N/A | | |
30+
| `component.author` | N | Y (if in package METADATA) | N/A | | |
31+
| `component.publisher` | N | N (if in package METADATA) | N/A | | |
32+
| `component.group` | - | - | - | - | - |
33+
| `component.name` | Y |Y | Y | Y | Y |
34+
| `component.version` | Y |Y | Y | Y | Y |
35+
| `component.description` | N |N | N/A | N | N/A |
36+
| `component.scope` | N |N | N/A | N | N/A |
37+
| `component.hashes` | Y - see below (2) | N/A | Y - see below (1) | Y - see below (1) | N/A |
38+
| `component.licenses` | N | Y (if in package METADATA) | N/A | N/A | N/A |
39+
| `component.copyright` | N |N (if in package METADATA) | N/A | N/A | N/A |
40+
| `component.cpe` | _Deprecated_ |_Deprecated_ | _Deprecated_ | _Deprecated_ | _Deprecated_ |
41+
| `component.purl` | Y |Y | Y | Y | Y |
42+
| `component.swid` | N/A |N/A | N/A | N/A | N/A |
43+
| `component.modified` | _Deprecated_ |_Deprecated_ | _Deprecated_ | _Deprecated_ | _Deprecated_ |
44+
| `component.pedigree` | N/A |N/A | N/A | N/A | N/A |
45+
| `component.externalReferences` | Y - see below (3) | N/A | Y - see below (1) | Y - see below (1) | N/A |
46+
| `component.properties` | N/A | N/A | N/A | N/A | N/A |
47+
| `component.components` | N/A | N/A | N/A | N/A | N/A |
48+
| `component.evidence` | N/A | N/A | N/A | N/A | N/A |
4949
5050
**Legend:**
5151
@@ -61,6 +61,9 @@
6161
supports only a single set of hashes identifying a single artefact at `component.hashes`. To cater for this
6262
situation in Python, we add the hashes to `component.externalReferences`, as we cannot determine which package was
6363
actually obtained and installed to meet a given dependency.
64+
2. MD5 hashses are available when using the `CondaListExplicitParser` with output from the conda command
65+
`conda list --explicit --md5` only.
66+
3. For Conda, we provide a link to the registry as provided in the Conda output.
6467
6568
"""
6669

0 commit comments

Comments
 (0)