-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
model.XsUri
migrate control characters according to spec (#498)
fixes #497 --------- Signed-off-by: Jan Kowalleck <[email protected]>
- Loading branch information
1 parent
78957e6
commit e490429
Showing
12 changed files
with
409 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
tests/_data/snapshots/get_bom_for_issue_497_urls-1.0.xml.bin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" ?> | ||
<bom xmlns="http://cyclonedx.org/schema/bom/1.0" version="1"> | ||
<components> | ||
<component type="library"> | ||
<name>dummy</name> | ||
<version/> | ||
<modified>false</modified> | ||
</component> | ||
</components> | ||
</bom> |
23 changes: 23 additions & 0 deletions
23
tests/_data/snapshots/get_bom_for_issue_497_urls-1.1.xml.bin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" ?> | ||
<bom xmlns="http://cyclonedx.org/schema/bom/1.1" serialNumber="urn:uuid:1441d33a-e0fc-45b5-af3b-61ee52a88bac" version="1"> | ||
<components> | ||
<component type="library" bom-ref="dummy"> | ||
<name>dummy</name> | ||
<version/> | ||
<externalReferences> | ||
<reference type="other"> | ||
<url>https://acme.org</url> | ||
<comment>nothing special</comment> | ||
</reference> | ||
<reference type="other"> | ||
<url>https://acme.org/?bar%5b23%5D=42</url> | ||
<comment>pre-encoded</comment> | ||
</reference> | ||
<reference type="other"> | ||
<url>https://acme.org/?foo=sp%20ace&bar%5B23%5D=42&lt=1%3C2&gt=3%3E2&cb=%7Blol%7D</url> | ||
<comment>control characters</comment> | ||
</reference> | ||
</externalReferences> | ||
</component> | ||
</components> | ||
</bom> |
47 changes: 47 additions & 0 deletions
47
tests/_data/snapshots/get_bom_for_issue_497_urls-1.2.json.bin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"components": [ | ||
{ | ||
"bom-ref": "dummy", | ||
"externalReferences": [ | ||
{ | ||
"comment": "nothing special", | ||
"type": "other", | ||
"url": "https://acme.org" | ||
}, | ||
{ | ||
"comment": "pre-encoded", | ||
"type": "other", | ||
"url": "https://acme.org/?bar%5b23%5D=42" | ||
}, | ||
{ | ||
"comment": "control characters", | ||
"type": "other", | ||
"url": "https://acme.org/?foo=sp%20ace&bar%5B23%5D=42<=1%3C2>=3%3E2&cb=%7Blol%7D" | ||
} | ||
], | ||
"name": "dummy", | ||
"type": "library", | ||
"version": "" | ||
} | ||
], | ||
"dependencies": [ | ||
{ | ||
"ref": "dummy" | ||
} | ||
], | ||
"metadata": { | ||
"timestamp": "2023-01-07T13:44:32.312678+00:00", | ||
"tools": [ | ||
{ | ||
"name": "cyclonedx-python-lib", | ||
"vendor": "CycloneDX", | ||
"version": "TESTING" | ||
} | ||
] | ||
}, | ||
"serialNumber": "urn:uuid:1441d33a-e0fc-45b5-af3b-61ee52a88bac", | ||
"version": 1, | ||
"$schema": "http://cyclonedx.org/schema/bom-1.2b.schema.json", | ||
"bomFormat": "CycloneDX", | ||
"specVersion": "1.2" | ||
} |
36 changes: 36 additions & 0 deletions
36
tests/_data/snapshots/get_bom_for_issue_497_urls-1.2.xml.bin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" ?> | ||
<bom xmlns="http://cyclonedx.org/schema/bom/1.2" serialNumber="urn:uuid:1441d33a-e0fc-45b5-af3b-61ee52a88bac" version="1"> | ||
<metadata> | ||
<timestamp>2023-01-07T13:44:32.312678+00:00</timestamp> | ||
<tools> | ||
<tool> | ||
<vendor>CycloneDX</vendor> | ||
<name>cyclonedx-python-lib</name> | ||
<version>TESTING</version> | ||
</tool> | ||
</tools> | ||
</metadata> | ||
<components> | ||
<component type="library" bom-ref="dummy"> | ||
<name>dummy</name> | ||
<version/> | ||
<externalReferences> | ||
<reference type="other"> | ||
<url>https://acme.org</url> | ||
<comment>nothing special</comment> | ||
</reference> | ||
<reference type="other"> | ||
<url>https://acme.org/?bar%5b23%5D=42</url> | ||
<comment>pre-encoded</comment> | ||
</reference> | ||
<reference type="other"> | ||
<url>https://acme.org/?foo=sp%20ace&bar%5B23%5D=42&lt=1%3C2&gt=3%3E2&cb=%7Blol%7D</url> | ||
<comment>control characters</comment> | ||
</reference> | ||
</externalReferences> | ||
</component> | ||
</components> | ||
<dependencies> | ||
<dependency ref="dummy"/> | ||
</dependencies> | ||
</bom> |
47 changes: 47 additions & 0 deletions
47
tests/_data/snapshots/get_bom_for_issue_497_urls-1.3.json.bin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"components": [ | ||
{ | ||
"bom-ref": "dummy", | ||
"externalReferences": [ | ||
{ | ||
"comment": "nothing special", | ||
"type": "other", | ||
"url": "https://acme.org" | ||
}, | ||
{ | ||
"comment": "pre-encoded", | ||
"type": "other", | ||
"url": "https://acme.org/?bar%5b23%5D=42" | ||
}, | ||
{ | ||
"comment": "control characters", | ||
"type": "other", | ||
"url": "https://acme.org/?foo=sp%20ace&bar%5B23%5D=42<=1%3C2>=3%3E2&cb=%7Blol%7D" | ||
} | ||
], | ||
"name": "dummy", | ||
"type": "library", | ||
"version": "" | ||
} | ||
], | ||
"dependencies": [ | ||
{ | ||
"ref": "dummy" | ||
} | ||
], | ||
"metadata": { | ||
"timestamp": "2023-01-07T13:44:32.312678+00:00", | ||
"tools": [ | ||
{ | ||
"name": "cyclonedx-python-lib", | ||
"vendor": "CycloneDX", | ||
"version": "TESTING" | ||
} | ||
] | ||
}, | ||
"serialNumber": "urn:uuid:1441d33a-e0fc-45b5-af3b-61ee52a88bac", | ||
"version": 1, | ||
"$schema": "http://cyclonedx.org/schema/bom-1.3a.schema.json", | ||
"bomFormat": "CycloneDX", | ||
"specVersion": "1.3" | ||
} |
36 changes: 36 additions & 0 deletions
36
tests/_data/snapshots/get_bom_for_issue_497_urls-1.3.xml.bin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" ?> | ||
<bom xmlns="http://cyclonedx.org/schema/bom/1.3" serialNumber="urn:uuid:1441d33a-e0fc-45b5-af3b-61ee52a88bac" version="1"> | ||
<metadata> | ||
<timestamp>2023-01-07T13:44:32.312678+00:00</timestamp> | ||
<tools> | ||
<tool> | ||
<vendor>CycloneDX</vendor> | ||
<name>cyclonedx-python-lib</name> | ||
<version>TESTING</version> | ||
</tool> | ||
</tools> | ||
</metadata> | ||
<components> | ||
<component type="library" bom-ref="dummy"> | ||
<name>dummy</name> | ||
<version/> | ||
<externalReferences> | ||
<reference type="other"> | ||
<url>https://acme.org</url> | ||
<comment>nothing special</comment> | ||
</reference> | ||
<reference type="other"> | ||
<url>https://acme.org/?bar%5b23%5D=42</url> | ||
<comment>pre-encoded</comment> | ||
</reference> | ||
<reference type="other"> | ||
<url>https://acme.org/?foo=sp%20ace&bar%5B23%5D=42&lt=1%3C2&gt=3%3E2&cb=%7Blol%7D</url> | ||
<comment>control characters</comment> | ||
</reference> | ||
</externalReferences> | ||
</component> | ||
</components> | ||
<dependencies> | ||
<dependency ref="dummy"/> | ||
</dependencies> | ||
</bom> |
Oops, something went wrong.