@fabasoad/sarif-to-slack 0.2.4 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +1 -1
- package/.github/workflows/security.yml +0 -1
- package/.github/workflows/send-sarif-to-slack.yml +148 -76
- package/.gitleaksignore +8 -0
- package/.pre-commit-config.yaml +3 -3
- package/.tool-versions +1 -1
- package/dist/Logger.js +4 -1
- package/dist/SarifToSlackClient.d.ts +33 -0
- package/dist/SarifToSlackClient.d.ts.map +1 -0
- package/dist/SarifToSlackClient.js +178 -0
- package/dist/SlackMessageBuilder.js +34 -82
- package/dist/System.d.ts +2 -0
- package/dist/System.d.ts.map +1 -0
- package/dist/System.js +15 -0
- package/dist/index.cjs +843 -467
- package/dist/index.d.ts +35 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +36 -12
- package/dist/model/Color.d.ts +70 -0
- package/dist/model/Color.d.ts.map +1 -0
- package/dist/model/Color.js +119 -0
- package/dist/model/Finding.d.ts +2 -0
- package/dist/model/Finding.d.ts.map +1 -0
- package/dist/model/Finding.js +93 -0
- package/dist/model/FindingsArray.d.ts +2 -0
- package/dist/model/FindingsArray.d.ts.map +1 -0
- package/dist/model/FindingsArray.js +24 -0
- package/dist/processors/CodeQLProcessor.d.ts +2 -0
- package/dist/processors/CodeQLProcessor.d.ts.map +1 -0
- package/dist/processors/CodeQLProcessor.js +17 -0
- package/dist/processors/CommonProcessor.d.ts +2 -0
- package/dist/processors/CommonProcessor.d.ts.map +1 -0
- package/dist/processors/CommonProcessor.js +84 -0
- package/dist/processors/ProcessorFactory.d.ts +2 -0
- package/dist/processors/ProcessorFactory.d.ts.map +1 -0
- package/dist/processors/ProcessorFactory.js +22 -0
- package/dist/processors/SnykProcessor.d.ts +2 -0
- package/dist/processors/SnykProcessor.d.ts.map +1 -0
- package/dist/processors/SnykProcessor.js +18 -0
- package/dist/representations/CompactGroupByRepresentation.d.ts +2 -0
- package/dist/representations/CompactGroupByRepresentation.d.ts.map +1 -0
- package/dist/representations/CompactGroupByRepresentation.js +58 -0
- package/dist/representations/CompactGroupByRunPerLevelRepresentation.d.ts +2 -0
- package/dist/representations/CompactGroupByRunPerLevelRepresentation.d.ts.map +1 -0
- package/dist/representations/CompactGroupByRunPerLevelRepresentation.js +13 -0
- package/dist/representations/CompactGroupByRunPerSeverityRepresentation.d.ts +2 -0
- package/dist/representations/CompactGroupByRunPerSeverityRepresentation.d.ts.map +1 -0
- package/dist/representations/CompactGroupByRunPerSeverityRepresentation.js +13 -0
- package/dist/representations/CompactGroupByRunRepresentation.d.ts +2 -0
- package/dist/representations/CompactGroupByRunRepresentation.d.ts.map +1 -0
- package/dist/representations/CompactGroupByRunRepresentation.js +39 -0
- package/dist/representations/CompactGroupBySarifPerLevelRepresentation.d.ts +2 -0
- package/dist/representations/CompactGroupBySarifPerLevelRepresentation.d.ts.map +1 -0
- package/dist/representations/CompactGroupBySarifPerLevelRepresentation.js +13 -0
- package/dist/representations/CompactGroupBySarifPerSeverityRepresentation.d.ts +2 -0
- package/dist/representations/CompactGroupBySarifPerSeverityRepresentation.d.ts.map +1 -0
- package/dist/representations/CompactGroupBySarifPerSeverityRepresentation.js +13 -0
- package/dist/representations/CompactGroupBySarifRepresentation.d.ts +2 -0
- package/dist/representations/CompactGroupBySarifRepresentation.d.ts.map +1 -0
- package/dist/representations/CompactGroupBySarifRepresentation.js +40 -0
- package/dist/representations/CompactGroupByToolNamePerLevelRepresentation.d.ts +2 -0
- package/dist/representations/CompactGroupByToolNamePerLevelRepresentation.d.ts.map +1 -0
- package/dist/representations/CompactGroupByToolNamePerLevelRepresentation.js +13 -0
- package/dist/representations/CompactGroupByToolNamePerSeverityRepresentation.d.ts +2 -0
- package/dist/representations/CompactGroupByToolNamePerSeverityRepresentation.d.ts.map +1 -0
- package/dist/representations/CompactGroupByToolNamePerSeverityRepresentation.js +13 -0
- package/dist/representations/CompactGroupByToolNameRepresentation.d.ts +2 -0
- package/dist/representations/CompactGroupByToolNameRepresentation.d.ts.map +1 -0
- package/dist/representations/CompactGroupByToolNameRepresentation.js +39 -0
- package/dist/representations/CompactTotalPerLevelRepresentation.d.ts +2 -0
- package/dist/representations/CompactTotalPerLevelRepresentation.d.ts.map +1 -0
- package/dist/representations/CompactTotalPerLevelRepresentation.js +13 -0
- package/dist/representations/CompactTotalPerSeverityRepresentation.d.ts +2 -0
- package/dist/representations/CompactTotalPerSeverityRepresentation.d.ts.map +1 -0
- package/dist/representations/CompactTotalPerSeverityRepresentation.js +13 -0
- package/dist/representations/CompactTotalRepresentation.d.ts +2 -0
- package/dist/representations/CompactTotalRepresentation.d.ts.map +1 -0
- package/dist/representations/CompactTotalRepresentation.js +25 -0
- package/dist/representations/Representation.d.ts +2 -0
- package/dist/representations/Representation.d.ts.map +1 -0
- package/dist/representations/Representation.js +28 -0
- package/dist/representations/RepresentationFactory.d.ts +2 -0
- package/dist/representations/RepresentationFactory.d.ts.map +1 -0
- package/dist/representations/RepresentationFactory.js +37 -0
- package/dist/sarif-to-slack.d.ts +337 -85
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/types.d.ts +215 -51
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +225 -33
- package/dist/utils/Comparators.d.ts +2 -0
- package/dist/utils/Comparators.d.ts.map +1 -0
- package/dist/utils/Comparators.js +18 -0
- package/dist/utils/ExtendedArray.d.ts +2 -0
- package/dist/utils/ExtendedArray.d.ts.map +1 -0
- package/dist/utils/ExtendedArray.js +11 -0
- package/dist/utils/FileUtils.d.ts +2 -0
- package/dist/utils/FileUtils.d.ts.map +1 -0
- package/dist/utils/FileUtils.js +51 -0
- package/dist/utils/SarifUtils.js +19 -53
- package/etc/sarif-to-slack.api.md +161 -99
- package/jest.config.json +2 -2
- package/package.json +9 -9
- package/scripts/save-metadata.sh +15 -0
- package/src/Logger.ts +4 -0
- package/src/SarifToSlackClient.ts +202 -0
- package/src/SlackMessageBuilder.ts +35 -115
- package/src/System.ts +16 -0
- package/src/index.ts +47 -20
- package/src/model/Color.ts +201 -0
- package/src/model/Finding.ts +137 -0
- package/src/model/FindingsArray.ts +27 -0
- package/src/processors/CodeQLProcessor.ts +19 -0
- package/src/processors/CommonProcessor.ts +103 -0
- package/src/processors/ProcessorFactory.ts +23 -0
- package/src/processors/SnykProcessor.ts +19 -0
- package/src/representations/CompactGroupByRepresentation.ts +67 -0
- package/src/representations/CompactGroupByRunPerLevelRepresentation.ts +14 -0
- package/src/representations/CompactGroupByRunPerSeverityRepresentation.ts +14 -0
- package/src/representations/CompactGroupByRunRepresentation.ts +44 -0
- package/src/representations/CompactGroupBySarifPerLevelRepresentation.ts +15 -0
- package/src/representations/CompactGroupBySarifPerSeverityRepresentation.ts +15 -0
- package/src/representations/CompactGroupBySarifRepresentation.ts +45 -0
- package/src/representations/CompactGroupByToolNamePerLevelRepresentation.ts +15 -0
- package/src/representations/CompactGroupByToolNamePerSeverityRepresentation.ts +15 -0
- package/src/representations/CompactGroupByToolNameRepresentation.ts +44 -0
- package/src/representations/CompactTotalPerLevelRepresentation.ts +14 -0
- package/src/representations/CompactTotalPerSeverityRepresentation.ts +14 -0
- package/src/representations/CompactTotalRepresentation.ts +27 -0
- package/src/representations/Representation.ts +35 -0
- package/src/representations/RepresentationFactory.ts +49 -0
- package/src/types.ts +270 -53
- package/src/utils/Comparators.ts +19 -0
- package/src/utils/ExtendedArray.ts +11 -0
- package/src/utils/FileUtils.ts +60 -0
- package/src/utils/SarifUtils.ts +19 -71
- package/test-data/sarif/codeql-python.sarif +1448 -1
- package/test-data/sarif/codeql-typescript.sarif +3474 -1
- package/test-data/sarif/grype-github-actions.sarif +65 -0
- package/test-data/sarif/osv-scanner-composer.sarif +972 -0
- package/test-data/sarif/osv-scanner-container.sarif +2278 -0
- package/test-data/sarif/osv-scanner-gomodules.sarif +813 -0
- package/test-data/sarif/osv-scanner-hex.sarif +147 -0
- package/test-data/sarif/osv-scanner-maven.sarif +171 -0
- package/test-data/sarif/osv-scanner-npm.sarif +627 -0
- package/test-data/sarif/osv-scanner-pip.sarif +206 -0
- package/test-data/sarif/osv-scanner-pipenv.sarif +243 -0
- package/test-data/sarif/osv-scanner-pnpm.sarif +174 -0
- package/test-data/sarif/osv-scanner-poetry.sarif +1893 -0
- package/test-data/sarif/osv-scanner-rubygems.sarif +402 -0
- package/test-data/sarif/osv-scanner-uv.sarif +206 -0
- package/test-data/sarif/osv-scanner-yarn.sarif +5207 -0
- package/test-data/sarif/runs-0.sarif +5 -0
- package/test-data/sarif/runs-2-tools-2-results-0.sarif +1 -1
- package/test-data/sarif/runs-2-tools-2.sarif +1 -1
- package/test-data/sarif/runs-3-tools-2-results-0.sarif +1 -1
- package/test-data/sarif/runs-3-tools-2.sarif +1 -1
- package/test-data/sarif/tmp/codeql-csharp.sarif +1 -0
- package/test-data/sarif/tmp/grype-container.sarif +1774 -0
- package/test-data/sarif/tmp/runs-1-tools-1-results-0.sarif +18 -0
- package/test-data/sarif/tmp/runs-2-tools-2.sarif +686 -0
- package/test-data/sarif/trivy-iac.sarif +1 -1
- package/tests/integration/SendSarifToSlack.spec.ts +95 -27
- package/tsconfig.json +2 -0
- package/dist/Processors.d.ts +0 -2
- package/dist/Processors.d.ts.map +0 -1
- package/dist/Processors.js +0 -61
- package/dist/SarifToSlackService.d.ts +0 -39
- package/dist/SarifToSlackService.d.ts.map +0 -1
- package/dist/SarifToSlackService.js +0 -102
- package/dist/model/SarifModelPerRun.d.ts +0 -2
- package/dist/model/SarifModelPerRun.d.ts.map +0 -1
- package/dist/model/SarifModelPerRun.js +0 -90
- package/dist/model/SarifModelPerSarif.d.ts +0 -2
- package/dist/model/SarifModelPerSarif.d.ts.map +0 -1
- package/dist/model/SarifModelPerSarif.js +0 -102
- package/dist/model/types.d.ts +0 -2
- package/dist/model/types.d.ts.map +0 -1
- package/dist/model/types.js +0 -49
- package/dist/utils/SortUtils.d.ts +0 -2
- package/dist/utils/SortUtils.d.ts.map +0 -1
- package/dist/utils/SortUtils.js +0 -20
- package/dist/version.d.ts +0 -2
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js +0 -11
- package/scripts/save-version.sh +0 -13
- package/src/Processors.ts +0 -68
- package/src/SarifToSlackService.ts +0 -115
- package/src/model/SarifModelPerRun.ts +0 -123
- package/src/model/SarifModelPerSarif.ts +0 -126
- package/src/model/types.ts +0 -50
- package/src/utils/SortUtils.ts +0 -33
- package/src/version.ts +0 -10
- package/tests/Processors.spec.ts +0 -76
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/main/sarif-2.1/schema/sarif-schema-2.1.0.json",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"runs": [
|
|
5
|
+
{
|
|
6
|
+
"addresses": [],
|
|
7
|
+
"artifacts": [
|
|
8
|
+
{
|
|
9
|
+
"length": -1,
|
|
10
|
+
"location": {
|
|
11
|
+
"index": -1,
|
|
12
|
+
"uri": "file:///Users/john.doe/projects/python/pip/requirements.txt"
|
|
13
|
+
},
|
|
14
|
+
"parentIndex": -1,
|
|
15
|
+
"roles": []
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"graphs": [],
|
|
19
|
+
"invocations": [],
|
|
20
|
+
"language": "en-US",
|
|
21
|
+
"logicalLocations": [],
|
|
22
|
+
"newlineSequences": [
|
|
23
|
+
"\r\n",
|
|
24
|
+
"\n"
|
|
25
|
+
],
|
|
26
|
+
"policies": [],
|
|
27
|
+
"redactionTokens": [],
|
|
28
|
+
"results": [
|
|
29
|
+
{
|
|
30
|
+
"attachments": [],
|
|
31
|
+
"codeFlows": [],
|
|
32
|
+
"fixes": [],
|
|
33
|
+
"graphTraversals": [],
|
|
34
|
+
"graphs": [],
|
|
35
|
+
"kind": "fail",
|
|
36
|
+
"level": "warning",
|
|
37
|
+
"locations": [
|
|
38
|
+
{
|
|
39
|
+
"annotations": [],
|
|
40
|
+
"id": -1,
|
|
41
|
+
"logicalLocations": [],
|
|
42
|
+
"physicalLocation": {
|
|
43
|
+
"artifactLocation": {
|
|
44
|
+
"index": -1,
|
|
45
|
+
"uri": "file:///Users/john.doe/projects/python/pip/requirements.txt"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"relationships": []
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"message": {
|
|
52
|
+
"arguments": [],
|
|
53
|
+
"text": "Package 'py@1.4.26' is vulnerable to 'CVE-2020-29651' (also known as 'PYSEC-2020-92', 'GHSA-hj5v-574p-mj7c')."
|
|
54
|
+
},
|
|
55
|
+
"rank": -1,
|
|
56
|
+
"relatedLocations": [],
|
|
57
|
+
"ruleId": "CVE-2020-29651",
|
|
58
|
+
"ruleIndex": 0,
|
|
59
|
+
"stacks": [],
|
|
60
|
+
"taxa": []
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"attachments": [],
|
|
64
|
+
"codeFlows": [],
|
|
65
|
+
"fixes": [],
|
|
66
|
+
"graphTraversals": [],
|
|
67
|
+
"graphs": [],
|
|
68
|
+
"kind": "fail",
|
|
69
|
+
"level": "warning",
|
|
70
|
+
"locations": [
|
|
71
|
+
{
|
|
72
|
+
"annotations": [],
|
|
73
|
+
"id": -1,
|
|
74
|
+
"logicalLocations": [],
|
|
75
|
+
"physicalLocation": {
|
|
76
|
+
"artifactLocation": {
|
|
77
|
+
"index": -1,
|
|
78
|
+
"uri": "file:///Users/john.doe/projects/python/pip/requirements.txt"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"relationships": []
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"message": {
|
|
85
|
+
"arguments": [],
|
|
86
|
+
"text": "Package 'py@1.4.26' is vulnerable to 'CVE-2020-29651' (also known as 'PYSEC-2020-92', 'GHSA-hj5v-574p-mj7c')."
|
|
87
|
+
},
|
|
88
|
+
"rank": -1,
|
|
89
|
+
"relatedLocations": [],
|
|
90
|
+
"ruleId": "CVE-2020-29651",
|
|
91
|
+
"ruleIndex": 0,
|
|
92
|
+
"stacks": [],
|
|
93
|
+
"taxa": []
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"attachments": [],
|
|
97
|
+
"codeFlows": [],
|
|
98
|
+
"fixes": [],
|
|
99
|
+
"graphTraversals": [],
|
|
100
|
+
"graphs": [],
|
|
101
|
+
"kind": "fail",
|
|
102
|
+
"level": "warning",
|
|
103
|
+
"locations": [
|
|
104
|
+
{
|
|
105
|
+
"annotations": [],
|
|
106
|
+
"id": -1,
|
|
107
|
+
"logicalLocations": [],
|
|
108
|
+
"physicalLocation": {
|
|
109
|
+
"artifactLocation": {
|
|
110
|
+
"index": -1,
|
|
111
|
+
"uri": "file:///Users/john.doe/projects/python/pip/requirements.txt"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"relationships": []
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"message": {
|
|
118
|
+
"arguments": [],
|
|
119
|
+
"text": "Package 'py@1.4.26' is vulnerable to 'CVE-2022-42969' (also known as 'PYSEC-2022-42969', 'GHSA-w596-4wvx-j9j6')."
|
|
120
|
+
},
|
|
121
|
+
"rank": -1,
|
|
122
|
+
"relatedLocations": [],
|
|
123
|
+
"ruleId": "CVE-2022-42969",
|
|
124
|
+
"ruleIndex": 1,
|
|
125
|
+
"stacks": [],
|
|
126
|
+
"taxa": []
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"runAggregates": [],
|
|
130
|
+
"taxonomies": [],
|
|
131
|
+
"threadFlowLocations": [],
|
|
132
|
+
"tool": {
|
|
133
|
+
"driver": {
|
|
134
|
+
"contents": [
|
|
135
|
+
"localizedData",
|
|
136
|
+
"nonLocalizedData"
|
|
137
|
+
],
|
|
138
|
+
"informationUri": "https://github.com/google/osv-scanner",
|
|
139
|
+
"isComprehensive": false,
|
|
140
|
+
"language": "en-US",
|
|
141
|
+
"locations": [],
|
|
142
|
+
"name": "osv-scanner",
|
|
143
|
+
"notifications": [],
|
|
144
|
+
"rules": [
|
|
145
|
+
{
|
|
146
|
+
"deprecatedIds": [
|
|
147
|
+
"CVE-2020-29651",
|
|
148
|
+
"PYSEC-2020-92",
|
|
149
|
+
"GHSA-hj5v-574p-mj7c"
|
|
150
|
+
],
|
|
151
|
+
"fullDescription": {
|
|
152
|
+
"markdown": "A denial of service via regular expression in the py.path.svnwc component of py (aka python-py) through 1.9.0 could be used by attackers to cause a compute-time denial of service attack by supplying malicious input to the blame functionality.",
|
|
153
|
+
"text": "A denial of service via regular expression in the py.path.svnwc component of py (aka python-py) through 1.9.0 could be used by attackers to cause a compute-time denial of service attack by supplying malicious input to the blame functionality."
|
|
154
|
+
},
|
|
155
|
+
"help": {
|
|
156
|
+
"markdown": "**Your dependency is vulnerable to [CVE-2020-29651](https://osv.dev/CVE-2020-29651)**\n(Also published as: [PYSEC-2020-92](https://osv.dev/PYSEC-2020-92), [GHSA-hj5v-574p-mj7c](https://osv.dev/GHSA-hj5v-574p-mj7c), ).\n\n## [PYSEC-2020-92](https://osv.dev/PYSEC-2020-92)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e A denial of service via regular expression in the py.path.svnwc component of py (aka python-py) through 1.9.0 could be used by attackers to cause a compute-time denial of service attack by supplying malicious input to the blame functionality.\n\n\u003c/details\u003e\n\n## [GHSA-hj5v-574p-mj7c](https://osv.dev/GHSA-hj5v-574p-mj7c)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e A denial of service via regular expression in the py.path.svnwc component of py (aka python-py) through 1.9.0 could be used by attackers to cause a compute-time denial of service attack by supplying malicious input to the blame functionality.\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/python/pip/requirements.txt | py | 1.4.26 |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-hj5v-574p-mj7c | py | 1.10.0 |\n| PYSEC-2020-92 | py | 1.10.0 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/python/pip/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2020-29651\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n",
|
|
157
|
+
"text": "**Your dependency is vulnerable to [CVE-2020-29651](https://osv.dev/CVE-2020-29651)**\n(Also published as: [PYSEC-2020-92](https://osv.dev/PYSEC-2020-92), [GHSA-hj5v-574p-mj7c](https://osv.dev/GHSA-hj5v-574p-mj7c), ).\n\n## [PYSEC-2020-92](https://osv.dev/PYSEC-2020-92)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e A denial of service via regular expression in the py.path.svnwc component of py (aka python-py) through 1.9.0 could be used by attackers to cause a compute-time denial of service attack by supplying malicious input to the blame functionality.\n\n\u003c/details\u003e\n\n## [GHSA-hj5v-574p-mj7c](https://osv.dev/GHSA-hj5v-574p-mj7c)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e A denial of service via regular expression in the py.path.svnwc component of py (aka python-py) through 1.9.0 could be used by attackers to cause a compute-time denial of service attack by supplying malicious input to the blame functionality.\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/python/pip/requirements.txt | py | 1.4.26 |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-hj5v-574p-mj7c | py | 1.10.0 |\n| PYSEC-2020-92 | py | 1.10.0 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/python/pip/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2020-29651\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n"
|
|
158
|
+
},
|
|
159
|
+
"id": "CVE-2020-29651",
|
|
160
|
+
"name": "CVE-2020-29651",
|
|
161
|
+
"properties": {
|
|
162
|
+
"security-severity": "8.7"
|
|
163
|
+
},
|
|
164
|
+
"relationships": [],
|
|
165
|
+
"shortDescription": {
|
|
166
|
+
"markdown": "CVE-2020-29651: py vulnerable to Regular Expression Denial of Service",
|
|
167
|
+
"text": "CVE-2020-29651: py vulnerable to Regular Expression Denial of Service"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"deprecatedIds": [
|
|
172
|
+
"CVE-2022-42969",
|
|
173
|
+
"PYSEC-2022-42969",
|
|
174
|
+
"GHSA-w596-4wvx-j9j6"
|
|
175
|
+
],
|
|
176
|
+
"fullDescription": {
|
|
177
|
+
"markdown": "",
|
|
178
|
+
"text": ""
|
|
179
|
+
},
|
|
180
|
+
"help": {
|
|
181
|
+
"markdown": "**Your dependency is vulnerable to [CVE-2022-42969](https://osv.dev/CVE-2022-42969)**.\n\n## [PYSEC-2022-42969](https://osv.dev/PYSEC-2022-42969)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e The py library through 1.11.0 for Python allows remote attackers to conduct a ReDoS (Regular expression Denial of Service) attack via a Subversion repository with crafted info data, because the InfoSvnCommand argument is mishandled.\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/python/pip/requirements.txt | py | 1.4.26 |\n\n## Remediation\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/python/pip/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2022-42969\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n",
|
|
182
|
+
"text": "**Your dependency is vulnerable to [CVE-2022-42969](https://osv.dev/CVE-2022-42969)**.\n\n## [PYSEC-2022-42969](https://osv.dev/PYSEC-2022-42969)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e The py library through 1.11.0 for Python allows remote attackers to conduct a ReDoS (Regular expression Denial of Service) attack via a Subversion repository with crafted info data, because the InfoSvnCommand argument is mishandled.\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/python/pip/requirements.txt | py | 1.4.26 |\n\n## Remediation\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/python/pip/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2022-42969\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n"
|
|
183
|
+
},
|
|
184
|
+
"id": "CVE-2022-42969",
|
|
185
|
+
"name": "CVE-2022-42969",
|
|
186
|
+
"relationships": [],
|
|
187
|
+
"shortDescription": {
|
|
188
|
+
"markdown": "CVE-2022-42969",
|
|
189
|
+
"text": "CVE-2022-42969"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"supportedTaxonomies": [],
|
|
194
|
+
"taxa": [],
|
|
195
|
+
"version": "2.2.0"
|
|
196
|
+
},
|
|
197
|
+
"extensions": []
|
|
198
|
+
},
|
|
199
|
+
"translations": [],
|
|
200
|
+
"versionControlProvenance": [],
|
|
201
|
+
"webRequests": [],
|
|
202
|
+
"webResponses": []
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
"properties": {}
|
|
206
|
+
}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/main/sarif-2.1/schema/sarif-schema-2.1.0.json",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"runs": [
|
|
5
|
+
{
|
|
6
|
+
"addresses": [],
|
|
7
|
+
"artifacts": [
|
|
8
|
+
{
|
|
9
|
+
"length": -1,
|
|
10
|
+
"location": {
|
|
11
|
+
"index": -1,
|
|
12
|
+
"uri": "file:///Users/john.doe/projects/python/pipenv/Pipfile.lock"
|
|
13
|
+
},
|
|
14
|
+
"parentIndex": -1,
|
|
15
|
+
"roles": []
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"graphs": [],
|
|
19
|
+
"invocations": [],
|
|
20
|
+
"language": "en-US",
|
|
21
|
+
"logicalLocations": [],
|
|
22
|
+
"newlineSequences": [
|
|
23
|
+
"\r\n",
|
|
24
|
+
"\n"
|
|
25
|
+
],
|
|
26
|
+
"policies": [],
|
|
27
|
+
"redactionTokens": [],
|
|
28
|
+
"results": [
|
|
29
|
+
{
|
|
30
|
+
"attachments": [],
|
|
31
|
+
"codeFlows": [],
|
|
32
|
+
"fixes": [],
|
|
33
|
+
"graphTraversals": [],
|
|
34
|
+
"graphs": [],
|
|
35
|
+
"kind": "fail",
|
|
36
|
+
"level": "warning",
|
|
37
|
+
"locations": [
|
|
38
|
+
{
|
|
39
|
+
"annotations": [],
|
|
40
|
+
"id": -1,
|
|
41
|
+
"logicalLocations": [],
|
|
42
|
+
"physicalLocation": {
|
|
43
|
+
"artifactLocation": {
|
|
44
|
+
"index": -1,
|
|
45
|
+
"uri": "file:///Users/john.doe/projects/python/pipenv/Pipfile.lock"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"relationships": []
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"message": {
|
|
52
|
+
"arguments": [],
|
|
53
|
+
"text": "Package 'setuptools@70.0.0' is vulnerable to 'CVE-2025-47273' (also known as 'BIT-setuptools-2025-47273', 'PYSEC-2025-49', 'GHSA-5rjg-fvgr-3xxf')."
|
|
54
|
+
},
|
|
55
|
+
"rank": -1,
|
|
56
|
+
"relatedLocations": [],
|
|
57
|
+
"ruleId": "CVE-2025-47273",
|
|
58
|
+
"ruleIndex": 0,
|
|
59
|
+
"stacks": [],
|
|
60
|
+
"taxa": []
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"attachments": [],
|
|
64
|
+
"codeFlows": [],
|
|
65
|
+
"fixes": [],
|
|
66
|
+
"graphTraversals": [],
|
|
67
|
+
"graphs": [],
|
|
68
|
+
"kind": "fail",
|
|
69
|
+
"level": "warning",
|
|
70
|
+
"locations": [
|
|
71
|
+
{
|
|
72
|
+
"annotations": [],
|
|
73
|
+
"id": -1,
|
|
74
|
+
"logicalLocations": [],
|
|
75
|
+
"physicalLocation": {
|
|
76
|
+
"artifactLocation": {
|
|
77
|
+
"index": -1,
|
|
78
|
+
"uri": "file:///Users/john.doe/projects/python/pipenv/Pipfile.lock"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"relationships": []
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"message": {
|
|
85
|
+
"arguments": [],
|
|
86
|
+
"text": "Package 'httplib2@0.18.1' is vulnerable to 'CVE-2021-21240' (also known as 'PYSEC-2021-16', 'GHSA-93xj-8mrv-444m')."
|
|
87
|
+
},
|
|
88
|
+
"rank": -1,
|
|
89
|
+
"relatedLocations": [],
|
|
90
|
+
"ruleId": "CVE-2021-21240",
|
|
91
|
+
"ruleIndex": 1,
|
|
92
|
+
"stacks": [],
|
|
93
|
+
"taxa": []
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"attachments": [],
|
|
97
|
+
"codeFlows": [],
|
|
98
|
+
"fixes": [],
|
|
99
|
+
"graphTraversals": [],
|
|
100
|
+
"graphs": [],
|
|
101
|
+
"kind": "fail",
|
|
102
|
+
"level": "warning",
|
|
103
|
+
"locations": [
|
|
104
|
+
{
|
|
105
|
+
"annotations": [],
|
|
106
|
+
"id": -1,
|
|
107
|
+
"logicalLocations": [],
|
|
108
|
+
"physicalLocation": {
|
|
109
|
+
"artifactLocation": {
|
|
110
|
+
"index": -1,
|
|
111
|
+
"uri": "file:///Users/john.doe/projects/python/pipenv/Pipfile.lock"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"relationships": []
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"message": {
|
|
118
|
+
"arguments": [],
|
|
119
|
+
"text": "Package 'httplib2@0.18.1' is vulnerable to 'CVE-2021-21240' (also known as 'PYSEC-2021-16', 'GHSA-93xj-8mrv-444m')."
|
|
120
|
+
},
|
|
121
|
+
"rank": -1,
|
|
122
|
+
"relatedLocations": [],
|
|
123
|
+
"ruleId": "CVE-2021-21240",
|
|
124
|
+
"ruleIndex": 1,
|
|
125
|
+
"stacks": [],
|
|
126
|
+
"taxa": []
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"attachments": [],
|
|
130
|
+
"codeFlows": [],
|
|
131
|
+
"fixes": [],
|
|
132
|
+
"graphTraversals": [],
|
|
133
|
+
"graphs": [],
|
|
134
|
+
"kind": "fail",
|
|
135
|
+
"level": "warning",
|
|
136
|
+
"locations": [
|
|
137
|
+
{
|
|
138
|
+
"annotations": [],
|
|
139
|
+
"id": -1,
|
|
140
|
+
"logicalLocations": [],
|
|
141
|
+
"physicalLocation": {
|
|
142
|
+
"artifactLocation": {
|
|
143
|
+
"index": -1,
|
|
144
|
+
"uri": "file:///Users/john.doe/projects/python/pipenv/Pipfile.lock"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"relationships": []
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"message": {
|
|
151
|
+
"arguments": [],
|
|
152
|
+
"text": "Package 'setuptools@70.0.0' is vulnerable to 'CVE-2025-47273' (also known as 'BIT-setuptools-2025-47273', 'PYSEC-2025-49', 'GHSA-5rjg-fvgr-3xxf')."
|
|
153
|
+
},
|
|
154
|
+
"rank": -1,
|
|
155
|
+
"relatedLocations": [],
|
|
156
|
+
"ruleId": "CVE-2025-47273",
|
|
157
|
+
"ruleIndex": 0,
|
|
158
|
+
"stacks": [],
|
|
159
|
+
"taxa": []
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"runAggregates": [],
|
|
163
|
+
"taxonomies": [],
|
|
164
|
+
"threadFlowLocations": [],
|
|
165
|
+
"tool": {
|
|
166
|
+
"driver": {
|
|
167
|
+
"contents": [
|
|
168
|
+
"localizedData",
|
|
169
|
+
"nonLocalizedData"
|
|
170
|
+
],
|
|
171
|
+
"informationUri": "https://github.com/google/osv-scanner",
|
|
172
|
+
"isComprehensive": false,
|
|
173
|
+
"language": "en-US",
|
|
174
|
+
"locations": [],
|
|
175
|
+
"name": "osv-scanner",
|
|
176
|
+
"notifications": [],
|
|
177
|
+
"rules": [
|
|
178
|
+
{
|
|
179
|
+
"deprecatedIds": [
|
|
180
|
+
"CVE-2025-47273",
|
|
181
|
+
"BIT-setuptools-2025-47273",
|
|
182
|
+
"PYSEC-2025-49",
|
|
183
|
+
"GHSA-5rjg-fvgr-3xxf"
|
|
184
|
+
],
|
|
185
|
+
"fullDescription": {
|
|
186
|
+
"markdown": "### Summary \nA path traversal vulnerability in `PackageIndex` was fixed in setuptools version 78.1.1\n\n### Details\n```\n def _download_url(self, url, tmpdir):\n # Determine download filename\n #\n name, _fragment = egg_info_for_url(url)\n if name:\n while '..' in name:\n name = name.replace('..', '.').replace('\\\\', '_')\n else:\n name = \"__downloaded__\" # default if URL has no path contents\n\n if name.endswith('.[egg.zip](http://egg.zip/)'):\n name = name[:-4] # strip the extra .zip before download\n\n --\u003e filename = os.path.join(tmpdir, name)\n```\n\nHere: https://github.com/pypa/setuptools/blob/6ead555c5fb29bc57fe6105b1bffc163f56fd558/setuptools/package_index.py#L810C1-L825C88\n\n`os.path.join()` discards the first argument `tmpdir` if the second begins with a slash or drive letter.\n`name` is derived from a URL without sufficient sanitization. While there is some attempt to sanitize by replacing instances of '..' with '.', it is insufficient.\n\n### Risk Assessment\nAs easy_install and package_index are deprecated, the exploitation surface is reduced.\nHowever, it seems this could be exploited in a similar fashion like https://github.com/advisories/GHSA-r9hx-vwmv-q579, and as described by POC 4 in https://github.com/advisories/GHSA-cx63-2mw6-8hw5 report: via malicious URLs present on the pages of a package index.\n\n### Impact\nAn attacker would be allowed to write files to arbitrary locations on the filesystem with the permissions of the process running the Python code, which could escalate to RCE depending on the context.\n\n### References\nhttps://huntr.com/bounties/d6362117-ad57-4e83-951f-b8141c6e7ca5\nhttps://github.com/pypa/setuptools/issues/4946",
|
|
187
|
+
"text": "### Summary \nA path traversal vulnerability in `PackageIndex` was fixed in setuptools version 78.1.1\n\n### Details\n```\n def _download_url(self, url, tmpdir):\n # Determine download filename\n #\n name, _fragment = egg_info_for_url(url)\n if name:\n while '..' in name:\n name = name.replace('..', '.').replace('\\\\', '_')\n else:\n name = \"__downloaded__\" # default if URL has no path contents\n\n if name.endswith('.[egg.zip](http://egg.zip/)'):\n name = name[:-4] # strip the extra .zip before download\n\n --\u003e filename = os.path.join(tmpdir, name)\n```\n\nHere: https://github.com/pypa/setuptools/blob/6ead555c5fb29bc57fe6105b1bffc163f56fd558/setuptools/package_index.py#L810C1-L825C88\n\n`os.path.join()` discards the first argument `tmpdir` if the second begins with a slash or drive letter.\n`name` is derived from a URL without sufficient sanitization. While there is some attempt to sanitize by replacing instances of '..' with '.', it is insufficient.\n\n### Risk Assessment\nAs easy_install and package_index are deprecated, the exploitation surface is reduced.\nHowever, it seems this could be exploited in a similar fashion like https://github.com/advisories/GHSA-r9hx-vwmv-q579, and as described by POC 4 in https://github.com/advisories/GHSA-cx63-2mw6-8hw5 report: via malicious URLs present on the pages of a package index.\n\n### Impact\nAn attacker would be allowed to write files to arbitrary locations on the filesystem with the permissions of the process running the Python code, which could escalate to RCE depending on the context.\n\n### References\nhttps://huntr.com/bounties/d6362117-ad57-4e83-951f-b8141c6e7ca5\nhttps://github.com/pypa/setuptools/issues/4946"
|
|
188
|
+
},
|
|
189
|
+
"help": {
|
|
190
|
+
"markdown": "**Your dependency is vulnerable to [CVE-2025-47273](https://osv.dev/CVE-2025-47273)**\n(Also published as: [PYSEC-2025-49](https://osv.dev/PYSEC-2025-49), [GHSA-5rjg-fvgr-3xxf](https://osv.dev/GHSA-5rjg-fvgr-3xxf), ).\n\n## [PYSEC-2025-49](https://osv.dev/PYSEC-2025-49)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e setuptools is a package that allows users to download, build, install, upgrade, and uninstall Python packages. A path traversal vulnerability in `PackageIndex` is present in setuptools prior to version 78.1.1. An attacker would be allowed to write files to arbitrary locations on the filesystem with the permissions of the process running the Python code, which could escalate to remote code execution depending on the context. Version 78.1.1 fixes the issue.\n\n\u003c/details\u003e\n\n## [GHSA-5rjg-fvgr-3xxf](https://osv.dev/GHSA-5rjg-fvgr-3xxf)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e ### Summary \n\u003e A path traversal vulnerability in `PackageIndex` was fixed in setuptools version 78.1.1\n\u003e \n\u003e ### Details\n\u003e ```\n\u003e def _download_url(self, url, tmpdir):\n\u003e # Determine download filename\n\u003e #\n\u003e name, _fragment = egg_info_for_url(url)\n\u003e if name:\n\u003e while '..' in name:\n\u003e name = name.replace('..', '.').replace('\\\\', '_')\n\u003e else:\n\u003e name = \"__downloaded__\" # default if URL has no path contents\n\u003e \n\u003e if name.endswith('.[egg.zip](http://egg.zip/)'):\n\u003e name = name[:-4] # strip the extra .zip before download\n\u003e \n\u003e --\u003e filename = os.path.join(tmpdir, name)\n\u003e ```\n\u003e \n\u003e Here: https://github.com/pypa/setuptools/blob/6ead555c5fb29bc57fe6105b1bffc163f56fd558/setuptools/package_index.py#L810C1-L825C88\n\u003e \n\u003e `os.path.join()` discards the first argument `tmpdir` if the second begins with a slash or drive letter.\n\u003e `name` is derived from a URL without sufficient sanitization. While there is some attempt to sanitize by replacing instances of '..' with '.', it is insufficient.\n\u003e \n\u003e ### Risk Assessment\n\u003e As easy_install and package_index are deprecated, the exploitation surface is reduced.\n\u003e However, it seems this could be exploited in a similar fashion like https://github.com/advisories/GHSA-r9hx-vwmv-q579, and as described by POC 4 in https://github.com/advisories/GHSA-cx63-2mw6-8hw5 report: via malicious URLs present on the pages of a package index.\n\u003e \n\u003e ### Impact\n\u003e An attacker would be allowed to write files to arbitrary locations on the filesystem with the permissions of the process running the Python code, which could escalate to RCE depending on the context.\n\u003e \n\u003e ### References\n\u003e https://huntr.com/bounties/d6362117-ad57-4e83-951f-b8141c6e7ca5\n\u003e https://github.com/pypa/setuptools/issues/4946\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/python/pipenv/Pipfile.lock | setuptools | 70.0.0 |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-5rjg-fvgr-3xxf | setuptools | 78.1.1 |\n| PYSEC-2025-49 | setuptools | 250a6d17978f9f6ac3ac887091f2d32886fbbb0b, 78.1.1 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/python/pipenv/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2025-47273\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n",
|
|
191
|
+
"text": "**Your dependency is vulnerable to [CVE-2025-47273](https://osv.dev/CVE-2025-47273)**\n(Also published as: [PYSEC-2025-49](https://osv.dev/PYSEC-2025-49), [GHSA-5rjg-fvgr-3xxf](https://osv.dev/GHSA-5rjg-fvgr-3xxf), ).\n\n## [PYSEC-2025-49](https://osv.dev/PYSEC-2025-49)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e setuptools is a package that allows users to download, build, install, upgrade, and uninstall Python packages. A path traversal vulnerability in `PackageIndex` is present in setuptools prior to version 78.1.1. An attacker would be allowed to write files to arbitrary locations on the filesystem with the permissions of the process running the Python code, which could escalate to remote code execution depending on the context. Version 78.1.1 fixes the issue.\n\n\u003c/details\u003e\n\n## [GHSA-5rjg-fvgr-3xxf](https://osv.dev/GHSA-5rjg-fvgr-3xxf)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e ### Summary \n\u003e A path traversal vulnerability in `PackageIndex` was fixed in setuptools version 78.1.1\n\u003e \n\u003e ### Details\n\u003e ```\n\u003e def _download_url(self, url, tmpdir):\n\u003e # Determine download filename\n\u003e #\n\u003e name, _fragment = egg_info_for_url(url)\n\u003e if name:\n\u003e while '..' in name:\n\u003e name = name.replace('..', '.').replace('\\\\', '_')\n\u003e else:\n\u003e name = \"__downloaded__\" # default if URL has no path contents\n\u003e \n\u003e if name.endswith('.[egg.zip](http://egg.zip/)'):\n\u003e name = name[:-4] # strip the extra .zip before download\n\u003e \n\u003e --\u003e filename = os.path.join(tmpdir, name)\n\u003e ```\n\u003e \n\u003e Here: https://github.com/pypa/setuptools/blob/6ead555c5fb29bc57fe6105b1bffc163f56fd558/setuptools/package_index.py#L810C1-L825C88\n\u003e \n\u003e `os.path.join()` discards the first argument `tmpdir` if the second begins with a slash or drive letter.\n\u003e `name` is derived from a URL without sufficient sanitization. While there is some attempt to sanitize by replacing instances of '..' with '.', it is insufficient.\n\u003e \n\u003e ### Risk Assessment\n\u003e As easy_install and package_index are deprecated, the exploitation surface is reduced.\n\u003e However, it seems this could be exploited in a similar fashion like https://github.com/advisories/GHSA-r9hx-vwmv-q579, and as described by POC 4 in https://github.com/advisories/GHSA-cx63-2mw6-8hw5 report: via malicious URLs present on the pages of a package index.\n\u003e \n\u003e ### Impact\n\u003e An attacker would be allowed to write files to arbitrary locations on the filesystem with the permissions of the process running the Python code, which could escalate to RCE depending on the context.\n\u003e \n\u003e ### References\n\u003e https://huntr.com/bounties/d6362117-ad57-4e83-951f-b8141c6e7ca5\n\u003e https://github.com/pypa/setuptools/issues/4946\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/python/pipenv/Pipfile.lock | setuptools | 70.0.0 |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-5rjg-fvgr-3xxf | setuptools | 78.1.1 |\n| PYSEC-2025-49 | setuptools | 250a6d17978f9f6ac3ac887091f2d32886fbbb0b, 78.1.1 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/python/pipenv/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2025-47273\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n"
|
|
192
|
+
},
|
|
193
|
+
"id": "CVE-2025-47273",
|
|
194
|
+
"name": "CVE-2025-47273",
|
|
195
|
+
"properties": {
|
|
196
|
+
"security-severity": "8.8"
|
|
197
|
+
},
|
|
198
|
+
"relationships": [],
|
|
199
|
+
"shortDescription": {
|
|
200
|
+
"markdown": "CVE-2025-47273: setuptools has a path traversal vulnerability in PackageIndex.download that leads to Arbitrary File Write",
|
|
201
|
+
"text": "CVE-2025-47273: setuptools has a path traversal vulnerability in PackageIndex.download that leads to Arbitrary File Write"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"deprecatedIds": [
|
|
206
|
+
"CVE-2021-21240",
|
|
207
|
+
"PYSEC-2021-16",
|
|
208
|
+
"GHSA-93xj-8mrv-444m"
|
|
209
|
+
],
|
|
210
|
+
"fullDescription": {
|
|
211
|
+
"markdown": "### Impact\nA malicious server which responds with long series of `\\xa0` characters in the `www-authenticate` header may cause Denial of Service (CPU burn while parsing header) of the httplib2 client accessing said server.\n\n### Patches\nVersion 0.19.0 contains new implementation of auth headers parsing, using pyparsing library.\nhttps://github.com/httplib2/httplib2/pull/182\n\n### Workarounds\n```py\nimport httplib2\nhttplib2.USE_WWW_AUTH_STRICT_PARSING = True\n```\n\n### Technical Details\n\nThe vulnerable regular expression is https://github.com/httplib2/httplib2/blob/595e248d0958c00e83cb28f136a2a54772772b50/python3/httplib2/__init__.py#L336-L338\n\nThe section before the equals sign contains multiple overlapping groups. Ignoring the optional part containing a comma, we have:\n\n \\s*[^ \\t\\r\\n=]+\\s*=\n\nSince all three infinitely repeating groups accept the non-breaking space character `\\xa0`, a long string of `\\xa0` causes catastrophic backtracking.\n\nThe complexity is cubic, so doubling the length of the malicious string of `\\xa0` makes processing take 8 times as long.\n\n### Reproduction Steps\n\nRun a malicious server which responds with\n\n www-authenticate: x \\xa0\\xa0\\xa0\\xa0x\n\nbut with many more `\\xa0` characters.\n\nAn example malicious python server is below:\n\n```py\nfrom http.server import BaseHTTPRequestHandler, HTTPServer\n\ndef make_header_value(n_spaces):\n repeat = \"\\xa0\" * n_spaces\n return f\"x {repeat}x\"\n\nclass Handler(BaseHTTPRequestHandler):\n def do_GET(self):\n self.log_request(401)\n self.send_response_only(401) # Don't bother sending Server and Date\n n_spaces = (\n int(self.path[1:]) # Can GET e.g. /100 to test shorter sequences\n if len(self.path) \u003e 1 else\n 65512 # Max header line length 65536\n )\n value = make_header_value(n_spaces)\n self.send_header(\"www-authenticate\", value) # This header can actually be sent multiple times\n self.end_headers()\n\nif __name__ == \"__main__\":\n HTTPServer((\"\", 1337), Handler).serve_forever()\n```\n\nConnect to the server with httplib2:\n\n```py\nimport httplib2\nhttplib2.Http(\".cache\").request(\"http://localhost:1337\", \"GET\")\n```\n\nTo benchmark performance with shorter strings, you can set the path to a number e.g. http://localhost:1337/1000\n\n\n### References\nThanks to [Ben Caller](https://github.com/b-c-ds) ([Doyensec](https://doyensec.com)) for finding vulnerability and discrete notification.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [httplib2](https://github.com/httplib2/httplib2/issues/new)\n* Email [current maintainer at 2021-01](mailto:temotor@gmail.com)",
|
|
212
|
+
"text": "### Impact\nA malicious server which responds with long series of `\\xa0` characters in the `www-authenticate` header may cause Denial of Service (CPU burn while parsing header) of the httplib2 client accessing said server.\n\n### Patches\nVersion 0.19.0 contains new implementation of auth headers parsing, using pyparsing library.\nhttps://github.com/httplib2/httplib2/pull/182\n\n### Workarounds\n```py\nimport httplib2\nhttplib2.USE_WWW_AUTH_STRICT_PARSING = True\n```\n\n### Technical Details\n\nThe vulnerable regular expression is https://github.com/httplib2/httplib2/blob/595e248d0958c00e83cb28f136a2a54772772b50/python3/httplib2/__init__.py#L336-L338\n\nThe section before the equals sign contains multiple overlapping groups. Ignoring the optional part containing a comma, we have:\n\n \\s*[^ \\t\\r\\n=]+\\s*=\n\nSince all three infinitely repeating groups accept the non-breaking space character `\\xa0`, a long string of `\\xa0` causes catastrophic backtracking.\n\nThe complexity is cubic, so doubling the length of the malicious string of `\\xa0` makes processing take 8 times as long.\n\n### Reproduction Steps\n\nRun a malicious server which responds with\n\n www-authenticate: x \\xa0\\xa0\\xa0\\xa0x\n\nbut with many more `\\xa0` characters.\n\nAn example malicious python server is below:\n\n```py\nfrom http.server import BaseHTTPRequestHandler, HTTPServer\n\ndef make_header_value(n_spaces):\n repeat = \"\\xa0\" * n_spaces\n return f\"x {repeat}x\"\n\nclass Handler(BaseHTTPRequestHandler):\n def do_GET(self):\n self.log_request(401)\n self.send_response_only(401) # Don't bother sending Server and Date\n n_spaces = (\n int(self.path[1:]) # Can GET e.g. /100 to test shorter sequences\n if len(self.path) \u003e 1 else\n 65512 # Max header line length 65536\n )\n value = make_header_value(n_spaces)\n self.send_header(\"www-authenticate\", value) # This header can actually be sent multiple times\n self.end_headers()\n\nif __name__ == \"__main__\":\n HTTPServer((\"\", 1337), Handler).serve_forever()\n```\n\nConnect to the server with httplib2:\n\n```py\nimport httplib2\nhttplib2.Http(\".cache\").request(\"http://localhost:1337\", \"GET\")\n```\n\nTo benchmark performance with shorter strings, you can set the path to a number e.g. http://localhost:1337/1000\n\n\n### References\nThanks to [Ben Caller](https://github.com/b-c-ds) ([Doyensec](https://doyensec.com)) for finding vulnerability and discrete notification.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [httplib2](https://github.com/httplib2/httplib2/issues/new)\n* Email [current maintainer at 2021-01](mailto:temotor@gmail.com)"
|
|
213
|
+
},
|
|
214
|
+
"help": {
|
|
215
|
+
"markdown": "**Your dependency is vulnerable to [CVE-2021-21240](https://osv.dev/CVE-2021-21240)**\n(Also published as: [PYSEC-2021-16](https://osv.dev/PYSEC-2021-16), [GHSA-93xj-8mrv-444m](https://osv.dev/GHSA-93xj-8mrv-444m), ).\n\n## [PYSEC-2021-16](https://osv.dev/PYSEC-2021-16)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e httplib2 is a comprehensive HTTP client library for Python. In httplib2 before version 0.19.0, a malicious server which responds with long series of \"\\xa0\" characters in the \"www-authenticate\" header may cause Denial of Service (CPU burn while parsing header) of the httplib2 client accessing said server. This is fixed in version 0.19.0 which contains a new implementation of auth headers parsing using the pyparsing library.\n\n\u003c/details\u003e\n\n## [GHSA-93xj-8mrv-444m](https://osv.dev/GHSA-93xj-8mrv-444m)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e ### Impact\n\u003e A malicious server which responds with long series of `\\xa0` characters in the `www-authenticate` header may cause Denial of Service (CPU burn while parsing header) of the httplib2 client accessing said server.\n\u003e \n\u003e ### Patches\n\u003e Version 0.19.0 contains new implementation of auth headers parsing, using pyparsing library.\n\u003e https://github.com/httplib2/httplib2/pull/182\n\u003e \n\u003e ### Workarounds\n\u003e ```py\n\u003e import httplib2\n\u003e httplib2.USE_WWW_AUTH_STRICT_PARSING = True\n\u003e ```\n\u003e \n\u003e ### Technical Details\n\u003e \n\u003e The vulnerable regular expression is https://github.com/httplib2/httplib2/blob/595e248d0958c00e83cb28f136a2a54772772b50/python3/httplib2/__init__.py#L336-L338\n\u003e \n\u003e The section before the equals sign contains multiple overlapping groups. Ignoring the optional part containing a comma, we have:\n\u003e \n\u003e \\s*[^ \\t\\r\\n=]+\\s*=\n\u003e \n\u003e Since all three infinitely repeating groups accept the non-breaking space character `\\xa0`, a long string of `\\xa0` causes catastrophic backtracking.\n\u003e \n\u003e The complexity is cubic, so doubling the length of the malicious string of `\\xa0` makes processing take 8 times as long.\n\u003e \n\u003e ### Reproduction Steps\n\u003e \n\u003e Run a malicious server which responds with\n\u003e \n\u003e www-authenticate: x \\xa0\\xa0\\xa0\\xa0x\n\u003e \n\u003e but with many more `\\xa0` characters.\n\u003e \n\u003e An example malicious python server is below:\n\u003e \n\u003e ```py\n\u003e from http.server import BaseHTTPRequestHandler, HTTPServer\n\u003e \n\u003e def make_header_value(n_spaces):\n\u003e repeat = \"\\xa0\" * n_spaces\n\u003e return f\"x {repeat}x\"\n\u003e \n\u003e class Handler(BaseHTTPRequestHandler):\n\u003e def do_GET(self):\n\u003e self.log_request(401)\n\u003e self.send_response_only(401) # Don't bother sending Server and Date\n\u003e n_spaces = (\n\u003e int(self.path[1:]) # Can GET e.g. /100 to test shorter sequences\n\u003e if len(self.path) \u003e 1 else\n\u003e 65512 # Max header line length 65536\n\u003e )\n\u003e value = make_header_value(n_spaces)\n\u003e self.send_header(\"www-authenticate\", value) # This header can actually be sent multiple times\n\u003e self.end_headers()\n\u003e \n\u003e if __name__ == \"__main__\":\n\u003e HTTPServer((\"\", 1337), Handler).serve_forever()\n\u003e ```\n\u003e \n\u003e Connect to the server with httplib2:\n\u003e \n\u003e ```py\n\u003e import httplib2\n\u003e httplib2.Http(\".cache\").request(\"http://localhost:1337\", \"GET\")\n\u003e ```\n\u003e \n\u003e To benchmark performance with shorter strings, you can set the path to a number e.g. http://localhost:1337/1000\n\u003e \n\u003e \n\u003e ### References\n\u003e Thanks to [Ben Caller](https://github.com/b-c-ds) ([Doyensec](https://doyensec.com)) for finding vulnerability and discrete notification.\n\u003e \n\u003e ### For more information\n\u003e If you have any questions or comments about this advisory:\n\u003e * Open an issue in [httplib2](https://github.com/httplib2/httplib2/issues/new)\n\u003e * Email [current maintainer at 2021-01](mailto:temotor@gmail.com)\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/python/pipenv/Pipfile.lock | httplib2 | 0.18.1 |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-93xj-8mrv-444m | httplib2 | 0.19.0 |\n| PYSEC-2021-16 | httplib2 | 0.19.0, bd9ee252c8f099608019709e22c0d705e98d26bc |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/python/pipenv/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2021-21240\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n",
|
|
216
|
+
"text": "**Your dependency is vulnerable to [CVE-2021-21240](https://osv.dev/CVE-2021-21240)**\n(Also published as: [PYSEC-2021-16](https://osv.dev/PYSEC-2021-16), [GHSA-93xj-8mrv-444m](https://osv.dev/GHSA-93xj-8mrv-444m), ).\n\n## [PYSEC-2021-16](https://osv.dev/PYSEC-2021-16)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e httplib2 is a comprehensive HTTP client library for Python. In httplib2 before version 0.19.0, a malicious server which responds with long series of \"\\xa0\" characters in the \"www-authenticate\" header may cause Denial of Service (CPU burn while parsing header) of the httplib2 client accessing said server. This is fixed in version 0.19.0 which contains a new implementation of auth headers parsing using the pyparsing library.\n\n\u003c/details\u003e\n\n## [GHSA-93xj-8mrv-444m](https://osv.dev/GHSA-93xj-8mrv-444m)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e ### Impact\n\u003e A malicious server which responds with long series of `\\xa0` characters in the `www-authenticate` header may cause Denial of Service (CPU burn while parsing header) of the httplib2 client accessing said server.\n\u003e \n\u003e ### Patches\n\u003e Version 0.19.0 contains new implementation of auth headers parsing, using pyparsing library.\n\u003e https://github.com/httplib2/httplib2/pull/182\n\u003e \n\u003e ### Workarounds\n\u003e ```py\n\u003e import httplib2\n\u003e httplib2.USE_WWW_AUTH_STRICT_PARSING = True\n\u003e ```\n\u003e \n\u003e ### Technical Details\n\u003e \n\u003e The vulnerable regular expression is https://github.com/httplib2/httplib2/blob/595e248d0958c00e83cb28f136a2a54772772b50/python3/httplib2/__init__.py#L336-L338\n\u003e \n\u003e The section before the equals sign contains multiple overlapping groups. Ignoring the optional part containing a comma, we have:\n\u003e \n\u003e \\s*[^ \\t\\r\\n=]+\\s*=\n\u003e \n\u003e Since all three infinitely repeating groups accept the non-breaking space character `\\xa0`, a long string of `\\xa0` causes catastrophic backtracking.\n\u003e \n\u003e The complexity is cubic, so doubling the length of the malicious string of `\\xa0` makes processing take 8 times as long.\n\u003e \n\u003e ### Reproduction Steps\n\u003e \n\u003e Run a malicious server which responds with\n\u003e \n\u003e www-authenticate: x \\xa0\\xa0\\xa0\\xa0x\n\u003e \n\u003e but with many more `\\xa0` characters.\n\u003e \n\u003e An example malicious python server is below:\n\u003e \n\u003e ```py\n\u003e from http.server import BaseHTTPRequestHandler, HTTPServer\n\u003e \n\u003e def make_header_value(n_spaces):\n\u003e repeat = \"\\xa0\" * n_spaces\n\u003e return f\"x {repeat}x\"\n\u003e \n\u003e class Handler(BaseHTTPRequestHandler):\n\u003e def do_GET(self):\n\u003e self.log_request(401)\n\u003e self.send_response_only(401) # Don't bother sending Server and Date\n\u003e n_spaces = (\n\u003e int(self.path[1:]) # Can GET e.g. /100 to test shorter sequences\n\u003e if len(self.path) \u003e 1 else\n\u003e 65512 # Max header line length 65536\n\u003e )\n\u003e value = make_header_value(n_spaces)\n\u003e self.send_header(\"www-authenticate\", value) # This header can actually be sent multiple times\n\u003e self.end_headers()\n\u003e \n\u003e if __name__ == \"__main__\":\n\u003e HTTPServer((\"\", 1337), Handler).serve_forever()\n\u003e ```\n\u003e \n\u003e Connect to the server with httplib2:\n\u003e \n\u003e ```py\n\u003e import httplib2\n\u003e httplib2.Http(\".cache\").request(\"http://localhost:1337\", \"GET\")\n\u003e ```\n\u003e \n\u003e To benchmark performance with shorter strings, you can set the path to a number e.g. http://localhost:1337/1000\n\u003e \n\u003e \n\u003e ### References\n\u003e Thanks to [Ben Caller](https://github.com/b-c-ds) ([Doyensec](https://doyensec.com)) for finding vulnerability and discrete notification.\n\u003e \n\u003e ### For more information\n\u003e If you have any questions or comments about this advisory:\n\u003e * Open an issue in [httplib2](https://github.com/httplib2/httplib2/issues/new)\n\u003e * Email [current maintainer at 2021-01](mailto:temotor@gmail.com)\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/python/pipenv/Pipfile.lock | httplib2 | 0.18.1 |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-93xj-8mrv-444m | httplib2 | 0.19.0 |\n| PYSEC-2021-16 | httplib2 | 0.19.0, bd9ee252c8f099608019709e22c0d705e98d26bc |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/python/pipenv/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2021-21240\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n"
|
|
217
|
+
},
|
|
218
|
+
"id": "CVE-2021-21240",
|
|
219
|
+
"name": "CVE-2021-21240",
|
|
220
|
+
"properties": {
|
|
221
|
+
"security-severity": "7.7"
|
|
222
|
+
},
|
|
223
|
+
"relationships": [],
|
|
224
|
+
"shortDescription": {
|
|
225
|
+
"markdown": "CVE-2021-21240: Regular Expression Denial of Service (REDoS) in httplib2",
|
|
226
|
+
"text": "CVE-2021-21240: Regular Expression Denial of Service (REDoS) in httplib2"
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
"supportedTaxonomies": [],
|
|
231
|
+
"taxa": [],
|
|
232
|
+
"version": "2.2.0"
|
|
233
|
+
},
|
|
234
|
+
"extensions": []
|
|
235
|
+
},
|
|
236
|
+
"translations": [],
|
|
237
|
+
"versionControlProvenance": [],
|
|
238
|
+
"webRequests": [],
|
|
239
|
+
"webResponses": []
|
|
240
|
+
}
|
|
241
|
+
],
|
|
242
|
+
"properties": {}
|
|
243
|
+
}
|