Skip to content

Commit e0a153f

Browse files
authored
feat: don't add self to metafata.tools (#674)
fixes #673 Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 0ec785d commit e0a153f

File tree

380 files changed

+198
-9746
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

380 files changed

+198
-9746
lines changed

cyclonedx/model/bom.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
SchemaVersion1Dot6,
3838
)
3939
from ..serialization import LicenseRepositoryHelper, UrnUuidHelper
40-
from . import ExternalReference, Property, ThisTool
40+
from . import ExternalReference, Property
4141
from .bom_ref import BomRef
4242
from .component import Component
4343
from .contact import OrganizationalContact, OrganizationalEntity
@@ -89,9 +89,6 @@ def __init__(
8989
'Please use `bom.metadata.component.manufacturer` instead.',
9090
DeprecationWarning)
9191

92-
if not tools:
93-
self.tools.tools.add(ThisTool)
94-
9592
@property
9693
@serializable.type_mapping(serializable.helpers.XsdDateTime)
9794
@serializable.xml_sequence(1)

tests/_data/snapshots/enum_ComponentScope-1.2.json.bin

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,7 @@
3434
}
3535
],
3636
"metadata": {
37-
"timestamp": "2023-01-07T13:44:32.312678+00:00",
38-
"tools": [
39-
{
40-
"name": "cyclonedx-python-lib",
41-
"vendor": "CycloneDX",
42-
"version": "TESTING"
43-
}
44-
]
37+
"timestamp": "2023-01-07T13:44:32.312678+00:00"
4538
},
4639
"serialNumber": "urn:uuid:1441d33a-e0fc-45b5-af3b-61ee52a88bac",
4740
"version": 1,

tests/_data/snapshots/enum_ComponentScope-1.2.xml.bin

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
<bom xmlns="http://cyclonedx.org/schema/bom/1.2" serialNumber="urn:uuid:1441d33a-e0fc-45b5-af3b-61ee52a88bac" version="1">
33
<metadata>
44
<timestamp>2023-01-07T13:44:32.312678+00:00</timestamp>
5-
<tools>
6-
<tool>
7-
<vendor>CycloneDX</vendor>
8-
<name>cyclonedx-python-lib</name>
9-
<version>TESTING</version>
10-
</tool>
11-
</tools>
125
</metadata>
136
<components>
147
<component type="library" bom-ref="scoped-EXCLUDED">

tests/_data/snapshots/enum_ComponentScope-1.3.json.bin

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,7 @@
3434
}
3535
],
3636
"metadata": {
37-
"timestamp": "2023-01-07T13:44:32.312678+00:00",
38-
"tools": [
39-
{
40-
"name": "cyclonedx-python-lib",
41-
"vendor": "CycloneDX",
42-
"version": "TESTING"
43-
}
44-
]
37+
"timestamp": "2023-01-07T13:44:32.312678+00:00"
4538
},
4639
"serialNumber": "urn:uuid:1441d33a-e0fc-45b5-af3b-61ee52a88bac",
4740
"version": 1,

tests/_data/snapshots/enum_ComponentScope-1.3.xml.bin

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
<bom xmlns="http://cyclonedx.org/schema/bom/1.3" serialNumber="urn:uuid:1441d33a-e0fc-45b5-af3b-61ee52a88bac" version="1">
33
<metadata>
44
<timestamp>2023-01-07T13:44:32.312678+00:00</timestamp>
5-
<tools>
6-
<tool>
7-
<vendor>CycloneDX</vendor>
8-
<name>cyclonedx-python-lib</name>
9-
<version>TESTING</version>
10-
</tool>
11-
</tools>
125
</metadata>
136
<components>
147
<component type="library" bom-ref="scoped-EXCLUDED">

