Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
c511374
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 14, 2026
6f53a4f
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 15, 2026
09af2ef
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 15, 2026
a8e8522
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 16, 2026
3442ae3
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 16, 2026
a38261a
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 16, 2026
bab848a
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 17, 2026
f8d98c7
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 17, 2026
1f96401
feat: Add new ControlConfig creation component for SQL‑based complian…
elmilan06 Jan 19, 2026
d5a4c55
feat: Add new ControlConfig creation component for SQL‑based complian…
elmilan06 Jan 21, 2026
4cfd735
feat: Add new ControlConfig creation component for SQL‑based complian…
elmilan06 Jan 24, 2026
a2d07e2
feat: Add new ControlConfig creation component for SQL‑based complian…
elmilan06 Jan 25, 2026
6536646
feat: Add new ControlConfig creation component for SQL‑based complian…
elmilan06 Jan 25, 2026
6bad168
feat: Add new ControlConfig creation component for SQL‑based complian…
elmilan06 Jan 27, 2026
d154335
Merge remote-tracking branch 'origin/release/v11.2.2' into backlog/co…
elmilan06 Jan 27, 2026
6f93bfd
feat: Add new ControlConfig creation component for SQL‑based complian…
elmilan06 Jan 27, 2026
49ff25c
feat: Add new ControlConfig creation component for SQL‑based complian…
elmilan06 Jan 27, 2026
ab0d4c3
Merge remote-tracking branch 'origin/release/v11.2.2' into backlog/co…
elmilan06 Jan 27, 2026
7f7d0ea
Merge remote-tracking branch 'origin/backlog/compliance-evaluation' i…
elmilan06 Jan 27, 2026
f36a597
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 17, 2026
3a27ff1
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 17, 2026
c2ca1ad
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 27, 2026
bde728f
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 27, 2026
44a56ae
feat: enhance compliance control configuration with section mapping a…
elmilan06 Jan 27, 2026
2d31b90
feat: Revert unnecessary changes
elmilan06 Jan 27, 2026
8d5cf6c
feat: enhance compliance control configuration with section mapping a…
elmilan06 Jan 28, 2026
e14c2a6
Merge remote-tracking branch 'origin/backlog/compliance-evaluation' i…
elmilan06 Jan 28, 2026
bde1081
feat: refactor compliance query form and related components for impro…
elmilan06 Jan 28, 2026
b8a60d6
feat: implement compliance orchestrator backend client and evaluation…
elmilan06 Jan 28, 2026
610552f
feat: implement compliance orchestrator backend client and evaluation…
elmilan06 Feb 4, 2026
94a84f5
feat: implement compliance orchestrator backend client and evaluation…
elmilan06 Feb 15, 2026
2c44b06
feat: provide endpoint for OpenSearch evaluations including latest ev…
elmilan06 Feb 25, 2026
07cc80a
feat: implement compliance orchestrator backend client and evaluation…
elmilan06 Mar 10, 2026
3b39ba3
feat: provide endpoint for OpenSearch evaluations including latest ev…
elmilan06 Mar 12, 2026
dc67353
feat: refactor compliance evaluation classes and update related mappings
elmilan06 Mar 13, 2026
004eaac
feat: implement compliance orchestrator backend client and evaluation…
elmilan06 Mar 13, 2026
16ab4b4
feat: refactor compliance evaluation classes and update related mappings
elmilan06 Mar 13, 2026
1467cff
feat: implement timeline visualization for compliance evaluations wit…
elmilan06 Feb 25, 2026
1e4b6d6
feat: implement timeline visualization for compliance evaluations wit…
elmilan06 Feb 26, 2026
75842a8
feat: implement timeline visualization for compliance evaluations
elmilan06 Mar 5, 2026
331849d
feat: implement timeline visualization for compliance evaluations
elmilan06 Mar 9, 2026
b31b8c6
feat: implement timeline visualization for compliance evaluations
elmilan06 Mar 13, 2026
2a3489f
feat: implement timeline visualization for compliance evaluations
elmilan06 Mar 16, 2026
4266061
feat: implement timeline visualization for compliance evaluations
elmilan06 Mar 17, 2026
a3d3d20
feat: enrich compliance evaluation details with rule, rule value, and…
elmilan06 Mar 19, 2026
475bd96
feat: enhance compliance control evaluation with pagination support
elmilan06 Mar 17, 2026
467ebdf
feat: extend control evaluation status with additional states and ref…
elmilan06 Mar 19, 2026
2d0baf9
feat: add evaluation rule and rule value to compliance evaluation DTO…
elmilan06 Mar 19, 2026
6102281
feat: include evaluation rule and rule value in query evaluation mode…
elmilan06 Mar 19, 2026
a904030
feat: enhance compliance control evaluation with search functionality
elmilan06 Mar 23, 2026
01e597a
feat: update application version file path for consistency
elmilan06 Mar 23, 2026
8ecf6b4
fix: implement sorting logic for compliance evaluations
elmilan06 Mar 24, 2026
88d0d7d
feat(agent): add native auditd collector for Linux
yllada Mar 27, 2026
527d744
feat(filters): add auditd support to linux filter v5.0.0
yllada Mar 27, 2026
f77ef28
refactor(filters): remove deprecated system_linux_module.yml
yllada Mar 27, 2026
c2aba9e
fix(filters): adjust auditd event severity handling in linux filter
yllada Mar 27, 2026
83eed3e
chore(agent): update version to 11.1.5
yllada Mar 27, 2026
7dbdce3
changeset[backend](linux): update linux filter
AlexSanchez-bit Mar 27, 2026
5b7cc19
fix(agent): prevent auditd buffer overflow with backpressure mitigation
yllada Mar 27, 2026
6cb6c41
fix(agent): reduce auditd log noise with threshold and execve filter
yllada Mar 30, 2026
272d2fa
fix(agent): filter false events lost from go-libaudit sequence rollover
yllada Mar 30, 2026
fbbb1af
feat(agent): expand auditd rules with log tampering and identity files
yllada Mar 30, 2026
2cf64e0
feat[backend](agent): added shell parameter to agent connection
AlexSanchez-bit Mar 30, 2026
ce1b932
feat[frontend](agent-console): added shell switch for windows agents …
AlexSanchez-bit Mar 30, 2026
8b9dc72
fix[backend](elastic-service): added space verification before removi…
AlexSanchez-bit Mar 31, 2026
5afe131
fix[backend](index-removal): added index verification before removal
AlexSanchez-bit Mar 31, 2026
95f9557
fix[backend](index-removal): fixed index state field obtention
AlexSanchez-bit Mar 31, 2026
fe5dde4
fix[backend](index-removal): fixed compilation errors on index removal
AlexSanchez-bit Mar 31, 2026
b62f094
changeset[backend](o365_visualization): updated o365 file upload visu…
AlexSanchez-bit Mar 31, 2026
c9a728e
changeset[backend](o365_visualization): updated o365 file sync downlo…
AlexSanchez-bit Mar 31, 2026
d56444b
changeset[backend](o365_visualization): updated o365 visualizations
AlexSanchez-bit Mar 31, 2026
71d2014
update windows-events filter
JocLRojas Apr 1, 2026
d1f96c6
feat[backend](dependencies): updated apache-tika to avoid vulnerable …
AlexSanchez-bit Apr 1, 2026
7eacc76
feat[backend](dependencies): updated flying-saucer-pdf dependency and…
AlexSanchez-bit Apr 1, 2026
109664b
fix(installer): enhance post-installation error handling and Docker s…
osmontero Apr 1, 2026
3ecb0c0
changeset[backend](windows_filter): updated windows filters
AlexSanchez-bit Apr 1, 2026
9bcca5a
changeset[backend](windows_rules): updated windows rules
AlexSanchez-bit Apr 1, 2026
f4936ec
feat[frotend](dependencies): updated dependencies for security improves
AlexSanchez-bit Apr 1, 2026
cca333e
changeset[backend](windows_rules): updated windows rules data types
AlexSanchez-bit Apr 1, 2026
a1a0342
fix(installer): security improvements and code cleanup
Kbayero Apr 2, 2026
cd79a09
feat(security): add OpenSearch SSL and authentication support
Kbayero Apr 2, 2026
909508e
feat[backend](updated filters and rules): added a initial process to …
AlexSanchez-bit Apr 2, 2026
3af0ef3
feat: add endpoint to retrieve latest evaluation by control ID
elmilan06 Apr 3, 2026
0c8f193
feat: enhance compliance evaluation mappers to load full Standard object
elmilan06 Apr 3, 2026
0baab17
feat(soc-ai): add multi-provider LLM support and HTTP API for manual …
Kbayero Apr 3, 2026
1f7443f
Merge branch 'release/v11.2.6' of https://github.com/utmstack/UTMStac…
Kbayero Apr 3, 2026
2145c70
feat(backend): add filters and rules to backend docker image
Kbayero Apr 3, 2026
ea7d894
fix(backend): update OpenSearch connection to use HTTPS with authenti…
Kbayero Apr 3, 2026
c779bd5
feat(panel): add manual alert analysis endpoint with SSL support
Kbayero Apr 3, 2026
f72e468
fix(backend): use analyzeAlert method in UtmAlertServiceImpl
Kbayero Apr 3, 2026
8f55081
feat[backend](updated filters and rules): added initial load service
AlexSanchez-bit Apr 3, 2026
8b96a58
feat[backend](updated filters and rules): added initial load service
AlexSanchez-bit Apr 3, 2026
820a1c7
feat[backend](updated filters and rules): forced systemOwnedMode on r…
AlexSanchez-bit Apr 3, 2026
bf78f42
feat[backend](updated filters and rules): added removed rules and fil…
AlexSanchez-bit Apr 3, 2026
c6d098f
feat[backend](updated filters and rules): forced filters adn rules to…
AlexSanchez-bit Apr 3, 2026
5fb23e0
feat[backend](updated filters and rules): set null to invalid module …
AlexSanchez-bit Apr 3, 2026
47acd6f
changeset[backend](socai): updated socai integration guide configuration
AlexSanchez-bit Apr 3, 2026
11fc5da
fix[frontend](integration-guide): fixed cisco asa and firepower commands
AlexSanchez-bit Apr 7, 2026
113d002
fix[backend](cypherUtil): make key|iv derivation be local instead of …
AlexSanchez-bit Apr 7, 2026
72e22d3
Merge remote-tracking branch 'origin/v11' into backlog/compliance-eva…
elmilan06 Apr 7, 2026
3ee3cd7
fix: correct query parameter for search
elmilan06 Mar 23, 2026
28656f5
fix: Corrected incorrect behavior in filtering
elmilan06 Mar 23, 2026
3a1988d
fix: update sorting direction for compliance evaluations
elmilan06 Mar 24, 2026
ab3ab54
feat: add print view for compliance evaluations with detailed report
elmilan06 Apr 3, 2026
3c4e2e0
feat: add print view for compliance evaluations with detailed report
elmilan06 Apr 3, 2026
282371e
feat: add print view for compliance evaluations with detailed report
elmilan06 Apr 3, 2026
f215e24
feat: add print view for compliance evaluations with detailed report
elmilan06 Apr 3, 2026
b2e9010
feat: add print view for compliance evaluations with detailed report
elmilan06 Apr 3, 2026
c53d170
feat: add print view for compliance evaluations with detailed report
elmilan06 Apr 3, 2026
8b63422
feat: add print view for compliance evaluations with detailed report
elmilan06 Apr 3, 2026
06e9990
feat: add print view for compliance evaluations with detailed report
elmilan06 Apr 3, 2026
e36994b
fix[backend](healthcheck): removed springboot healthcheck to allow cu…
AlexSanchez-bit Apr 7, 2026
d1f417d
Merge branch 'release/v11.2.6' of https://github.com/utmstack/UTMStac…
Kbayero Apr 8, 2026
0260a7f
Merge branch 'release/v11.2.6' of https://github.com/utmstack/UTMStac…
Kbayero Apr 8, 2026
031f1c1
Merge remote-tracking branch 'origin/release/v11.2.6' into backlog/co…
elmilan06 Apr 8, 2026
7c9a9c7
fix[backend](initial-setup): improved filter insertion on system load
AlexSanchez-bit Apr 8, 2026
941c847
fix[backend](initial-setup): improved filter deletion on initial setup
AlexSanchez-bit Apr 8, 2026
717bcc4
changeset[backend](data-types,modules): seeded data type - module rel…
AlexSanchez-bit Apr 8, 2026
a8bb858
fix[backend](initial-setup): improved error handling on failed to ins…
AlexSanchez-bit Apr 8, 2026
cd28b0e
fix[backend](initial-setup): fixed filter index error
AlexSanchez-bit Apr 8, 2026
5f41514
fix[backend](initial-setup):added RuleYml to parse rules yml
AlexSanchez-bit Apr 8, 2026
ca9e075
fix[backend](rules): fixed rules definitions
AlexSanchez-bit Apr 8, 2026
d05f323
feat[backend](log_events): added logs on every system admin operation
AlexSanchez-bit Apr 8, 2026
5ae77a1
Merge branch 'release/v11.2.6' of https://github.com/utmstack/UTMStac…
Kbayero Apr 9, 2026
c196ac7
fix[rules]: remove unused rules
Kbayero Apr 9, 2026
e7725e2
fix[baclend]: solve sintax problems in rules
Kbayero Apr 9, 2026
29fe2af
fix[backend]: solved problem with merge
Kbayero Apr 9, 2026
fe359c8
fix[backend](serialization): add @JsonIgnore to UtmModule lazy collec…
Kbayero Apr 9, 2026
9073eec
fix[agent-manager](security): prevent SQL injection in filters, add c…
Kbayero Apr 9, 2026
ce283c0
feat[backend,frontend](incident-response): add shell selection for Wi…
Kbayero Apr 9, 2026
dffce38
fix[frontend](soar): remove legacy automation route and update audit …
Kbayero Apr 9, 2026
23e8b9d
refactor(plugins): replace config polling with channel-based configur…
JocLRojas Apr 9, 2026
03d4e86
feat[soc-ai]: improve soc-ai integration
Kbayero Apr 9, 2026
84f038f
fix[backend,frontend,plugins](integrations): mask sensitive config va…
Kbayero Apr 9, 2026
edadfb6
fix[frontend](integrations): only clear saved tenant changes instead …
Kbayero Apr 9, 2026
9904393
Merge branch 'release/v11.2.6' of https://github.com/utmstack/UTMStac…
Kbayero Apr 9, 2026
13030a0
fix(modules-config): prevent single plugin failure from blocking all …
JocLRojas Apr 9, 2026
d5bee2c
Merge branch 'release/v11.2.6' of https://github.com/utmstack/UTMStac…
JocLRojas Apr 9, 2026
5dfc003
fix[backend,frontend]: add missing Constants import and remove duplic…
Kbayero Apr 9, 2026
19d04b0
Merge branch 'release/v11.2.6' of https://github.com/utmstack/UTMStac…
Kbayero Apr 9, 2026
c7611c5
feat: refactor OpenSearch integration with new connection model
elmilan06 Apr 10, 2026
8436126
feat: rename compliance configuration changelogs
elmilan06 Apr 10, 2026
db38d2c
Merge remote-tracking branch 'origin/release/v11.2.6' into backlog/co…
elmilan06 Apr 10, 2026
e5c05e2
Merge remote-tracking branch 'origin/backlog/compliance-evaluation' i…
elmilan06 Apr 10, 2026
2a6d876
fix: correct standardId binding in compliance control create component
elmilan06 Apr 10, 2026
845cf1c
fix(agent): poll Windows service state instead of fixed sleep during …
yllada Apr 16, 2026
cae14db
Merge remote-tracking branch 'origin/release/v11.2.7' into backlog/co…
elmilan06 Apr 20, 2026
9710409
fix(aws): correct typo in log.userIdentityAccessrequestParametersBuck…
yllada Apr 21, 2026
16f9af1
fix(updater): enhance version.json promotion and rollback handling du…
yllada Apr 21, 2026
45663b7
feat(dependency): implement pre-download hooks for updater service ma…
yllada Apr 21, 2026
a3ecd77
feat: update compliance orchestrator plugin integration
elmilan06 Apr 22, 2026
f78e074
Merge remote-tracking branch 'origin/release/v11.2.7' into backlog/co…
elmilan06 Apr 22, 2026
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 .github/workflows/v11-deployment-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ jobs:
cd ${{ github.workspace }}/plugins/modules-config; go build -o com.utmstack.modules-config.plugin -v .
cd ${{ github.workspace }}/plugins/crowdstrike; go build -o com.utmstack.crowdstrike.plugin -v .
cd ${{ github.workspace }}/plugins/feeds; go build -o com.utmstack.feeds.plugin -v .
cd ${{ github.workspace }}/plugins/compliance-orchestrator; go build -o com.utmstack.compliance-orchestrator.plugin -v .

