Skip to content

fix(audit): handle errors better; add rec for ld.so.preload check.#1034

Merged
RoyalOughtness merged 2 commits intosecureblue:livefrom
HastD:audit-error-handling
May 7, 2025
Merged

fix(audit): handle errors better; add rec for ld.so.preload check.#1034
RoyalOughtness merged 2 commits intosecureblue:livefrom
HastD:audit-error-handling

Conversation

@HastD
Copy link
Copy Markdown
Collaborator

@HastD HastD commented May 7, 2025

This adds fallback error handling to the audit script so that an exception in one check doesn't cause the whole script to terminate early. Instead, the traceback is printed to stderr in place and the script then continues with the rest of the checks. This means that a bug in one check won't render the whole script unusable, but it will still be clearly visible as an unexpected error.

I also added a recommendation to the /etc/ld.so.preload check, and modified the shebang and audit.just to always use the system Python installation at /usr/bin/python3.

@HastD HastD requested a review from RoyalOughtness as a code owner May 7, 2025 16:27
Other python3 installations (such as via brew) can run into problems in
some circumstances, such as not being able to access certain modules
installed as RPM packages.

Signed-off-by: Daniel Hast <[email protected]>
@RoyalOughtness RoyalOughtness merged commit 7651200 into secureblue:live May 7, 2025
13 of 14 checks passed
@HastD HastD deleted the audit-error-handling branch May 7, 2025 17:42
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.

3 participants