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

Fixes #227 : Add system_audit subsection in rootcheck #228

Merged
merged 5 commits into from
Mar 18, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions manifests/agent.pp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
$ossec_rootcheck_frequency = $wazuh::params_agent::ossec_rootcheck_frequency,
$ossec_rootcheck_rootkit_files = $wazuh::params_agent::ossec_rootcheck_rootkit_files,
$ossec_rootcheck_rootkit_trojans = $wazuh::params_agent::ossec_rootcheck_rootkit_trojans,
$ossec_rootcheck_system_audit = $wazuh::params_agent::default_rootcheck_system_audit,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to use an auxiliary variable default_rootcheck_system_audit.

Changed in 624daa7 & 057f54e.

Thanks,

$ossec_rootcheck_skip_nfs = $wazuh::params_agent::ossec_rootcheck_skip_nfs,


Expand Down
8 changes: 8 additions & 0 deletions manifests/params_agent.pp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@

$active_response_ca_verification = 'yes'

## system audit
$ossec_rootcheck_system_audit = $::wazuh::params_agent::default_rootcheck_system_audit

# OS specific configurations
case $::kernel {
'Linux': {
Expand Down Expand Up @@ -233,6 +236,11 @@

$manage_repo = true

$default_rootcheck_system_audit = [
"./shared/system_audit_rcl.txt",
"./shared/system_audit_ssh.txt",
]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to use an auxiliary variable default_rootcheck_system_audit.

Changed in 624daa7 & 057f54e.

Thanks,

case $::osfamily {
'Debian': {
$service_has_status = false
Expand Down
5 changes: 5 additions & 0 deletions templates/fragments/_rootcheck.erb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
<% if @ossec_rootcheck_rootkit_trojans-%>
<rootkit_trojans><%= @ossec_rootcheck_rootkit_trojans %></rootkit_trojans>
<%- end -%>
<%- if @ossec_rootcheck_system_audit -%>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would check if the list is empty or not, rather than checking if it's defined.

Changed in 96e2e89

Thanks,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rshad ah! my bad, thanks for pointing it out and fixing it :)

<%- @ossec_rootcheck_system_audit.each do |audit_file| -%>
<system_audit><%= audit_file %></system_audit>
<%- end -%>
<%- end -%>
<% if @ossec_rootcheck_skip_nfs-%>
<skip_nfs><%= @ossec_rootcheck_skip_nfs%></skip_nfs>
<%- end -%>
Expand Down