Skip to content

Commit 73b81f6

Browse files
committed
Remove added_advisories method and
assign cve to empty string if its N/A Signed-off-by: Tushar912 <tushar.912u@gmail.com>
1 parent f16f680 commit 73b81f6

3 files changed

Lines changed: 60 additions & 28 deletions

File tree

vulnerabilities/importer_yielder.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,17 +249,15 @@
249249
},
250250
},
251251
{
252-
'name': 'apache_tomcat',
252+
'name': 'apache_kafka',
253253
'license': '',
254254
'last_run': None,
255-
'data_source': 'ApacheTomcatDataSource',
256-
'data_source_cfg': {
257-
"etags": {}
258-
},
255+
'data_source': 'ApacheKafkaDataSource',
256+
'data_source_cfg': {},
259257
},
260258
{
261259
'name': 'istio',
262-
'license': '',
260+
'license': 'apache-2.0',
263261
'last_run': None,
264262
'data_source': 'IstioDataSource',
265263
'data_source_cfg': {

vulnerabilities/importers/istio.py

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -56,26 +56,16 @@ def updated_advisories(self) -> Set[Advisory]:
5656
advisories.extend(processed_data)
5757
return self.batch_advisories(advisories)
5858

59-
def added_advisories(self) -> Set[Advisory]:
60-
files = self._added_files
61-
advisories = []
62-
for f in files:
63-
processed_data = self.process_file(f)
64-
if processed_data:
65-
advisories.extend(processed_data)
66-
return self.batch_advisories(advisories)
67-
6859
def get_versions_for_pkg_from_range_list(self, version_range_list):
6960
"""Takes a list of version ranges(affected) of a package
7061
as parameter and returns a tuple of safe package versions and
7162
vulnerable package versions"""
72-
73-
safe_pkg_versions = []
74-
vuln_pkg_versions = []
7563
all_version = self.version_api.get("istio/istio")
7664
if not version_range_list:
7765
return all_version, []
78-
version_ranges = {RangeSpecifier(r) for r in version_range_list}
66+
safe_pkg_versions = []
67+
vuln_pkg_versions = []
68+
version_ranges = [RangeSpecifier(r) for r in version_range_list]
7969
for version in all_version:
8070
if any([version in v for v in version_ranges]):
8171
vuln_pkg_versions.append(version)
@@ -113,9 +103,9 @@ def get_yaml_lines(self, lines):
113103
,'cves: [CVE-2019-12243]']
114104
"""
115105

116-
for line in lines:
106+
for index, line in enumerate(lines):
117107
line = line.strip()
118-
if line.startswith("---"):
108+
if line.startswith("---") and index == 0:
119109
continue
120110
elif line.endswith("---"):
121111
break
@@ -138,30 +128,28 @@ def process_file(self, path):
138128
ubound = "<=" + release[2]
139129
releases.append(lbound + "," + ubound)
140130

141-
data["releases"] = releases
131+
data["release_ranges"] = releases
142132

143133
if not data.get("cves"):
144134
data["cves"] = [""]
145135

146136
for cve_id in data["cves"]:
147137

148138
if not cve_id.startswith("CVE"):
149-
continue
139+
cve_id = ""
150140

151141
safe_pkg_versions = []
152142
vuln_pkg_versions = []
153143

154-
if not data.get("releases"):
155-
data["releases"] = []
144+
if not data.get("release_ranges"):
145+
data["release_ranges"] = []
156146

157147
safe_pkg_versions, vuln_pkg_versions = self.get_versions_for_pkg_from_range_list(
158-
data["releases"])
148+
data["release_ranges"])
159149

160150
safe_purls = []
161151
vuln_purls = []
162152

163-
cve_id = cve_id
164-
165153
safe_purls_golang = {
166154
PackageURL(type="golang", name="istio", version=version)
167155
for version in safe_pkg_versions

vulnerabilities/tests/test_data/istio/test_file.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,50 @@ cvss: "8.9"
77
vector: "CVSS:3.0/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N/E:H/RL:O/RC:C"
88
releases: ["1.1 to 1.1.15", "1.2 to 1.2.6", "1.3 to 1.3.1"]
99
publishdate: 2019-05-28
10+
1011
---
12+
13+
{{< security_bulletin >}}
14+
15+
During review of the [Istio 1.1.7](/news/releases/1.1.x/announcing-1.1.7) release notes, we realized that [issue 13868](https://github.com/istio/istio/issues/13868),
16+
which is fixed in the release, actually represents a security vulnerability.
17+
18+
Initially we thought the bug was impacting the [TCP Authorization](/about/feature-stages/#security-and-policy-enforcement) feature advertised
19+
as alpha stability, which would not have required invoking this security advisory process, but we later realized that the
20+
[Deny Checker](https://istio.io/v1.6/docs/reference/config/policy-and-telemetry/adapters/denier/) and
21+
[List Checker](https://istio.io/v1.6/docs/reference/config/policy-and-telemetry/adapters/list/) feature were affected and those are considered stable features.
22+
We are revisiting our processes to flag vulnerabilities that are initially reported as bugs instead of through the
23+
[private disclosure process](/about/security-vulnerabilities/).
24+
25+
We tracked the bug to a code change introduced in Istio 1.1 and affecting all releases up to 1.1.6.
26+
27+
## Impact and detection
28+
29+
Since Istio 1.1, In the default Istio installation profile, policy enforcement is disabled by default.
30+
31+
You can check the status of policy enforcement for your mesh with the following command:
32+
33+
{{< text bash >}}
34+
$ kubectl -n istio-system get cm istio -o jsonpath="{@.data.mesh}" | grep disablePolicyChecks
35+
disablePolicyChecks: true
36+
{{< /text >}}
37+
38+
You are not impacted by this vulnerability if `disablePolicyChecks` is set to true.
39+
40+
You are impacted by the vulnerability issue if the following conditions are all true:
41+
42+
* You are running one of the affected Istio releases.
43+
* `disablePolicyChecks` is set to false (follow the steps mentioned above to check)
44+
* Your workload is NOT using HTTP, HTTP/2, or gRPC protocols
45+
* A mixer adapter (e.g., Deny Checker, List Checker) is used to provide authorization for your backend TCP service.
46+
47+
## Mitigation
48+
49+
* Users of Istio 1.0.x are not affected.
50+
* For Istio 1.1.x deployments: update to [Istio 1.1.7](/news/releases/1.1.x/announcing-1.1.7) or later.
51+
52+
## Credit
53+
54+
The Istio team would like to thank `Haim Helman` for the original bug report.
55+
56+
{{< boilerplate "security-vulnerability" >}}

0 commit comments

Comments
 (0)