I'm getting an error trying to use the new vulnera...
# fleet
e
I'm getting an error trying to use the new vulnerability detection. I'm using MariaDB
Copy code
sql: Scan error on column index 5, name "vulnerabilities": json: cannot unmarshal object into Go value of type fleet.VulnerabilitiesSlice
t
Hi Esteban, sorry to hear you're having trouble with that feature. Could you tell me a bit more about your deployment? How many hosts do you have? And would you be able to run a SQL query so that we can understand what data might be causing that error?
e
Hello, I have aprox 100hosts. Right now I can't run any query on the host since it shows me an error page with that message. The only thing I did was declaring the FLEET_BETA_SOFTWARE_INVENTORY=1 environmental variable on my docker compose.
Right now without the variable setting I can't query any host
t
would you be able to provide us with the result of the following sql query:
Copy code
SELECT s.id, s.name, s.version, s.source, coalesce(scp.cpe, "") as generated_cpe, 
			IF(
				JSON_ARRAYAGG(scv.cve) = JSON_ARRAYAGG(null), 
				null, 
				JSON_ARRAYAGG(
					JSON_OBJECT(
						"cve", scv.cve, 
						"details_link", CONCAT('<https://nvd.nist.gov/vuln/detail/>', scv.cve)
					)
				)
			) as vulnerabilities FROM software s
		LEFT JOIN software_cpe scp ON (s.id=scp.software_id)
		LEFT JOIN software_cve scv ON (scp.id=scv.cpe_id)
		group by s.id, s.name, s.version, s.source, generated_cpe
?
e
I've sent you the result of the query
t
the work around for now would be: disable software inventory, and clear the table host_software. That should break it seems mariadb is behaving unexpectedly with the query. We'll need to tweak it
@Esteban what version of mariadb are you running?
e
Version: 5.7
I had a simular issue with MariaDB on a new update. https://osquery.slack.com/archives/C01DXJL16D8/p1625139217334900
t
is that mariadb? or the mysql compatibility? if it's the mariadb version, sounds quite old, I see it's on 10.x now
e
Let me check
My bad, it's 10.5.4
t
great, will check against that
10.6 seems to work so far, fwiw
ok, I see tests failing on 10.5.4, 10.5.12 works as well
e
I see, I can't update the service right now. There's a possible fix?
t
there is, there's a PR for review, we might push a minor release with that fix and another one
e
Thanks, I'll be waiting for the release