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

Remove unused parameter missing_file_pass from rules and docs #12715

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,3 @@ template:
vars:
filepath: /etc/openvswitch/.conf.db.~lock~
fileuid: '800'
missing_file_pass: "true"
9 changes: 0 additions & 9 deletions docs/templates/template_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,6 @@
- **filepath_is_regex** - If set to `"true"` the OVAL will
consider the value of **filepath** as a regular expression.

- **missing_file_pass** - If set to `"true"` the OVAL check will
pass when file is absent. Default value is `"false"`.

- **file_regex** - Regular expression that matches file names in
a directory specified by **filepath**. Can be set only if
**filepath** parameter specifies a directory. Note: Applies to
Expand Down Expand Up @@ -332,9 +329,6 @@ they must be of the same length.
- **filepath_is_regex** - If set to `"true"` the OVAL will
consider the value of **filepath** as a regular expression.

- **missing_file_pass** - If set to `"true"` the OVAL check will
pass when file is absent. Default value is `"false"`.

- **file_regex** - Regular expression that matches file names in
a directory specified by **filepath**. Can be set only if
**filepath** parameter specifies a directory. Note: Applies to
Expand Down Expand Up @@ -369,9 +363,6 @@ they must be of the same length.
- **filepath_is_regex** - If set to `"true"` the OVAL will
consider the value of **filepath** as a regular expression.

- **missing_file_pass** - If set to `"true"` the OVAL check will
pass when file is absent. Default value is `"false"`.

