Fix: Fix the false fail checks in Azure Linux 3 v1.0.0#110
Merged
Conversation
afdesk
requested changes
Jan 9, 2026
cfg/Azure_linux_3/definitions.yaml
Outdated
Comment on lines
+2298
to
+2300
| CRON_DAILY="/etc/cron.daily" | ||
|
|
||
| if [ ! -f "$CRON_DAILY" ]; then |
Collaborator
There was a problem hiding this comment.
IIUC /etc/cron.daily is a folder. maybe I miss something
so do we need to use -d flag here?
Collaborator
Author
There was a problem hiding this comment.
No it is file, I have checked it
Collaborator
There was a problem hiding this comment.
hm, it's a bit strange:
$ docker run -it ubuntu:latest
root@d5af9ad306bf:/# ls -l /etc/ | grep cron
drwxr-xr-x 2 root root 4096 Sep 10 02:20 cron.d
drwxr-xr-x 2 root root 4096 Sep 10 02:20 cron.daily
root@d5af9ad306bf:/# ls /etc/cron.daily/
apt-compat dpkg
cfg/Azure_linux_3/definitions.yaml
Outdated
|
|
||
| if [ ! -f "$CRON_DAILY" ]; then | ||
| echo "cron_daily_missing" | ||
| elif stat -L "$CRON_DAILY" | grep -qE 'Access:\s+\(0700/drwx------\)\s+Uid:\s+\(\s*0/\s*root\)\s+Gid:\s+\(\s*0/\s*root\)'; then |
Collaborator
There was a problem hiding this comment.
maybe is it make sense to convert permission checks to the numeric stat -Lc style used in 5.1.5–5.1.7 for consistency?
afdesk
approved these changes
Jan 12, 2026
cfg/Azure_linux_3/definitions.yaml
Outdated
|
|
||
| if [ ! -f "$CRON_HOURLY" ]; then | ||
| echo "cron_hourly_missing" | ||
| elif stat -L "$CRON_HOURLY" | grep -qE 'Access:\s+\(0700/drwx------\)\s+Uid:\s+\(\s*0/\s*root\)\s+Gid:\s+\(\s*0/\s*root\)'; then |
cfg/Azure_linux_3/definitions.yaml
Outdated
| echo "cron_weekly_permission_ok" | ||
| CRON_WEEKLY="/etc/cron.weekly" | ||
|
|
||
| if [ ! -f "$CRON_WEEKLY" ]; then |
cfg/Azure_linux_3/definitions.yaml
Outdated
Comment on lines
+2298
to
+2300
| CRON_DAILY="/etc/cron.daily" | ||
|
|
||
| if [ ! -f "$CRON_DAILY" ]; then |
Collaborator
There was a problem hiding this comment.
hm, it's a bit strange:
$ docker run -it ubuntu:latest
root@d5af9ad306bf:/# ls -l /etc/ | grep cron
drwxr-xr-x 2 root root 4096 Sep 10 02:20 cron.d
drwxr-xr-x 2 root root 4096 Sep 10 02:20 cron.daily
root@d5af9ad306bf:/# ls /etc/cron.daily/
apt-compat dpkg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes test expectations and handling for several CIS checks to improve accuracy and reduce false failures.
Changes
Rationale
Results:

Check 2.2.18
Check 4.1.1

Check 5.1.2-5.1.7
