kolide / launcher

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

Add `kolide_flatpak_upgradeable` table with exec parser #1635

Closed Micah-Kolide closed 6 months ago

Micah-Kolide commented 7 months ago

Add a Kolide table for flatpak outdated packages. This one was very frustrating with how flatpak outputs data. Perhaps I should've started with only the app id and stopping there, but I was hoping to use the new StringDelimitedLineFunc to handle parsing the flatpak data table flatpak-table-printer.c. I was defeated in a truly brutal battle, the ages will never forget the terror that was flatpak tables.

Besides manually defining a header list for each Linux distribution I'm not sure how we could correctly parse flatpak remote-ls output. I did not feel like doing that at the moment, so that's why I've settled on only app id.

osquery> SELECT * FROM kolide_flatpak_upgradeable;
+---------+--------+-----+-------------------------------------+-------+
| fullkey | parent | key | value                               | query |
+---------+--------+-----+-------------------------------------+-------+
| 0/id    | 0      | id  | com.discordapp.Discord              | *     |
| 1/id    | 1      | id  | org.freedesktop.Platform.GL.default | *     |
| 2/id    | 2      | id  | org.freedesktop.Platform.GL.default | *     |
| 3/id    | 3      | id  | org.freedesktop.Platform.Locale     | *     |
| 4/id    | 4      | id  | org.freedesktop.Platform            | *     |
+---------+--------+-----+-------------------------------------+-------+
directionless commented 7 months ago

(I'm pulling from the merge queue, because I want to ponder pty with micah. We can carry on if we don't want to pick that up)

Micah-Kolide commented 7 months ago

(I'm pulling from the merge queue, because I want to ponder pty with micah. We can carry on if we don't want to pick that up)

No worries, I'm good to discuss the options.