ComplianceAsCode / ComplianceAsCode/content
Rule mount_option_tmp_noexec fails in /hardening/host-os/ansible
- Dominant language
- Shell
- Stars
- 2.8k
- Forks
- 828
- Avg merge
- 3d 8m
- Merged PRs (30d)
- 80
Description
#### Description of problem:
Rule `mount_option_tmp_noexec` fails in Contest test `/hardening/host-os/ansible`.
The issue has been noticed during review of https://github.com/ComplianceAsCode/content/pull/14999 but the issue is long-standing, isn't caused by that PR.
The fail is currently hidden by this really generic waiver:
```
# we don't control partitions on the host OS
/hardening/host-os/.+/mount_option_(home|opt|srv|var|var_log|var_log_audit|tmp)_(noexec|nosuid|nodev|usrquota|grpquota)
True
```
The rule fails because OVAL detects it as applicable but Ansible detects it as notapplicable. It seems that the Ansible expression in ansible_mounts works differently than we expect.
#### SCAP Security Guide Version:
current upstream master as of 2026-08-17
#### Operating System Version:
RHEL 9.9 and 10.3
#### Steps to Reproduce:
1. Run eg. `/hardening/host-os/ansible/anssi_bp28_high`
2. Look for waived fail
3.
4.
#### Actual Results:
`mount_option_tmp_noexec` is "waived fail"
#### Expected Results:
`mount_option_tmp_noexec` is pass
#### Additional Information/Debugging Steps:
no
Contributor guide
Research direction
Run `/hardening/host-os/ansible/anssi_bp28_high` and inspect the waived failure for `mount_option_tmp_noexec`. Compare how OVAL and Ansible determine applicability for this rule, focusing on the `ansible_mounts` expression described in the issue. Done means the rule reports pass on the stated RHEL versions instead of a waived fail.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ansible
- Domain
- security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100