Skip to content

fix: unbreak and optimize harden-flatpak script#962

Merged
RoyalOughtness merged 3 commits intosecureblue:livefrom
pxlkng:fix/broken-harden-flatpak
Mar 23, 2025
Merged

fix: unbreak and optimize harden-flatpak script#962
RoyalOughtness merged 3 commits intosecureblue:livefrom
pxlkng:fix/broken-harden-flatpak

Conversation

@pxlkng
Copy link
Copy Markdown
Collaborator

@pxlkng pxlkng commented Mar 23, 2025

The harden-flatpak script is broken since the ShellCheck PR, due to it previously relying on the $flatpak_id variable being unquoted for applying the hardening globally. With the variable now quoted, it is passed as an empty argument (instead of none at all) to the flatpak command, which expects a valid app ID and trips because '' (empty) is not a valid app ID.

Discord support thread for reference:
https://discord.com/channels/1202086019298500629/1353322889578942574

This PR makes it work again and also optimizes it a bit.

Note: The ujust variable {{ FLATPAK }} wasn't quoted before, because ShellCheck can't understand them, but as far as I'm aware they should be quoted as well to prevent the same issues as with bash-native variables.

@pxlkng pxlkng requested a review from RoyalOughtness as a code owner March 23, 2025 12:41
@RoyalOughtness RoyalOughtness enabled auto-merge (squash) March 23, 2025 13:29
@RoyalOughtness RoyalOughtness merged commit 1309bb1 into secureblue:live Mar 23, 2025
8 of 9 checks passed
@pxlkng pxlkng deleted the fix/broken-harden-flatpak branch March 24, 2025 18:34
RoyalOughtness pushed a commit to RoyalOughtness/secureblue-dev that referenced this pull request Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants