Skip to content

Commit 945c835

Browse files
mjabascal10ylladaosmonteroKbayero
authored
Bugfix/10.8.0/macos (#1171)
* feat: Improve installer to add RHELD support * fix: Update windows ARM collector * wip * feat: Add SELinux configuration for RedHat systems * fix interface agent problem * add bad gateway page * complete macos agent * feat(module-integration): add SOC AI model selection field * feat(module-integration): add SOC AI model selection field * feat(module-integration): add SOC AI model selection field * feat(module-integration): add SOC AI model selection field * feat(module-integration): update MacOS guide * wip * complete macos agent * feat(module-integration): add SOC AI model selection field * fix custom bad gateway page creation * not contains operator grammar(Jose Angel) * fix(agent-details): show correct agent version and format OS version * feat(module-integration): add SOC AI model selection field * Update and publish SOC-AI models * Update UTMStack Version * feat(module-integration): add SOC AI model selection field --------- Co-authored-by: Yadian Llada Lopez <yadian.llada@gmail.com> Co-authored-by: Osmany Montero <osmontero@icloud.com> Co-authored-by: Yorjander Hernandez Vergara <yorjaKbayero@gmail.com>
1 parent 43d4be1 commit 945c835

File tree

35 files changed

+1775
-28
lines changed

35 files changed

+1775
-28
lines changed

.github/workflows/principal-multi-env.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
strategy:
8989
fail-fast: false
9090
matrix:
91-
service: ['aws', 'backend', 'correlation', 'frontend', 'bitdefender', 'mutate', 'office365', 'log-auth-proxy', 'sophos', 'user-auditor', 'web-pdf']
91+
service: ['aws', 'backend', 'correlation', 'frontend', 'bitdefender', 'mutate', 'office365', 'log-auth-proxy', 'soc-ai', 'sophos', 'user-auditor', 'web-pdf']
9292
uses: ./.github/workflows/used-runner.yml
9393
with:
9494
microservice: ${{ matrix.service }}

.github/workflows/used-runner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
id: get_tech
2323
run: |
2424
folder_changed="${{inputs.microservice}}"
25-
if [[ "$folder_changed" == "aws" || "$folder_changed" == "correlation" || "$folder_changed" == "bitdefender" || "$folder_changed" == "office365" || "$folder_changed" == "sophos" || "$folder_changed" == "log-auth-proxy" ]]; then
25+
if [[ "$folder_changed" == "aws" || "$folder_changed" == "correlation" || "$folder_changed" == "bitdefender" || "$folder_changed" == "office365" || "$folder_changed" == "soc-ai" || "$folder_changed" == "sophos" || "$folder_changed" == "log-auth-proxy" ]]; then
2626
tech="golang"
2727
elif [[ "$folder_changed" == "backend" ]]; then
2828
tech="java-11"

CHANGELOG.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# UTMStack 10.7.3 Release Notes
2-
-- Implemented backend support for filtering compliance reports based on active integrations, optimizing query performance and data retrieval.
3-
-- Introduced new compliance reports aligned with the PCI DSS standard to expand auditing capabilities.
4-
-- Added support for creating and updating tag-based rules with dynamic conditions.
5-
6-
### Bug Fixes
7-
-- Improved exception handling in `automaticReview` to prevent the process from stopping due to errors, ensuring the system continues evaluating alerts even if a specific rule fails.
8-
-- Improved operator selection for more accurate and consistent filtering.
1+
# UTMStack 10.8.0 Release Notes
2+
- Updated Soc-AI models and released the code as open source.
3+
- Added the ability for users to choose which model to use with Soc-AI.
4+
- Enhanced the prompt sent to OpenAI by including additional contextual details.
5+
- Added support for RedHat; UTMStack can now be installed on both Ubuntu and RedHat.
6+
- Improved log delivery from ARM-based agents on Windows, now sending native system logs.
7+
- Added support for macOS ARM64; agents can now be installed on that platform.
8+
- Improved agent information displayed in the Sources panel, providing more accurate OS details and agent versions.

backend/src/main/resources/config/liquibase/changelog/20250418001_add_options_module_group_config.xml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,22 @@
2727
'select',
2828
true,
2929
'[
30-
{ "value": "gpt-4", "label": "GPT-4 (Default)" },
31-
{ "value": "gpt-4-0613", "label": "GPT-4 (0613)" },
32-
{ "value": "gpt-4-32k", "label": "GPT-4 32K" },
33-
{ "value": "gpt-4-32k-0613", "label": "GPT-4 32K (0613)" },
34-
{ "value": "gpt-4-turbo", "label": "GPT-4 Turbo" },
35-
{ "value": "gpt-4o", "label": "GPT-4 Omni" },
36-
{ "value": "gpt-4o-mini", "label": "GPT-4 Omni Mini" },
37-
{ "value": "gpt-4.1", "label": "GPT-4.1" },
38-
{ "value": "gpt-4.1-mini", "label": "GPT-4.1 Mini" },
39-
{ "value": "gpt-4.1-nano", "label": "GPT-4.1 Nano" },
40-
{ "value": "gpt-3.5-turbo", "label": "GPT-3.5 Turbo" },
41-
{ "value": "gpt-3.5-turbo-0613", "label": "GPT-3.5 Turbo (0613)" },
42-
{ "value": "gpt-3.5-turbo-16k", "label": "GPT-3.5 Turbo 16K" },
43-
{ "value": "gpt-3.5-turbo-16k-0613", "label": "GPT-3.5 Turbo 16K (0613)" }
30+
{ "value": "gpt-4.1", "label": "GPT-4.1 Model" },
31+
{ "value": "gpt-4.1-mini", "label": "GPT-4.1 Mini Model" },
32+
{ "value": "gpt-4.1-nano", "label": "GPT-4.1 Nano Model" },
33+
{ "value": "gpt-4o", "label": "GPT-4 Omni Model" },
34+
{ "value": "gpt-4o-mini", "label": "GPT-4 Omni Mini Model" },
35+
{ "value": "gpt-4-turbo", "label": "GPT-4 Turbo Model" },
36+
{ "value": "gpt-4-0614", "label": "GPT-4 Model (0614)" },
37+
{ "value": "gpt-4-0125-preview", "label": "GPT-4 Model (0125 Preview)" },
38+
{ "value": "gpt-3.5-turbo", "label": "GPT-3.5 Turbo Model" },
39+
{ "value": "gpt-3.5-turbo-instruct", "label": "GPT-3.5 Turbo Instruct Model" },
40+
{ "value": "gpt-3.5-turbo-1106", "label": "GPT-3.5 Turbo Model (1106)" },
41+
{ "value": "o1", "label": "O1 Model" },
42+
{ "value": "o1-pro", "label": "O1 Pro Model" },
43+
{ "value": "o3", "label": "O3 Model" },
44+
{ "value": "o3-mini", "label": "O3 Mini Model" },
45+
{ "value": "o4-mini", "label": "O4 Mini Model" }
4446
]'
4547
);
4648

