call airgap_rules if airgap. log rsync and git commands

This commit is contained in:
m0duspwnens
2024-10-23 15:58:11 -04:00
parent 0ba6df3b23
commit 4d902da931
2 changed files with 9 additions and 7 deletions

View File

@@ -44,17 +44,17 @@ logCmd() {
airgap_rules() { airgap_rules() {
# Copy the rules for detections if using Airgap # Copy the rules for detections if using Airgap
mkdir -p /nsm/rules mkdir -p /nsm/rules
rsync -av /root/SecurityOnion/agrules/ /nsm/rules/ logCmd "rsync -av /root/SecurityOnion/agrules/ /nsm/rules/"
# Copy over the securityonion-resources repo # Copy over the securityonion-resources repo
rsync -av /root/SecurityOnion/agrules/securityonion-resources /nsm/ logCmd "rsync -av /root/SecurityOnion/agrules/securityonion-resources /nsm/"
} }
airgap_detection_summaries() { airgap_detection_summaries() {
# Copy summaries over to SOC and checkout the correct branch # Copy summaries over to SOC and checkout the correct branch
rsync -av --chown=socore:socore /nsm/securityonion-resources /opt/so/conf/soc/ai_summary_repos logCmd "rsync -av --chown=socore:socore /nsm/securityonion-resources /opt/so/conf/soc/ai_summary_repos"
git config --global --add safe.directory /opt/so/conf/soc/ai_summary_repos/securityonion-resources logCmd "git config --global --add safe.directory /opt/so/conf/soc/ai_summary_repos/securityonion-resources"
git -C /opt/so/conf/soc/ai_summary_repos/securityonion-resources checkout generated-summaries-published logCmd "git -C /opt/so/conf/soc/ai_summary_repos/securityonion-resources checkout generated-summaries-published"
} }
add_admin_user() { add_admin_user() {

View File

@@ -692,8 +692,10 @@ if ! [[ -f $install_opt_file ]]; then
logCmd "so-minion -o=setup" logCmd "so-minion -o=setup"
title "Creating Global SLS" title "Creating Global SLS"
if [[ $is_airgap ]]; then
# Airgap Rules # Airgap Rules
airgap_rules airgap_rules
fi
manager_pillar manager_pillar