Skip to content

Commit 9b99070

Browse files
committed
Sort aliases in github advisory
Signed-off-by: Tushar Goel <[email protected]>
1 parent 63f5873 commit 9b99070

File tree

7 files changed

+49
-49
lines changed

7 files changed

+49
-49
lines changed

vulnerabilities/importers/github.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def process_response(resp: dict, package_type: str) -> Iterable[AdvisoryData]:
320320
logger.error(f"Unknown identifier type {identifier_type!r} and value {value!r}")
321321

322322
yield AdvisoryData(
323-
aliases=dedupe(aliases),
323+
aliases=sorted(dedupe(aliases)),
324324
summary=summary,
325325
references=references,
326326
affected_packages=affected_packages,

vulnerabilities/tests/test_data/github_api/composer-expected.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{
33
"aliases": [
4-
"GHSA-6qcc-whgp-pjj2",
5-
"CVE-2022-0832"
4+
"CVE-2022-0832",
5+
"GHSA-6qcc-whgp-pjj2"
66
],
77
"summary": "Cross-site Scripting in Pimcore",
88
"affected_packages": [
@@ -50,8 +50,8 @@
5050
},
5151
{
5252
"aliases": [
53-
"GHSA-q67f-3jq4-mww2",
54-
"CVE-2022-0831"
53+
"CVE-2022-0831",
54+
"GHSA-q67f-3jq4-mww2"
5555
],
5656
"summary": "Cross-site Scripting in Pimcore",
5757
"affected_packages": [
@@ -99,8 +99,8 @@
9999
},
100100
{
101101
"aliases": [
102-
"GHSA-x28w-hvwc-mp75",
103-
"CVE-2022-0895"
102+
"CVE-2022-0895",
103+
"GHSA-x28w-hvwc-mp75"
104104
],
105105
"summary": "Static Code Injection in Microweber",
106106
"affected_packages": [
@@ -148,8 +148,8 @@
148148
},
149149
{
150150
"aliases": [
151-
"GHSA-gj26-g5qf-jrh7",
152-
"CVE-2022-0589"
151+
"CVE-2022-0589",
152+
"GHSA-gj26-g5qf-jrh7"
153153
],
154154
"summary": "Cross-site Scripting in librenms",
155155
"affected_packages": [

vulnerabilities/tests/test_data/github_api/gem-expected.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{
33
"aliases": [
4-
"GHSA-6mq2-37j5-w6r6",
5-
"CVE-2009-4492"
4+
"CVE-2009-4492",
5+
"GHSA-6mq2-37j5-w6r6"
66
],
77
"summary": "Moderate severity vulnerability that affects webrick",
88
"affected_packages": [
@@ -85,8 +85,8 @@
8585
},
8686
{
8787
"aliases": [
88-
"GHSA-w749-p3v6-hccq",
89-
"CVE-2022-21831"
88+
"CVE-2022-21831",
89+
"GHSA-w749-p3v6-hccq"
9090
],
9191
"summary": "Possible code injection vulnerability in Rails / Active Storage",
9292
"affected_packages": [
@@ -139,8 +139,8 @@
139139
},
140140
{
141141
"aliases": [
142-
"GHSA-w749-p3v6-hccq",
143-
"CVE-2022-21831"
142+
"CVE-2022-21831",
143+
"GHSA-w749-p3v6-hccq"
144144
],
145145
"summary": "Possible code injection vulnerability in Rails / Active Storage",
146146
"affected_packages": [
@@ -193,8 +193,8 @@
193193
},
194194
{
195195
"aliases": [
196-
"GHSA-w749-p3v6-hccq",
197-
"CVE-2022-21831"
196+
"CVE-2022-21831",
197+
"GHSA-w749-p3v6-hccq"
198198
],
199199
"summary": "Possible code injection vulnerability in Rails / Active Storage",
200200
"affected_packages": [
@@ -247,8 +247,8 @@
247247
},
248248
{
249249
"aliases": [
250-
"GHSA-w749-p3v6-hccq",
251-
"CVE-2022-21831"
250+
"CVE-2022-21831",
251+
"GHSA-w749-p3v6-hccq"
252252
],
253253
"summary": "Possible code injection vulnerability in Rails / Active Storage",
254254
"affected_packages": [

vulnerabilities/tests/test_data/github_api/golang-expected.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{
33
"aliases": [
4-
"GHSA-vj3f-3286-r4pf",
5-
"CVE-2014-9356"
4+
"CVE-2014-9356",
5+
"GHSA-vj3f-3286-r4pf"
66
],
77
"summary": "Path Traversal in Docker",
88
"affected_packages": [
@@ -65,8 +65,8 @@
6565
},
6666
{
6767
"aliases": [
68-
"GHSA-vj3f-3286-r4pf",
69-
"CVE-2014-9356"
68+
"CVE-2014-9356",
69+
"GHSA-vj3f-3286-r4pf"
7070
],
7171
"summary": "Path Traversal in Docker",
7272
"affected_packages": [
@@ -129,8 +129,8 @@
129129
},
130130
{
131131
"aliases": [
132-
"GHSA-2hfj-cxw7-g45p",
133-
"CVE-2021-39183"
132+
"CVE-2021-39183",
133+
"GHSA-2hfj-cxw7-g45p"
134134
],
135135
"summary": "Unsafe inline XSS in pasting DOM element into chat",
136136
"affected_packages": [

vulnerabilities/tests/test_data/github_api/maven-expected.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{
33
"aliases": [
4-
"GHSA-qcxh-w3j9-58qr",
5-
"CVE-2019-0199"
4+
"CVE-2019-0199",
5+
"GHSA-qcxh-w3j9-58qr"
66
],
77
"summary": "Denial of Service in Tomcat",
88
"affected_packages": [
@@ -35,8 +35,8 @@
3535
},
3636
{
3737
"aliases": [
38-
"GHSA-qcxh-w3j9-58qr",
39-
"CVE-2019-0199"
38+
"CVE-2019-0199",
39+
"GHSA-qcxh-w3j9-58qr"
4040
],
4141
"summary": "Denial of Service in Tomcat",
4242
"affected_packages": [
@@ -69,8 +69,8 @@
6969
},
7070
{
7171
"aliases": [
72-
"GHSA-c9hw-wf7x-jp9j",
73-
"CVE-2020-1938"
72+
"CVE-2020-1938",
73+
"GHSA-c9hw-wf7x-jp9j"
7474
],
7575
"summary": "Improper Input Validation in Tomcat",
7676
"affected_packages": [
@@ -103,8 +103,8 @@
103103
},
104104
{
105105
"aliases": [
106-
"GHSA-c9hw-wf7x-jp9j",
107-
"CVE-2020-1938"
106+
"CVE-2020-1938",
107+
"GHSA-c9hw-wf7x-jp9j"
108108
],
109109
"summary": "Improper Input Validation in Tomcat",
110110
"affected_packages": [
@@ -137,8 +137,8 @@
137137
},
138138
{
139139
"aliases": [
140-
"GHSA-c9hw-wf7x-jp9j",
141-
"CVE-2020-1938"
140+
"CVE-2020-1938",
141+
"GHSA-c9hw-wf7x-jp9j"
142142
],
143143
"summary": "Improper Input Validation in Tomcat",
144144
"affected_packages": [

vulnerabilities/tests/test_data/github_api/nuget-expected.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{
33
"aliases": [
4-
"GHSA-ph3v-2hq5-5qfq",
5-
"CVE-2021-46703"
4+
"CVE-2021-46703",
5+
"GHSA-ph3v-2hq5-5qfq"
66
],
77
"summary": "Code injection in RazorEngine",
88
"affected_packages": [
@@ -45,8 +45,8 @@
4545
},
4646
{
4747
"aliases": [
48-
"GHSA-gcx5-3p5f-f8vp",
49-
"CVE-2022-23395"
48+
"CVE-2022-23395",
49+
"GHSA-gcx5-3p5f-f8vp"
5050
],
5151
"summary": "Prototype Pollution in jquery.cookie",
5252
"affected_packages": [
@@ -89,8 +89,8 @@
8989
},
9090
{
9191
"aliases": [
92-
"GHSA-vv6j-ww6x-54gx",
93-
"CVE-2022-0609"
92+
"CVE-2022-0609",
93+
"GHSA-vv6j-ww6x-54gx"
9494
],
9595
"summary": "Use after free in Animation",
9696
"affected_packages": [
@@ -133,8 +133,8 @@
133133
},
134134
{
135135
"aliases": [
136-
"GHSA-j8f4-2w4p-mhjc",
137-
"CVE-2017-0256"
136+
"CVE-2017-0256",
137+
"GHSA-j8f4-2w4p-mhjc"
138138
],
139139
"summary": "Moderate severity vulnerability that affects Microsoft.AspNetCore.Mvc",
140140
"affected_packages": [

vulnerabilities/tests/test_data/github_api/pypi-expected.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
},
4545
{
4646
"aliases": [
47-
"GHSA-8vj2-vxx3-667w",
48-
"CVE-2022-22817"
47+
"CVE-2022-22817",
48+
"GHSA-8vj2-vxx3-667w"
4949
],
5050
"summary": "Arbitrary expression injection in Pillow",
5151
"affected_packages": [
@@ -108,8 +108,8 @@
108108
},
109109
{
110110
"aliases": [
111-
"GHSA-9j59-75qj-795w",
112-
"CVE-2022-24303"
111+
"CVE-2022-24303",
112+
"GHSA-9j59-75qj-795w"
113113
],
114114
"summary": "Path traversal in Pillow",
115115
"affected_packages": [
@@ -157,8 +157,8 @@
157157
},
158158
{
159159
"aliases": [
160-
"GHSA-8r7c-3cm2-3h8f",
161-
"CVE-2022-23578"
160+
"CVE-2022-23578",
161+
"GHSA-8r7c-3cm2-3h8f"
162162
],
163163
"summary": "Memory leak in Tensorflow",
164164
"affected_packages": [

0 commit comments

Comments
 (0)