correlation/cache/operators.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func compare(operator, val1, val2 string) bool {
8888
return !lowerEqual(val1, val2)
8989
case "contains":
9090
return contain(val1, val2)
91-
case "not contain":
91+
case "not contain", "not contains":
9292
return !contain(val1, val2)
9393
case "in":
9494
return in(val1, val2)

frontend/src/app/shared/components/utm/util/utm-agent-detail/utm-agent-detail.component.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,13 @@
5656
<app-assets-apply-note *ngIf="asset" [asset]="asset" class="ml-2"></app-assets-apply-note>
5757
</div>
5858
<div class="agent-details w-100 d-flex justify-content-start mb-2" *ngIf="agent.version">
59-
<span class="text-blue-800 font-weight-light has-minimum-width">OS Version:</span>&nbsp;
59+
<span class="text-blue-800 font-weight-light has-minimum-width">Agent Version:</span>&nbsp;
6060
{{agent.version}}
6161
</div>
62+
<div class="agent-details w-100 d-flex justify-content-start mb-2" *ngIf="agent.osMajorVersion && agent.osMinorVersion">
63+
<span class="text-blue-800 font-weight-light has-minimum-width">OS Version:</span>&nbsp;
64+
{{agent.osMajorVersion + '.' + agent.osMinorVersion}}
65+
</div>
6266
<div class="agent-details w-100 d-flex justify-content-start mb-2" *ngIf="agent.lastSeen">
6367
<span class="text-blue-800 font-weight-light has-minimum-width">Last seen:</span>&nbsp;
6468
{{agent.lastSeen}}

installer/types/compose.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ func (c *Compose) Populate(conf *Config, stack *StackConfig) *Compose {
507507

508508
socAIMem := stack.ServiceResources["socai"].AssignedMemory
509509
c.Services["socai"] = Service{
510-
Image: utils.Str("ghcr.io/utmstack/soc-ai/soc-ai:" + conf.Branch),
510+
Image: utils.Str("ghcr.io/utmstack/utmstack/soc-ai:" + conf.Branch),
511511
DependsOn: []string{
512512
"node1",
513513
"backend",

installer/utils/os.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ func CreatePathIfNotExist(path string) error {
4949
}
5050

5151
func WriteToFile(fileName string, body string) error {
52+
filePath := filepath.Dir(fileName)
53+
if err := CreatePathIfNotExist(filePath); err != nil {
54+
return fmt.Errorf("error creating directory for file %s: %v", fileName, err)
55+
}
56+
5257
file, err := os.OpenFile(fileName, os.O_CREATE|os.O_RDWR|os.O_TRUNC, os.ModePerm)
5358

5459
if err != nil {

soc-ai/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM ubuntu:24.04
2+
3+
COPY soc-ai /app/
4+
5+
RUN apt-get update && \
6+
apt-get install -y ca-certificates jq wget && \
7+
update-ca-certificates && \
8+
apt-get clean && \
9+
rm -rf /var/lib/apt/lists/*
10+
11+
EXPOSE 8080
12+
13+
CMD ["/app/soc-ai"]

soc-ai/configurations/config.go

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
package configurations
2+
3+
import (
4+
"time"
5+
6+
UTMStackConfigurationClient "github.com/utmstack/config-client-go"
7+
"github.com/utmstack/config-client-go/enum"
8+
"github.com/utmstack/soc-ai/utils"
9+
)
10+
11+
var (
12+
gptConfig GPTConfig
13+
)
14+
15+
type GPTConfig struct {
16+
APIKey string
17+
ChangeAlertStatus bool
18+
AutomaticIncidentCreation bool
19+
Model string
20+
ModuleActive bool
21+
}
22+
23+
func GetGPTConfig() *GPTConfig {
24+
return &gptConfig
25+
}
26+
27+
func UpdateGPTConfigurations() {
28+
intKey := GetInternalKey()
29+
panelServ := GetPanelServiceName()
30+
client := UTMStackConfigurationClient.NewUTMClient(intKey, panelServ)
31+
32+
for {
33+
if err := utils.ConnectionChecker(GPT_API_ENDPOINT); err != nil {
34+
utils.Logger.ErrorF("Failed to establish internet connection: %v", err)
35+
}
36+
37+
tempModuleConfig, err := client.GetUTMConfig(enum.SOCAI)
38+
if err != nil && err.Error() != "" && err.Error() != " " {
39+
utils.Logger.LogF(100, "Error while getting GPT configuration: %v", err)
40+
time.Sleep(TIME_FOR_GET_CONFIG * time.Second)
41+
continue
42+
}
43+
44+
gptConfig.ModuleActive = tempModuleConfig.ModuleActive
45+
46+
if gptConfig.ModuleActive && tempModuleConfig != nil && len(tempModuleConfig.ConfigurationGroups) > 0 {
47+
for _, config := range tempModuleConfig.ConfigurationGroups[0].Configurations {
48+
switch config.ConfKey {
49+
case "utmstack.socai.key":
50+
if config.ConfValue != "" && config.ConfValue != " " {
51+
gptConfig.APIKey = config.ConfValue
52+
}
53+
case "utmstack.socai.incidentCreation":
54+
if config.ConfValue != "" && config.ConfValue != " " {
55+
gptConfig.AutomaticIncidentCreation = config.ConfValue == "true"
56+
}
57+
case "utmstack.socai.changeAlertStatus":
58+
if config.ConfValue != "" && config.ConfValue != " " {
59+
gptConfig.ChangeAlertStatus = config.ConfValue == "true"
60+
}
61+
case "utmstack.socai.model":
62+
if config.ConfValue != "" && config.ConfValue != " " {
63+
gptConfig.Model = config.ConfValue
64+
}
65+
}
66+
}
67+
}
68+
69+
time.Sleep(TIME_FOR_GET_CONFIG * time.Second)
70+
}
71+
}

0 commit comments

Comments
 (0)