- name: Prepare Dependencies for Event Processor Image
run: |
Expand Down
50 changes: 50 additions & 0 deletions agent/dependency/dependency.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,29 @@ const (
MacosCollectorVersion = "11.2.3"
)

// getUpdaterVersion reads the desired updater version from version.json
// (the updater_version field). Falls back to UpdaterVersion if the
// file is missing, unreadable, or the field is empty.
//
// The source of truth for this value is version.json shipped by the server,
// which the updater promotes on each successful agent update.
func getUpdaterVersion() string {
var v struct {
UpdaterVersion string `json:"updater_version"`
}
versionPath := filepath.Join(fs.GetExecutablePath(), "version.json")
if !fs.Exists(versionPath) {
return UpdaterVersion
}
if err := fs.ReadJSON(versionPath, &v); err != nil {
return UpdaterVersion
}
if v.UpdaterVersion == "" {
return UpdaterVersion
}
return v.UpdaterVersion
}

// UpdaterFile returns the updater binary name with OS and architecture suffix.
// Format: utmstack_updater_service_<os>_<arch>[.exe]
// Examples:
Expand All @@ -43,6 +66,7 @@ type Dependency struct {
DownloadURL func(server string) string // URL template to download from
DownloadName string // Filename to save as (if different from BinaryPath basename)
Critical bool // If true, failure blocks agent startup
PreDownload func() (cleanup func(), err error) // Called before download, returns cleanup for rollback
PostDownload func() error // Run after download (e.g., unzip). Can be nil.
Configure func() error // Run on first install (can be nil)
Update func() error // Run on version change (can be nil, uses Configure)
Expand Down Expand Up @@ -188,13 +212,34 @@ func Reconcile(server string, skipCertValidation bool) error {
} else if inst.Version != dep.Version {
// VERSION CHANGED: Download (if needed) and update
utils.Logger.Info("Updating dependency: %s (%s -> %s)", dep.Name, inst.Version, dep.Version)

// Call PreDownload hook if defined
var cleanup func()
if dep.PreDownload != nil {
var err error
cleanup, err = dep.PreDownload()
if err != nil {
errMsg := fmt.Errorf("failed to run PreDownload for %s: %v", dep.Name, err)
utils.Logger.ErrorF("%v", errMsg)
if dep.Critical {
criticalErrors = append(criticalErrors, errMsg)
}
continue
}
}

if dep.DownloadURL != nil {
if err := downloadDependency(dep, server, skipCertValidation); err != nil {
errMsg := fmt.Errorf("failed to download dependency update %s: %v", dep.Name, err)
utils.Logger.ErrorF("%v", errMsg)
if dep.Critical {
criticalErrors = append(criticalErrors, errMsg)
}
// Rollback: call cleanup if PreDownload succeeded
if cleanup != nil {
utils.Logger.Info("Rolling back PreDownload changes for %s", dep.Name)
cleanup()
}
continue
}
}
Expand All @@ -210,6 +255,11 @@ func Reconcile(server string, skipCertValidation bool) error {
if dep.Critical {
criticalErrors = append(criticalErrors, errMsg)
}
// Rollback: call cleanup if PreDownload succeeded
if cleanup != nil {
utils.Logger.Info("Rolling back PreDownload changes for %s", dep.Name)
cleanup()
}
continue
}
}
Expand Down
30 changes: 24 additions & 6 deletions agent/dependency/deps_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/utmstack/UTMStack/agent/config"
"github.com/utmstack/UTMStack/shared/exec"
"github.com/utmstack/UTMStack/shared/fs"
"github.com/utmstack/UTMStack/shared/svc"
)