tests/_data/snapshots/enum_ComponentScope-1.4.json.bin

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -31,48 +31,7 @@
3131
}
3232
],
3333
"metadata": {
34-
"timestamp": "2023-01-07T13:44:32.312678+00:00",
35-
"tools": [
36-
{
37-
"externalReferences": [
38-
{
39-
"type": "build-system",
40-
"url": "https://github.com/CycloneDX/cyclonedx-python-lib/actions"
41-
},
42-
{
43-
"type": "distribution",
44-
"url": "https://pypi.org/project/cyclonedx-python-lib/"
45-
},
46-
{
47-
"type": "documentation",
48-
"url": "https://cyclonedx-python-library.readthedocs.io/"
49-
},
50-
{
51-
"type": "issue-tracker",
52-
"url": "https://github.com/CycloneDX/cyclonedx-python-lib/issues"
53-
},
54-
{
55-
"type": "license",
56-
"url": "https://github.com/CycloneDX/cyclonedx-python-lib/blob/main/LICENSE"
57-
},
58-
{
59-
"type": "release-notes",
60-
"url": "https://github.com/CycloneDX/cyclonedx-python-lib/blob/main/CHANGELOG.md"
61-
},
62-
{
63-
"type": "vcs",
64-
"url": "https://github.com/CycloneDX/cyclonedx-python-lib"
65-
},
66-
{
67-
"type": "website",
68-
"url": "https://github.com/CycloneDX/cyclonedx-python-lib/#readme"
69-
}
70-
],
71-
"name": "cyclonedx-python-lib",
72-
"vendor": "CycloneDX",
73-
"version": "TESTING"
74-
}
75-
]
34+
"timestamp": "2023-01-07T13:44:32.312678+00:00"
7635
},
7736
"serialNumber": "urn:uuid:1441d33a-e0fc-45b5-af3b-61ee52a88bac",
7837
"version": 1,

tests/_data/snapshots/enum_ComponentScope-1.4.xml.bin

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,6 @@
22
<bom xmlns="http://cyclonedx.org/schema/bom/1.4" serialNumber="urn:uuid:1441d33a-e0fc-45b5-af3b-61ee52a88bac" version="1">
33
<metadata>
44
<timestamp>2023-01-07T13:44:32.312678+00:00</timestamp>
5-
<tools>
6-
<tool>
7-
<vendor>CycloneDX</vendor>
8-
<name>cyclonedx-python-lib</name>
9-
<version>TESTING</version>
10-
<externalReferences>
11-
<reference type="build-system">
12-
<url>https://github.com/CycloneDX/cyclonedx-python-lib/actions</url>
13-
</reference>
14-
<reference type="distribution">
15-
<url>https://pypi.org/project/cyclonedx-python-lib/</url>
16-
</reference>
17-
<reference type="documentation">
18-
<url>https://cyclonedx-python-library.readthedocs.io/</url>
19-
</reference>
20-
<reference type="issue-tracker">
21-
<url>https://github.com/CycloneDX/cyclonedx-python-lib/issues</url>
22-
</reference>
23-
<reference type="license">
24-
<url>https://github.com/CycloneDX/cyclonedx-python-lib/blob/main/LICENSE</url>
25-
</reference>
26-
<reference type="release-notes">
27-
<url>https://github.com/CycloneDX/cyclonedx-python-lib/blob/main/CHANGELOG.md</url>
28-
</reference>
29-
<reference type="vcs">
30-
<url>https://github.com/CycloneDX/cyclonedx-python-lib</url>
31-
</reference>
32-
<reference type="website">
33-
<url>https://github.com/CycloneDX/cyclonedx-python-lib/#readme</url>
34-
</reference>
35-
</externalReferences>
36-
</tool>
37-
</tools>
385
</metadata>
396
<components>
407
<component type="library" bom-ref="scoped-EXCLUDED">

