From bdc762a762b12da986f3a6793235e0198dff78a6 Mon Sep 17 00:00:00 2001 From: Stephen Ball Date: Tue, 24 Oct 2023 09:37:32 -0400 Subject: [PATCH] Update Tanium README and build script for v3 --- Solutions/Tanium/README.md | 13 ++++ Solutions/Tanium/build_solution.sh | 99 +++++------------------------- 2 files changed, 30 insertions(+), 82 deletions(-) diff --git a/Solutions/Tanium/README.md b/Solutions/Tanium/README.md index c1cb595d1ab..3fea522e6a2 100644 --- a/Solutions/Tanium/README.md +++ b/Solutions/Tanium/README.md @@ -27,6 +27,19 @@ Prerequisites: - Install make `brew install make` - Install arm-ttk in powershell: https://github.com/Azure/arm-ttk +Ensure that you add arm-ttk to your powershell profile e.g. + +``` +(in powershell) + +> New-Item -Type File -Path $PROFILE -Force +> vim $PROFILE + +(in that file add:) + +Import-Module /full/path/to/import/module/for/arm-ttk +``` + Building a solution: 1. Clone the https://github.com/Tanium/Azure-Sentinel repo diff --git a/Solutions/Tanium/build_solution.sh b/Solutions/Tanium/build_solution.sh index 96b8d7144fd..790ca872e0c 100755 --- a/Solutions/Tanium/build_solution.sh +++ b/Solutions/Tanium/build_solution.sh @@ -2,12 +2,6 @@ set -Eeuo pipefail -# globals -_TOOL_DIRECTORY="Tools/Create-Azure-Sentinel-Solution/V2" -_SH_TOOL_DIRECTORY="./$_TOOL_DIRECTORY" -_INPUT_DIRECTORY="$_SH_TOOL_DIRECTORY/input" -_REBUILD=0 - _msg() { echo >&2 -e "${1-}" } @@ -39,40 +33,16 @@ _die() { exit "$code" } -report_failure() { - declare log=$1 - grep Failed "$log" - grep -E 'Errors.*:.*[A-Z]' -A10 "$log" || true -} - build_solution() { _msg "🏗 Building Tanium Sentinel solution" - pwsh -Command "$_TOOL_DIRECTORY/createSolutionV2.ps1" -} - -build_failed() { - grep -qm1 '^Failed' "$1" -} - -report_success() { - declare log=$1 - - _msg_success "🎉 Build success" - - _msg < "$logfile" - post_build_cleanup "$tmpdir" - if build_failed "$logfile"; then - report_failure "$logfile" - _die "Detected a build failure" - fi - report_success "$logfile" ) }