Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail test on SELinux denials and export audit.log if any found #3837

Open
jlebon opened this issue Jul 24, 2024 · 0 comments
Open

Fail test on SELinux denials and export audit.log if any found #3837

jlebon opened this issue Jul 24, 2024 · 0 comments
Labels
jira for syncing to jira

Comments

@jlebon
Copy link
Member

jlebon commented Jul 24, 2024

The selinux-policy maintainers sometimes set new rules to permissive to give users time to report denials and fix those before flipping the switch to enforcing. We haven't been noticing the new denials until the switch to enforcing happens because we currently don't report tests with SELinux denials as failing. We should fix that.

Also, when reporting denials to the policy maintainers, it's helpful to them to include the audit logs. So we need to archive that information too alongside the console and journal.

There's a lot of discussions and code in #2067 related to this.

Briefly:

  1. after a test completes, export out audit.log from the machine
  2. in the same area we check for unit failures, also check for SELinux denials in the audit logs
  3. if denials are found, export out audit.log to the outputdir for that test and mark the test as failed
  4. add a new kola test tag that allows skipping selinux denial checking, and use it for tests that may purposely trigger them
  5. make it possible to skip only selinux denials via kola-denylist.yaml
@jlebon jlebon added the jira for syncing to jira label Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira for syncing to jira
Projects
None yet
Development

No branches or pull requests

1 participant