- **file_regex** - Regular expression that matches file names in
a directory specified by **filepath**. Can be set only if
**filepath** parameter specifies a directory. Note: Applies to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,4 @@ template:
name: file_groupowner
vars:
filepath: /etc/at.allow
missing_file_pass: 'true'
gid_or_name: '0'
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ template:
name: file_groupowner
vars:
filepath: /etc/cron.allow
missing_file_pass: 'true'
{{% if "ubuntu" in product %}}
gid_or_name: 'crontab'
{{% else %}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ template:
name: file_owner
vars:
filepath: /etc/at.allow
missing_file_pass: 'true'
fileuid: '0'
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,4 @@ template:
name: file_owner
vars:
filepath: /etc/cron.allow
missing_file_pass: 'true'
fileuid: '0'
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,4 @@ template:
name: file_permissions
vars:
filepath: /etc/at.allow
missing_file_pass: 'true'
filemode: '{{{ target_perms_octal }}}'
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,4 @@ template:
name: file_permissions
vars:
filepath: /etc/cron.allow
missing_file_pass: 'true'
filemode: "{{{ target_perms_octal }}}"
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ template:
vars:
filepath: /etc/hosts.allow
gid_or_name: '0'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ template:
vars:
filepath: /etc/hosts.deny
gid_or_name: '0'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ template:
vars:
filepath: /etc/hosts.allow
fileuid: '0'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ template:
vars:
filepath: /etc/hosts.deny
fileuid: '0'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ template:
vars:
filepath: /etc/hosts.allow
filemode: '0644'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ template:
vars:
filepath: /etc/hosts.deny
filemode: '0644'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ template:
file_regex:
- ^.*\.pub$
gid_or_name: '0'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ template:
file_regex:
- ^.*\.pub$
fileuid: '0'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,5 @@ template:
name: file_permissions
vars:
filepath: /etc/ssh/
missing_file_pass: 'true'
file_regex: ^.*\.pub$
filemode: '0644'
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ template:
vars:
filepath: /etc/issue.net
gid_or_name: '0'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ template:
vars:
filepath: /etc/motd
gid_or_name: '0'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ template:
vars:
filepath: /etc/issue.net
fileuid: '0'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ template:
vars:
filepath: /etc/motd
fileuid: '0'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ template:
vars:
filepath: /etc/issue.net
filemode: '0644'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ template:
vars:
filepath: /etc/motd
filemode: '0644'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ template:
filepath: /boot/
file_regex: ^.*System\.map.*$
gid_or_name: root
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ template:
filepath: /boot/
file_regex: ^.*System\.map.*$
fileuid: '0'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ template:
file_regex: ^.*System\.map.*$
filemode: '0600'
allow_stricter_permissions: 'true'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ template:
vars:
filepath: /etc/group-
gid_or_name: '0'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,3 @@ template:
gid_or_name@ubuntu1804: '42'
gid_or_name@ubuntu2004: '42'
gid_or_name@ubuntu2204: '42'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ template:
vars:
filepath: /etc/passwd-
gid_or_name: '0'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,3 @@ template:
{{% else %}}
gid_or_name: '0'
{{% endif %}}
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ template:
vars:
filepath: /etc/security/opasswd
gid_or_name: '0'
missing_file_pass: true
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ template:
vars:
filepath: /etc/security/opasswd.old
gid_or_name: '0'
missing_file_pass: true
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ template:
vars:
filepath: /etc/group-
fileuid: '0'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ template:
vars:
filepath: /etc/gshadow-
fileuid: '0'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ template:
vars:
filepath: /etc/passwd-
fileuid: '0'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ template:
vars:
filepath: /etc/shadow-
fileuid: '0'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ template:
vars:
filepath: /etc/security/opasswd
fileuid: '0'
missing_file_pass: true
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ template:
vars:
filepath: /etc/security/opasswd.old
fileuid: '0'
missing_file_pass: true
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,3 @@ template:
vars:
filepath: /etc/group-
filemode: '0644'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ template:
filemode@ubuntu1804: '0640'
filemode@ubuntu2004: '0640'
filemode@ubuntu2204: '0640'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,3 @@ template:
vars:
filepath: /etc/passwd-
filemode: '0644'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,3 @@ template:
filemode@ubuntu2204: '0640'
filemode@sle12: '0640'
filemode@sle15: '0640'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ template:
vars:
filepath: /etc/security/opasswd
filemode: '0600'
missing_file_pass: true
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ template:
vars:
filepath: /etc/security/opasswd.old
filemode: '0600'
missing_file_pass: true
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,4 @@ template:
- /sbin/rsyslogd
- /sbin/augenrules
gid_or_name: '0'
missing_file_pass: 'true'

Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,3 @@ template:
- /sbin/rsyslogd
- /sbin/augenrules
fileuid: '0'
missing_file_pass: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ template:
- /sbin/rsyslogd
- /sbin/augenrules
filemode: '0755'
missing_file_pass: 'true'
3 changes: 0 additions & 3 deletions shared/templates/file_groupowner/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
def preprocess(data, lang):
ensure_file_paths_and_file_regexes_are_correctly_defined(data)

data["missing_file_pass"] = parse_template_boolean_value(
data, parameter="missing_file_pass", default_value=False)

data["recursive"] = parse_template_boolean_value(data,
parameter="recursive",
default_value=False)
Expand Down
34 changes: 0 additions & 34 deletions shared/templates/file_groupowner/tests/missing_file_test.pass.sh

This file was deleted.

3 changes: 0 additions & 3 deletions shared/templates/file_owner/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
def preprocess(data, lang):
ensure_file_paths_and_file_regexes_are_correctly_defined(data)

data["missing_file_pass"] = parse_template_boolean_value(
data, parameter="missing_file_pass", default_value=False)

data["recursive"] = parse_template_boolean_value(data,
parameter="recursive",
default_value=False)
Expand Down
32 changes: 0 additions & 32 deletions shared/templates/file_owner/tests/missing_file_test.pass.sh

This file was deleted.

2 changes: 0 additions & 2 deletions shared/templates/file_permissions/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ def preprocess(data, lang):

data["allow_stricter_permissions"] = parse_template_boolean_value(data, parameter="allow_stricter_permissions", default_value=True)

data["missing_file_pass"] = parse_template_boolean_value(data, parameter="missing_file_pass", default_value=False)

data["recursive"] = parse_template_boolean_value(data,
parameter="recursive",
default_value=False)
Expand Down
Loading