kolide / launcher

Osquery launcher, autoupdater, and packager
https://kolide.com/launcher
Other
500 stars 99 forks source link

Add `kolide_snap_upgradeable` table and new `data_table` exec parser #1636

Closed Micah-Kolide closed 3 months ago

Micah-Kolide commented 4 months ago

I've created a new string delimited method for processing csv-esque/data table output.

Initially I was aiming to utilize this new method for both flatpak and snap, but due to many issues that arose with flatpak (they are commented in that PR) I've only stuck with snap for now.

$ snap refresh --list
Name    Version   Rev   Size  Publisher   Notes
core22  20240111  1122  77MB  canonical✓  base

osquery> SELECT * FROM kolide_snap_upgradeable;
+-------------+--------+-----------+-------------+-------+
| fullkey     | parent | key       | value       | query |
+-------------+--------+-----------+-------------+-------+
| 0/Version   | 0      | Version   | 20240111    | *     |
| 0/Rev       | 0      | Rev       | 1122        | *     |
| 0/Size      | 0      | Size      | 77MB        | *     |
| 0/Publisher | 0      | Publisher | canonical** | *     |
| 0/Notes     | 0      | Notes     | base        | *     |
| 0/Name      | 0      | Name      | core22      | *     |
+-------------+--------+-----------+-------------+-------+