const macosCollectorBinary = "utmstack-collector-mac"
Expand All @@ -20,15 +21,16 @@ func GetDependencies() []Dependency {

return []Dependency{
{
Name: "updater",
Version: UpdaterVersion,
BinaryPath: filepath.Join(basePath, UpdaterFile("")),
Name: "updater",
Version: getUpdaterVersion(),
BinaryPath: filepath.Join(basePath, UpdaterFile("")),
DownloadURL: func(server string) string {
return fmt.Sprintf(config.DependUrl, server, config.DependenciesPort, UpdaterFile(""))
},
Critical: false,
Configure: configureUpdater,
Uninstall: uninstallUpdater,
Critical: false,
PreDownload: preDownloadUpdater,
Configure: configureUpdater,
Uninstall: uninstallUpdater,
},
{
Name: "macos-collector",
Expand Down Expand Up @@ -66,3 +68,19 @@ func uninstallUpdater() error {
}
return exec.Run(updaterPath, fs.GetExecutablePath(), "uninstall")
}

func preDownloadUpdater() (func(), error) {
// Stop the updater service before download
if err := svc.Stop(config.SERVICE_UPDATER_NAME); err != nil {
// Service might not be running or installed yet - that's OK
// Return cleanup function anyway (safe to start)
return func() {
_ = svc.Start(config.SERVICE_UPDATER_NAME)
}, nil
}

// Return cleanup function that restarts the service
return func() {
_ = svc.Start(config.SERVICE_UPDATER_NAME)
}, nil
}
30 changes: 24 additions & 6 deletions agent/dependency/deps_linux_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/utmstack/UTMStack/agent/config"
"github.com/utmstack/UTMStack/shared/exec"
"github.com/utmstack/UTMStack/shared/fs"
"github.com/utmstack/UTMStack/shared/svc"
)

// GetDependencies returns the list of dependencies for Linux amd64.
Expand All @@ -19,15 +20,16 @@ func GetDependencies() []Dependency {

return []Dependency{
{
Name: "updater",
Version: UpdaterVersion,
BinaryPath: filepath.Join(basePath, UpdaterFile("")),
Name: "updater",
Version: getUpdaterVersion(),
BinaryPath: filepath.Join(basePath, UpdaterFile("")),
DownloadURL: func(server string) string {
return fmt.Sprintf(config.DependUrl, server, config.DependenciesPort, UpdaterFile(""))
},
Critical: false,
Configure: configureUpdater,
Uninstall: uninstallUpdater,
Critical: false,
PreDownload: preDownloadUpdater,
Configure: configureUpdater,
Uninstall: uninstallUpdater,
},

// New beats dependency - only for uninstalling existing filebeat/winlogbeat
Expand Down Expand Up @@ -75,3 +77,19 @@ func uninstallUpdater() error {
func uninstallBeats() error {
return collector.UninstallAll()
}

func preDownloadUpdater() (func(), error) {
// Stop the updater service before download
if err := svc.Stop(config.SERVICE_UPDATER_NAME); err != nil {
// Service might not be running or installed yet - that's OK
// Return cleanup function anyway (safe to start)
return func() {
_ = svc.Start(config.SERVICE_UPDATER_NAME)
}, nil
}

// Return cleanup function that restarts the service
return func() {
_ = svc.Start(config.SERVICE_UPDATER_NAME)
}, nil
}
30 changes: 24 additions & 6 deletions agent/dependency/deps_linux_arm64.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/utmstack/UTMStack/agent/config"
"github.com/utmstack/UTMStack/shared/exec"
"github.com/utmstack/UTMStack/shared/fs"
"github.com/utmstack/UTMStack/shared/svc"
)

// GetDependencies returns the list of dependencies for Linux arm64.
Expand All @@ -19,15 +20,16 @@ func GetDependencies() []Dependency {

return []Dependency{
{
Name: "updater",
Version: UpdaterVersion,
BinaryPath: filepath.Join(basePath, UpdaterFile("")),
Name: "updater",
Version: getUpdaterVersion(),
BinaryPath: filepath.Join(basePath, UpdaterFile("")),
DownloadURL: func(server string) string {
return fmt.Sprintf(config.DependUrl, server, config.DependenciesPort, UpdaterFile(""))
},
Critical: false,
Configure: configureUpdater,
Uninstall: uninstallUpdater,
Critical: false,
PreDownload: preDownloadUpdater,
Configure: configureUpdater,
Uninstall: uninstallUpdater,
},

// Auditd dependency - auto-configures Linux audit daemon
Expand Down Expand Up @@ -61,3 +63,19 @@ func uninstallUpdater() error {
}
return exec.Run(updaterPath, fs.GetExecutablePath(), "uninstall")
}

func preDownloadUpdater() (func(), error) {
// Stop the updater service before download
if err := svc.Stop(config.SERVICE_UPDATER_NAME); err != nil {
// Service might not be running or installed yet - that's OK
// Return cleanup function anyway (safe to start)
return func() {
_ = svc.Start(config.SERVICE_UPDATER_NAME)
}, nil
}

// Return cleanup function that restarts the service
return func() {
_ = svc.Start(config.SERVICE_UPDATER_NAME)
}, nil
}
30 changes: 24 additions & 6 deletions agent/dependency/deps_windows_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/utmstack/UTMStack/agent/config"
"github.com/utmstack/UTMStack/shared/exec"
"github.com/utmstack/UTMStack/shared/fs"
"github.com/utmstack/UTMStack/shared/svc"
)

// GetDependencies returns the list of dependencies for Windows amd64.
Expand All @@ -19,15 +20,16 @@ func GetDependencies() []Dependency {

return []Dependency{
{
Name: "updater",
Version: UpdaterVersion,
BinaryPath: filepath.Join(basePath, UpdaterFile("")),
Name: "updater",
Version: getUpdaterVersion(),
BinaryPath: filepath.Join(basePath, UpdaterFile("")),
DownloadURL: func(server string) string {
return fmt.Sprintf(config.DependUrl, server, config.DependenciesPort, UpdaterFile(""))
},
Critical: false, // Agent can run without updater
Configure: configureUpdater,
Uninstall: uninstallUpdater,
Critical: false, // Agent can run without updater
PreDownload: preDownloadUpdater,
Configure: configureUpdater,
Uninstall: uninstallUpdater,
},

// New beats dependency - only for uninstalling existing filebeat/winlogbeat
Expand Down Expand Up @@ -57,3 +59,19 @@ func uninstallUpdater() error {
func uninstallBeats() error {
return collector.UninstallAll()
}

func preDownloadUpdater() (func(), error) {
// Stop the updater service before download
if err := svc.Stop(config.SERVICE_UPDATER_NAME); err != nil {
// Service might not be running or installed yet - that's OK
// Return cleanup function anyway (safe to start)
return func() {
_ = svc.Start(config.SERVICE_UPDATER_NAME)
}, nil
}

// Return cleanup function that restarts the service
return func() {
_ = svc.Start(config.SERVICE_UPDATER_NAME)
}, nil
}
30 changes: 24 additions & 6 deletions agent/dependency/deps_windows_arm64.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/utmstack/UTMStack/agent/config"
"github.com/utmstack/UTMStack/shared/exec"
"github.com/utmstack/UTMStack/shared/fs"
"github.com/utmstack/UTMStack/shared/svc"
)

// GetDependencies returns the list of dependencies for Windows arm64.
Expand All @@ -19,15 +20,16 @@ func GetDependencies() []Dependency {

return []Dependency{
{
Name: "updater",
Version: UpdaterVersion,
BinaryPath: filepath.Join(basePath, UpdaterFile("")),
Name: "updater",
Version: getUpdaterVersion(),
BinaryPath: filepath.Join(basePath, UpdaterFile("")),
DownloadURL: func(server string) string {
return fmt.Sprintf(config.DependUrl, server, config.DependenciesPort, UpdaterFile(""))
},
Critical: false,
Configure: configureUpdater,
Uninstall: uninstallUpdater,
Critical: false,
PreDownload: preDownloadUpdater,
Configure: configureUpdater,
Uninstall: uninstallUpdater,
},
}
}
Expand All @@ -44,3 +46,19 @@ func uninstallUpdater() error {
}
return exec.Run(updaterPath, fs.GetExecutablePath(), "uninstall")
}

func preDownloadUpdater() (func(), error) {
// Stop the updater service before download
if err := svc.Stop(config.SERVICE_UPDATER_NAME); err != nil {
// Service might not be running or installed yet - that's OK
// Return cleanup function anyway (safe to start)
return func() {
_ = svc.Start(config.SERVICE_UPDATER_NAME)
}, nil
}

// Return cleanup function that restarts the service
return func() {
_ = svc.Start(config.SERVICE_UPDATER_NAME)
}, nil
}
Loading