feat(audit): more flatpak checks, adjust warning severity, JSON support#1057
Merged
RoyalOughtness merged 10 commits intosecureblue:livefrom May 25, 2025
Merged
feat(audit): more flatpak checks, adjust warning severity, JSON support#1057RoyalOughtness merged 10 commits intosecureblue:livefrom
RoyalOughtness merged 10 commits intosecureblue:livefrom
Conversation
RoyalOughtness
previously approved these changes
May 19, 2025
RoyalOughtness
previously approved these changes
May 19, 2025
RKNF404
reviewed
May 23, 2025
EsseLowNitro
approved these changes
May 23, 2025
RKNF404
reviewed
May 23, 2025
RKNF404
reviewed
May 23, 2025
Flatpaks are now checked for "home" or "host" filesystem access, permissions that grant the ability to acquire arbitrary permissions, more device permissions, and PulseAudio permissions. Kernel argument checks have been separated into kargs automatically set by `ujust set-kargs-hardening` (which give a failure status if not present) and optional/unstable kargs (which only give a warning if not present). A new status, `CAUTION`, has been added to allow for more fine-grained feedback on flatpak permissions, and the warning level for various flatpak permissions has been adjusting accordingly. The script now supports a `--json` (or `-j`) option to produce JSON output. Signed-off-by: Daniel Hast <[email protected]>
Signed-off-by: Daniel Hast <[email protected]>
Signed-off-by: Daniel Hast <[email protected]>
* Check for filesystem=xdg-cache, xdg-config, xdg-data permissions. * Improve filesystem permissions parsing. * Make session-bus, system-bus permissions a FAILURE. * Make device=usb permissions a WARNING. Also, a few minor style/formatting changes: * Alphabetize karg checks for readability. * Make punctuation consistent in recommendations. * Remove extra '...' from reports.
The new class PermissionCheck encodes the necessary data for many basic permission checks, allowing a lot of repetitive code to be factored out. Also, parsing of flatpak permissions has been made more robust.
9fae282 to
f076eba
Compare
RKNF404
approved these changes
May 24, 2025
RoyalOughtness
approved these changes
May 24, 2025
RoyalOughtness
pushed a commit
to RoyalOughtness/secureblue-dev
that referenced
this pull request
Aug 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Flatpaks are now checked for a list of dangerous filesystem access permissions, permissions that grant the ability to acquire arbitrary permissions, more device permissions, SSH agent permissions, and PulseAudio permissions. The flatpak permission checks also have a new
NOTICEstatus used for some detected permissions, and the code has been separated out into its ownaudit_flatpakmodule and refactored to reduce code duplication.Kernel argument checks have been separated into kargs automatically set by
ujust set-kargs-hardening(which give a failure status if not present) and optional/unstable kargs (which only give a warning if not present), and alphabetized within each list.The script now supports a
--json(or-j) option to produce JSON output.The formatting of the output has also been improved: the output is a little wider (up to 100 columns) when the terminal size allows for it, and ellipses rather than spaces are used for padding to make it easier to visually trace between a description and the corresponding status.