From 1f2bd3138041e75f719818f580f499a38bb7f03b Mon Sep 17 00:00:00 2001 From: ReachableCEO Date: Mon, 14 Jul 2025 12:53:41 -0500 Subject: [PATCH] . --- ProjectCode/Modules/Security/secharden-2fa.sh | 17 +++++++++-------- ProjectCode/Modules/Security/secharden-wazuh.sh | 4 ++++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/ProjectCode/Modules/Security/secharden-2fa.sh b/ProjectCode/Modules/Security/secharden-2fa.sh index df15032..3dfa085 100644 --- a/ProjectCode/Modules/Security/secharden-2fa.sh +++ b/ProjectCode/Modules/Security/secharden-2fa.sh @@ -4,34 +4,35 @@ # Implements 2FA for SSH, Cockpit, and Webmin services # Uses Google Authenticator (TOTP) for time-based tokens -# Script can be called from different contexts, so use absolute path resolution -SCRIPT_DIR="$(dirname "$(realpath "${BASH_SOURCE[0]}")")" -PROJECT_ROOT="$(dirname "$(dirname "$(dirname "$SCRIPT_DIR")")")" -# Set up framework variables expected by includes -export PROJECT_ROOT_PATH="$PROJECT_ROOT" +##### +#Core framework functions... +##### export PROJECT_ROOT_PATH PROJECT_ROOT_PATH="$(realpath ../../../)" +#Framework variables are read from hee + + export GIT_VENDOR_PATH_ROOT GIT_VENDOR_PATH_ROOT="$PROJECT_ROOT_PATH/vendor/git@git.knownelement.com/29418/" export KNELShellFrameworkRoot KNELShellFrameworkRoot="$GIT_VENDOR_PATH_ROOT/KNEL/KNELShellFramework" -#Framework variables are read from hee source $KNELShellFrameworkRoot/Framework-ConfigFiles/FrameworkVars -# Source framework functions for framework_include_file in $KNELShellFrameworkRoot/Framework-Includes/*; do source "$framework_include_file" done -for project_include_file in ../Project-Includes/*; do +for project_include_file in ../../../Project-Includes/*; do source "$project_include_file" done +#Framework variables are read from hee +source $KNELShellFrameworkRoot/Framework-ConfigFiles/FrameworkVars # 2FA Configuration BACKUP_DIR="/root/backup/2fa" diff --git a/ProjectCode/Modules/Security/secharden-wazuh.sh b/ProjectCode/Modules/Security/secharden-wazuh.sh index 7a2b65c..891f12f 100644 --- a/ProjectCode/Modules/Security/secharden-wazuh.sh +++ b/ProjectCode/Modules/Security/secharden-wazuh.sh @@ -9,6 +9,7 @@ PROJECT_ROOT_PATH="$(realpath ../../../)" #Framework variables are read from hee + export GIT_VENDOR_PATH_ROOT GIT_VENDOR_PATH_ROOT="$PROJECT_ROOT_PATH/vendor/git@git.knownelement.com/29418/" @@ -25,6 +26,9 @@ for project_include_file in ../../../Project-Includes/*; do source "$project_include_file" done +#Framework variables are read from hee +source $KNELShellFrameworkRoot/Framework-ConfigFiles/FrameworkVars + # We don't want to run this on the wazuh server, otherwise bad things happen...