coreos / coreos/coreos-assembler
Fail test on SELinux denials and export audit.log if any found
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 393
- Forks
- 193
- Avg merge
- 17h 6m
- Merged PRs (30d)
- 5
Description
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 https://github.com/coreos/coreos-assembler/pull/2067 related to this.
Briefly:
- after a test completes, export out audit.log from the machine
- in the same area we check for unit failures, also check for SELinux denials in the audit logs
- if denials are found, export out audit.log to the outputdir for that test and mark the test as failed
- add a new kola test tag that allows skipping selinux denial checking, and use it for tests that may purposely trigger them
- make it possible to skip only selinux denials via
kola-denylist.yaml
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the discussion and code in coreos-assembler PR 2067, then trace the Kola test handling around unit failures and output archives. Inspect kola-denylist.yaml and the proposed Kola test tag behavior. Done means audit.log is exported, SELinux denials fail tests unless explicitly skipped, and the denylist supports skipping only denial checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- security, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100