tests/_data/snapshots/enum_ComponentScope-1.5.json.bin

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -31,48 +31,7 @@
3131
}
3232
],
3333
"metadata": {
34-
"timestamp": "2023-01-07T13:44:32.312678+00:00",
35-
"tools": [
36-
{
37-
"externalReferences": [
38-
{
39-
"type": "build-system",
40-
"url": "https://github.com/CycloneDX/cyclonedx-python-lib/actions"
41-
},
42-
{
43-
"type": "distribution",
44-
"url": "https://pypi.org/project/cyclonedx-python-lib/"
45-
},
46-
{
47-
"type": "documentation",
48-
"url": "https://cyclonedx-python-library.readthedocs.io/"
49-
},
50-
{
51-
"type": "issue-tracker",
52-
"url": "https://github.com/CycloneDX/cyclonedx-python-lib/issues"
53-
},
54-
{
55-
"type": "license",
56-
"url": "https://github.com/CycloneDX/cyclonedx-python-lib/blob/main/LICENSE"
57-
},
58-
{
59-
"type": "release-notes",
60-
"url": "https://github.com/CycloneDX/cyclonedx-python-lib/blob/main/CHANGELOG.md"
61-
},
62-
{
63-
"type": "vcs",
64-
"url": "https://github.com/CycloneDX/cyclonedx-python-lib"
65-
},
66-
{
67-
"type": "website",
68-
"url": "https://github.com/CycloneDX/cyclonedx-python-lib/#readme"
69-
}
70-
],
71-
"name": "cyclonedx-python-lib",
72-
"vendor": "CycloneDX",
73-
"version": "TESTING"
74-
}
75-
]
34+
"timestamp": "2023-01-07T13:44:32.312678+00:00"
7635
},
7736
"properties": [
7837
{

tests/_data/snapshots/enum_ComponentScope-1.5.xml.bin

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,6 @@
22
<bom xmlns="http://cyclonedx.org/schema/bom/1.5" serialNumber="urn:uuid:1441d33a-e0fc-45b5-af3b-61ee52a88bac" version="1">
33
<metadata>
44
<timestamp>2023-01-07T13:44:32.312678+00:00</timestamp>
5-
<tools>
6-
<tool>
7-
<vendor>CycloneDX</vendor>
8-
<name>cyclonedx-python-lib</name>
9-
<version>TESTING</version>
10-
<externalReferences>
11-
<reference type="build-system">
12-
<url>https://github.com/CycloneDX/cyclonedx-python-lib/actions</url>
13-
</reference>
14-
<reference type="distribution">
15-
<url>https://pypi.org/project/cyclonedx-python-lib/</url>
16-
</reference>
17-
<reference type="documentation">
18-
<url>https://cyclonedx-python-library.readthedocs.io/</url>
19-
</reference>
20-
<reference type="issue-tracker">
21-
<url>https://github.com/CycloneDX/cyclonedx-python-lib/issues</url>
22-
</reference>
23-
<reference type="license">
24-
<url>https://github.com/CycloneDX/cyclonedx-python-lib/blob/main/LICENSE</url>
25-
</reference>
26-
<reference type="release-notes">
27-
<url>https://github.com/CycloneDX/cyclonedx-python-lib/blob/main/CHANGELOG.md</url>
28-
</reference>
29-
<reference type="vcs">
30-
<url>https://github.com/CycloneDX/cyclonedx-python-lib</url>
31-
</reference>
32-
<reference type="website">
33-
<url>https://github.com/CycloneDX/cyclonedx-python-lib/#readme</url>
34-
</reference>
35-
</externalReferences>
36-
</tool>
37-
</tools>
385
</metadata>
396
<components>
407
<component type="library" bom-ref="scoped-EXCLUDED">

tests/_data/snapshots/enum_ComponentScope-1.6.json.bin

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -31,48 +31,7 @@
3131
}
3232
],
3333
"metadata": {
34-
"timestamp": "2023-01-07T13:44:32.312678+00:00",
35-
"tools": [
36-
{
37-
"externalReferences": [
38-
{
39-
"type": "build-system",
40-
"url": "https://github.com/CycloneDX/cyclonedx-python-lib/actions"
41-
},
42-
{
43-
"type": "distribution",
44-
"url": "https://pypi.org/project/cyclonedx-python-lib/"
45-
},
46-
{
47-
"type": "documentation",
48-
"url": "https://cyclonedx-python-library.readthedocs.io/"
49-
},
50-
{
51-
"type": "issue-tracker",
52-
"url": "https://github.com/CycloneDX/cyclonedx-python-lib/issues"
53-
},
54-
{
55-
"type": "license",
56-
"url": "https://github.com/CycloneDX/cyclonedx-python-lib/blob/main/LICENSE"
57-
},
58-
{
59-
"type": "release-notes",
60-
"url": "https://github.com/CycloneDX/cyclonedx-python-lib/blob/main/CHANGELOG.md"
61-
},
62-
{
63-
"type": "vcs",
64-
"url": "https://github.com/CycloneDX/cyclonedx-python-lib"
65-
},
66-
{
67-
"type": "website",
68-
"url": "https://github.com/CycloneDX/cyclonedx-python-lib/#readme"
69-
}
70-
],
71-
"name": "cyclonedx-python-lib",
72-
"vendor": "CycloneDX",
73-
"version": "TESTING"
74-
}
75-
]
34+
"timestamp": "2023-01-07T13:44:32.312678+00:00"
7635
},
7736
"properties": [
7837
{

0 commit comments

Comments
 (0)