diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d2381eb65..9bef8c11c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,15 +6,11 @@ version: 2 updates: - package-ecosystem: "gomod" # See documentation for possible values - directory: "/agent/installer" # Location of package manifests + directory: "/agent" # Location of package manifests schedule: interval: "weekly" - package-ecosystem: "gomod" # See documentation for possible values - directory: "/agent/self" # Location of package manifests - schedule: - interval: "weekly" - - package-ecosystem: "gomod" # See documentation for possible values - directory: "/agent/service" # Location of package manifests + directory: "/agent/updater" # Location of package manifests schedule: interval: "weekly" - package-ecosystem: "gomod" # See documentation for possible values @@ -52,6 +48,10 @@ updates: directory: "/plugins/config" # Location of package manifests schedule: interval: "weekly" + - package-ecosystem: "gomod" # See documentation for possible values + directory: "/plugins/crowdStrike" # Location of package manifests + schedule: + interval: "weekly" - package-ecosystem: "gomod" # See documentation for possible values directory: "/plugins/events" # Location of package manifests schedule: @@ -68,10 +68,18 @@ updates: directory: "/plugins/inputs" # Location of package manifests schedule: interval: "weekly" + - package-ecosystem: "gomod" # See documentation for possible values + directory: "/plugins/modules-config" # Location of package manifests + schedule: + interval: "weekly" - package-ecosystem: "gomod" # See documentation for possible values directory: "/plugins/o365" # Location of package manifests schedule: interval: "weekly" + - package-ecosystem: "gomod" # See documentation for possible values + directory: "/plugins/soc-ai" # Location of package manifests + schedule: + interval: "weekly" - package-ecosystem: "gomod" # See documentation for possible values directory: "/plugins/sophos" # Location of package manifests schedule: @@ -80,4 +88,12 @@ updates: directory: "/plugins/stats" # Location of package manifests schedule: interval: "weekly" + - package-ecosystem: "gomod" # See documentation for possible values + directory: "/plugins/threat-intelligence" # Location of package manifests + schedule: + interval: "weekly" + - package-ecosystem: "gomod" # See documentation for possible values + directory: "/utmstack-collector" # Location of package manifests + schedule: + interval: "weekly" \ No newline at end of file diff --git a/.github/scripts/golang-updater/go.mod b/.github/scripts/golang-updater/go.mod new file mode 100644 index 000000000..6ceba9454 --- /dev/null +++ b/.github/scripts/golang-updater/go.mod @@ -0,0 +1,3 @@ +module golang-updater + +go 1.24.2 diff --git a/.github/scripts/golang-updater/golang-updater b/.github/scripts/golang-updater/golang-updater new file mode 100755 index 000000000..3b629bdc0 Binary files /dev/null and b/.github/scripts/golang-updater/golang-updater differ diff --git a/.github/scripts/golang-updater/main.go b/.github/scripts/golang-updater/main.go new file mode 100644 index 000000000..94162fa1e --- /dev/null +++ b/.github/scripts/golang-updater/main.go @@ -0,0 +1,252 @@ +package main + +import ( + "bufio" + "bytes" + "encoding/json" + "fmt" + "os" + "os/exec" + "path/filepath" + "strings" +) + +type Module struct { + Path string + Version string + Update *ModuleUpdate +} + +type ModuleUpdate struct { + Version string +} + +func main() { + if len(os.Args) < 2 { + printUsage() + os.Exit(1) + } + + var checkOnly bool + var discover bool + var targetPath string + + for _, arg := range os.Args[1:] { + switch arg { + case "--check": + checkOnly = true + case "--update": + checkOnly = false + case "--discover": + discover = true + case "--help", "-h": + printUsage() + os.Exit(0) + default: + if !strings.HasPrefix(arg, "--") { + targetPath = arg + } + } + } + + // Validate arguments + if !discover && targetPath == "" { + fmt.Fprintf(os.Stderr, "Error: must specify a path or use --discover\n") + printUsage() + os.Exit(1) + } + + if discover && targetPath != "" { + fmt.Fprintf(os.Stderr, "Error: cannot use both --discover and a specific path\n") + printUsage() + os.Exit(1) + } + + var projects []string + var err error + + if discover { + projects, err = discoverProjects(".") + if err != nil { + fmt.Fprintf(os.Stderr, "Error discovering projects: %v\n", err) + os.Exit(1) + } + if len(projects) == 0 { + fmt.Println("No Go projects found.") + os.Exit(0) + } + fmt.Printf("๐Ÿ” Discovered %d Go projects\n\n", len(projects)) + } else { + // Verify the path exists and has a go.mod + goModPath := filepath.Join(targetPath, "go.mod") + if _, err := os.Stat(goModPath); os.IsNotExist(err) { + fmt.Fprintf(os.Stderr, "Error: no go.mod found in %s\n", targetPath) + os.Exit(1) + } + projects = []string{targetPath} + } + + hasUpdates := false + allUpdates := make(map[string][]Module) + + for _, project := range projects { + updates, err := checkProject(project) + if err != nil { + fmt.Fprintf(os.Stderr, "Error checking %s: %v\n", project, err) + os.Exit(1) + } + if len(updates) > 0 { + hasUpdates = true + allUpdates[project] = updates + } + } + + if !hasUpdates { + fmt.Println("โœ… All dependencies are up to date.") + return + } + + // Print summary of updates needed + fmt.Println("๐Ÿ“ฆ Dependencies with updates available:") + for project, updates := range allUpdates { + fmt.Printf("\n ๐Ÿ“ %s:\n", project) + for _, mod := range updates { + fmt.Printf(" - %s: %s โ†’ %s\n", mod.Path, mod.Version, mod.Update.Version) + } + } + + if checkOnly { + fmt.Println("\nโŒ Please update dependencies before merging.") + os.Exit(1) + } + + // Update mode - apply updates + fmt.Println("\n๐Ÿ”„ Updating dependencies...") + for project, updates := range allUpdates { + fmt.Printf("\n ๐Ÿ“ %s:\n", project) + if err := updateProject(project, updates); err != nil { + fmt.Fprintf(os.Stderr, "Error updating %s: %v\n", project, err) + os.Exit(1) + } + } + + fmt.Println("\nโœ… All dependencies updated successfully.") +} + +func printUsage() { + fmt.Println(`Usage: golang-updater [--check|--update] [--discover|] + +Modes: + --check Check for outdated dependencies (exit 1 if found) + --update Update outdated dependencies (default) + +Target: + --discover Discover all Go projects from current directory + Path to a specific Go project + +Examples: + golang-updater --check ./installer + golang-updater --update ./installer + golang-updater --check --discover + golang-updater --update --discover`) +} + +func discoverProjects(root string) ([]string, error) { + var projects []string + + err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } + + // Skip hidden directories and common non-project directories + if info.IsDir() { + name := info.Name() + // Don't skip the root directory itself + if path != root && (strings.HasPrefix(name, ".") || name == "vendor" || name == "node_modules") { + return filepath.SkipDir + } + } + + if info.Name() == "go.mod" { + dir := filepath.Dir(path) + projects = append(projects, dir) + } + + return nil + }) + + return projects, err +} + +func checkProject(projectPath string) ([]Module, error) { + goModPath := filepath.Join(projectPath, "go.mod") + modFile, err := os.Open(goModPath) + if err != nil { + return nil, fmt.Errorf("error opening go.mod: %w", err) + } + defer modFile.Close() + + explicitModules := make(map[string]bool) + scanner := bufio.NewScanner(modFile) + for scanner.Scan() { + line := strings.TrimSpace(scanner.Text()) + if strings.HasPrefix(line, "require") || strings.HasPrefix(line, ")") { + continue + } + fields := strings.Fields(line) + if len(fields) >= 1 && !strings.HasPrefix(fields[0], "//") { + explicitModules[fields[0]] = true + } + } + if err := scanner.Err(); err != nil { + return nil, fmt.Errorf("error reading go.mod: %w", err) + } + + cmd := exec.Command("go", "list", "-u", "-m", "-json", "all") + cmd.Dir = projectPath + output, err := cmd.Output() + if err != nil { + return nil, fmt.Errorf("error executing go list: %w", err) + } + + decoder := json.NewDecoder(bytes.NewReader(output)) + var toUpdate []Module + + for decoder.More() { + var mod Module + if err := decoder.Decode(&mod); err != nil { + return nil, fmt.Errorf("error parsing JSON output: %w", err) + } + if mod.Update != nil && explicitModules[mod.Path] { + toUpdate = append(toUpdate, mod) + } + } + + return toUpdate, nil +} + +func updateProject(projectPath string, updates []Module) error { + for _, mod := range updates { + updateStr := fmt.Sprintf("%s@%s", mod.Path, mod.Update.Version) + fmt.Printf(" ๐Ÿ”„ Updating %s\n", updateStr) + cmd := exec.Command("go", "get", updateStr) + cmd.Dir = projectPath + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + if err := cmd.Run(); err != nil { + return fmt.Errorf("error updating %s: %w", updateStr, err) + } + } + + fmt.Printf(" ๐Ÿงน Running go mod tidy...\n") + cmd := exec.Command("go", "mod", "tidy") + cmd.Dir = projectPath + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + if err := cmd.Run(); err != nil { + return fmt.Errorf("error running go mod tidy: %w", err) + } + + return nil +} diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 1ad368ea0..f04f9ffa6 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -38,17 +38,15 @@ Automated CI/CD pipeline for v10 builds and deployments. - Production (from tags) ### 3. **v11-deployment-pipeline.yml** -Manual deployment pipeline for v11 with version control. +Automated CI/CD pipeline for v11 builds and deployments. -**Trigger:** Manual (`workflow_dispatch`) - -**Required Inputs:** -- `version_tag`: Version to deploy (e.g., `v11.0.0-dev.1` or `v11.1.0`) -- `event_processor_tag`: Event processor version (e.g., `1.0.0-beta`) +**Triggers:** +- Push to `release/v11**` branches โ†’ Deploys to **dev** environment +- Prerelease created โ†’ Deploys to **rc** environment **Version Formats:** -- **Dev:** `v11.x.x-dev.N` (e.g., `v11.0.0-dev.1`) -- **Production:** `v11.x.x` (e.g., `v11.1.0`) +- **Dev:** `v11.x.x-dev.N` (e.g., `v11.2.1-dev.1`) - Auto-incremented +- **RC:** `v11.x.x` (e.g., `v11.2.1`) - From prerelease tag --- @@ -89,46 +87,84 @@ Manual deployment pipeline for v11 with version control. ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” -โ”‚ Manual Workflow Dispatch โ”‚ -โ”‚ with version_tag input โ”‚ +โ”‚ Push to release/v11.x.x โ”‚ +โ”‚ branch โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ + โ”‚ + โ–ผ + Auto-increment version + (v11.x.x-dev.N) + โ”‚ + โ–ผ + Build & Deploy to DEV + โ”‚ + โ–ผ + Publish to CM Dev + โ”‚ + โ–ผ + Schedule to Dev Instances + + +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ Create Prerelease โ”‚ +โ”‚ (tag: v11.x.x) โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ - โ”œโ”€โ”€โ”€ v11.x.x-dev.N โ”€โ”€โ†’ DEV Environment - โ””โ”€โ”€โ”€ v11.x.x โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ PROD Environment + โ–ผ + Build & Deploy to RC + โ”‚ + โ–ผ + Generate Changelog (AI) + โ”‚ + โ–ผ + Build & Upload Installer + โ”‚ + โ–ผ + Publish to CM Prod + โ”‚ + โ–ผ + Schedule to Prod Instances ``` ### Jobs -1. **validations** - Validates user permissions and version format -2. **build_agent** - Builds and signs Windows/Linux agents -3. **build_utmstack_collector** - Builds UTMStack Collector -4. **build_agent_manager** - Builds agent-manager Docker image -5. **build_event_processor** - Builds event processor with plugins -6. **build_backend** - Builds backend microservice (Java 17) -7. **build_frontend** - Builds frontend microservice -8. **build_user_auditor** - Builds user-auditor microservice -9. **build_web_pdf** - Builds web-pdf microservice -10. **all_builds_complete** - Checkpoint for all builds -11. **publish_new_version** - Publishes version to Customer Manager -12. **schedule** - Schedules release to configured instances +1. **setup_deployment** - Determines environment and version based on trigger +2. **validations** - Validates user permissions (team membership) +3. **build_agent** - Builds and signs Windows/Linux agents +4. **build_utmstack_collector** - Builds UTMStack Collector +5. **build_agent_manager** - Builds agent-manager Docker image +6. **build_event_processor** - Builds event processor with plugins +7. **build_backend** - Builds backend microservice (Java 17) +8. **build_frontend** - Builds frontend microservice +9. **build_user_auditor** - Builds user-auditor microservice +10. **build_web_pdf** - Builds web-pdf microservice +11. **all_builds_complete** - Checkpoint for all builds +12. **generate_changelog** - Generates AI-powered changelog (RC only) +13. **build_installer_rc** - Builds and uploads installer (RC only) +14. **deploy_installer_dev** - Deploys installer (Dev only) +15. **publish_new_version** - Publishes version to Customer Manager +16. **schedule** - Schedules release to configured instances ### Permissions -- **Dev versions** (`v11.x.x-dev.N`): - - Must run from `release/` or `feature/` branches - - Requires: `administrators`, `integration-developers`, or `core-developers` team membership - -- **Production versions** (`v11.x.x`): - - Requires: `administrators` team membership only +- Requires: `integration-developers` or `core-developers` team membership ### Environment Detection -The pipeline automatically detects the environment based on version format: +The pipeline automatically detects the environment based on trigger: + +| Trigger | Environment | CM URL | Service Account | Schedule Instances Var | +|---------|-------------|--------|-----------------|------------------------| +| Push to `release/v11**` | dev | `https://cm.dev.utmstack.com` | `CM_SERVICE_ACCOUNT_DEV` | `SCHEDULE_INSTANCES_DEV` | +| Prerelease created | rc | `https://cm.utmstack.com` | `CM_SERVICE_ACCOUNT_PROD` | `SCHEDULE_INSTANCES_PROD` | -| Version Format | Environment | CM Auth Secret | CM URL | Schedule Instances Var | Schedule Token Secret | -|----------------|-------------|----------------|--------|------------------------|----------------------| -| `v11.x.x-dev.N` | dev | `CM_AUTH_DEV` | `https://cm.dev.utmstack.com` | `SCHEDULE_INSTANCES_DEV` | `CM_SCHEDULE_TOKEN_DEV` | -| `v11.x.x` | prod | `CM_AUTH` | `https://cm.utmstack.com` | `SCHEDULE_INSTANCES_PROD` | `CM_SCHEDULE_TOKEN_PROD` | +### Version Auto-Increment (Dev) + +For dev deployments, the version is automatically calculated: +1. Extracts base version from branch name (e.g., `release/v11.2.1` โ†’ `v11.2.1`) +2. Queries CM for latest version +3. If base versions match, increments dev number (e.g., `v11.2.1-dev.9` โ†’ `v11.2.1-dev.10`) +4. If base versions differ, starts fresh (e.g., `v11.2.1-dev.1`) --- @@ -167,25 +203,28 @@ The pipeline automatically detects the environment based on version format: | `SIGN_CERT` | v10, v11 | Code signing certificate path (var) | | `SIGN_KEY` | v10, v11 | Code signing key | | `SIGN_CONTAINER` | v10, v11 | Code signing container name | -| `CM_AUTH` | v11 | Customer Manager auth credentials (prod) | -| `CM_AUTH_DEV` | v11 | Customer Manager auth credentials (dev) | +| `CM_SERVICE_ACCOUNT_PROD` | v11 | Customer Manager service account credentials (prod/rc) - JSON format `{"id": "...", "key": "..."}` | +| `CM_SERVICE_ACCOUNT_DEV` | v11 | Customer Manager service account credentials (dev) - JSON format `{"id": "...", "key": "..."}` | | `CM_ENCRYPT_SALT` | installer | Encryption salt for installer | | `CM_SIGN_PUBLIC_KEY` | installer | Public key for installer verification | -| `CM_SCHEDULE_TOKEN_PROD` | v11 | Auth token for cm-version-publisher (prod) | -| `CM_SCHEDULE_TOKEN_DEV` | v11 | Auth token for cm-version-publisher (dev) | +| `OPENAI_API_KEY` | v11 | OpenAI API key for changelog generation | | `GITHUB_TOKEN` | All | Auto-provided by GitHub Actions | ### Variables | Variable Name | Used In | Description | Format | |---------------|---------|-------------|--------| -| `SCHEDULE_INSTANCES_PROD` | v11 | Instance IDs for prod scheduling | Comma-separated UUIDs | +| `SCHEDULE_INSTANCES_PROD` | v11 | Instance IDs for prod/rc scheduling | Comma-separated UUIDs | | `SCHEDULE_INSTANCES_DEV` | v11 | Instance IDs for dev scheduling | Comma-separated UUIDs | +| `TW_EVENT_PROCESSOR_VERSION_PROD` | v11 | ThreatWinds Event Processor version (prod/rc) | Semver (e.g., `1.0.0`) | +| `TW_EVENT_PROCESSOR_VERSION_DEV` | v11 | ThreatWinds Event Processor version (dev) | Semver (e.g., `1.0.0-beta`) | **Example Variable Values:** ``` SCHEDULE_INSTANCES_PROD=uuid1,uuid2,uuid3 SCHEDULE_INSTANCES_DEV=uuid-dev1 +TW_EVENT_PROCESSOR_VERSION_PROD=1.0.0 +TW_EVENT_PROCESSOR_VERSION_DEV=1.0.0-beta ``` --- @@ -219,22 +258,28 @@ git push origin v10.5.0 ### V11 Deployment **Dev Environment:** -1. Navigate to Actions tab -2. Select "v11 - Build & Deploy Pipeline" -3. Click "Run workflow" -4. Fill in: - - **version_tag:** `v11.0.0-dev.1` - - **event_processor_tag:** `1.0.0-beta` -5. Click "Run workflow" +```bash +git checkout release/v11.2.1 +# Make your changes +git add . +git commit -m "Your changes" +git push origin release/v11.2.1 +# Automatically builds and deploys to dev +# Version is auto-incremented (e.g., v11.2.1-dev.1, v11.2.1-dev.2, ...) +``` -**Production Release:** -1. Navigate to Actions tab -2. Select "v11 - Build & Deploy Pipeline" -3. Click "Run workflow" -4. Fill in: - - **version_tag:** `v11.1.0` - - **event_processor_tag:** `1.0.0` -5. Click "Run workflow" +**RC Release:** +1. Navigate to GitHub Releases +2. Click "Draft a new release" +3. Create a new tag (e.g., `v11.2.1`) +4. Select "Set as a pre-release" +5. Click "Publish release" +6. Pipeline automatically: + - Builds all microservices + - Generates AI-powered changelog + - Builds and uploads installer + - Publishes version to CM + - Schedules updates to RC instances --- @@ -252,10 +297,11 @@ The following reusable workflows are called by the main pipelines: ## ๐Ÿ“ Notes - All Docker images are pushed to `ghcr.io/utmstack/utmstack/*` -- V11 uses `-community` suffix for all image tags - Agent signing requires `utmstack-signer` runner - Artifacts (agents, collector) have 1-day retention - Failed deployments will stop the pipeline and report errors +- Dev versions follow the format `v11.x.x-dev.N` (auto-incremented) +- RC versions use the prerelease tag directly (e.g., `v11.2.1`) --- @@ -263,17 +309,21 @@ The following reusable workflows are called by the main pipelines: **Permission Denied:** - Verify you're a member of the required team -- For v11 prod: Must be in `administrators` team -- For v11 dev: Can be in `administrators`, `integration-developers`, or `core-developers` +- For v11: Must be in `integration-developers` or `core-developers` team **Build Failures:** - Check that all required secrets are configured - Verify runner availability (especially `utmstack-signer` for agent builds) - Review build logs for specific errors -**Version Format Errors:** -- Dev: Must match `v11.x.x-dev.N` (e.g., `v11.0.0-dev.1`) -- Prod: Must match `v11.x.x` (e.g., `v11.1.0`) +**Version Not Incrementing:** +- Check that the CM API is accessible +- Verify `CM_SERVICE_ACCOUNT_DEV` or `CM_SERVICE_ACCOUNT_PROD` secrets are correctly configured +- Ensure the branch name follows the format `release/v11.x.x` + +**Changelog Not Generated:** +- Verify `OPENAI_API_KEY` secret is configured +- Only applies to RC releases (prereleases) --- diff --git a/.github/workflows/generate-changelog.yml b/.github/workflows/generate-changelog.yml new file mode 100644 index 000000000..18322318e --- /dev/null +++ b/.github/workflows/generate-changelog.yml @@ -0,0 +1,206 @@ +name: Generate AI Changelog + +on: + workflow_call: + inputs: + current_tag: + description: 'Current release tag (e.g., v11.2.0)' + required: true + type: string + previous_tag: + description: 'Previous tag to compare against (optional, auto-detected if not provided)' + required: false + type: string + default: '' + product_name: + description: 'Product name for the changelog' + required: false + type: string + default: 'UTMStack' + product_description: + description: 'Product description for context' + required: false + type: string + default: 'Unified Threat Management and SIEM Platform' + secrets: + OPENAI_API_KEY: + required: true + outputs: + changelog: + description: 'Generated changelog content' + value: ${{ jobs.generate-changelog.outputs.changelog }} + previous_tag: + description: 'The previous tag used for comparison' + value: ${{ jobs.generate-changelog.outputs.previous_tag }} + +jobs: + generate-changelog: + name: Generate AI Changelog + runs-on: ubuntu-latest + outputs: + changelog: ${{ steps.generate-changelog.outputs.changelog }} + previous_tag: ${{ steps.get-tags.outputs.previous_tag }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Get previous tag + id: get-tags + run: | + CURRENT_TAG="${{ inputs.current_tag }}" + echo "Current release tag: $CURRENT_TAG" + + # Use provided previous_tag or auto-detect + if [ -n "${{ inputs.previous_tag }}" ]; then + PREVIOUS_TAG="${{ inputs.previous_tag }}" + echo "Using provided previous tag: $PREVIOUS_TAG" + else + # Get all tags sorted by version (newest first) + ALL_TAGS=$(git tag --sort=-v:refname) + FOUND_CURRENT=false + PREVIOUS_TAG="" + + for tag in $ALL_TAGS; do + if [ "$FOUND_CURRENT" = true ]; then + PREVIOUS_TAG="$tag" + break + fi + if [ "$tag" = "$CURRENT_TAG" ]; then + FOUND_CURRENT=true + fi + done + + if [ -z "$PREVIOUS_TAG" ]; then + # No previous tag found, get first commit + PREVIOUS_TAG=$(git rev-list --max-parents=0 HEAD | head -1) + echo "No previous tag found, using first commit: $PREVIOUS_TAG" + fi + fi + + echo "Previous tag/commit: $PREVIOUS_TAG" + echo "current_tag=$CURRENT_TAG" >> $GITHUB_OUTPUT + echo "previous_tag=$PREVIOUS_TAG" >> $GITHUB_OUTPUT + + - name: Get commits between tags + id: get-commits + run: | + CURRENT_TAG="${{ steps.get-tags.outputs.current_tag }}" + PREVIOUS_TAG="${{ steps.get-tags.outputs.previous_tag }}" + + echo "Getting commits between $PREVIOUS_TAG and $CURRENT_TAG" + + # Get commit messages with hash, author, and message + COMMITS=$(git log ${PREVIOUS_TAG}..${CURRENT_TAG} --pretty=format:"- %h %s (%an)" --no-merges) + + # Count commits + COMMIT_COUNT=$(git rev-list --count ${PREVIOUS_TAG}..${CURRENT_TAG} --no-merges) + + echo "Found $COMMIT_COUNT commits" + + # Save commits to file (to handle multiline) + echo "$COMMITS" > /tmp/commits.txt + + # Also get changed files summary + CHANGED_FILES=$(git diff --stat ${PREVIOUS_TAG}..${CURRENT_TAG} | tail -1) + echo "changed_files=$CHANGED_FILES" >> $GITHUB_OUTPUT + echo "commit_count=$COMMIT_COUNT" >> $GITHUB_OUTPUT + + - name: Generate changelog with OpenAI + id: generate-changelog + env: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + PRODUCT_NAME: ${{ inputs.product_name }} + PRODUCT_DESCRIPTION: ${{ inputs.product_description }} + run: | + COMMITS=$(cat /tmp/commits.txt) + CURRENT_TAG="${{ steps.get-tags.outputs.current_tag }}" + PREVIOUS_TAG="${{ steps.get-tags.outputs.previous_tag }}" + COMMIT_COUNT="${{ steps.get-commits.outputs.commit_count }}" + CHANGED_FILES="${{ steps.get-commits.outputs.changed_files }}" + + # Create the prompt + PROMPT="You are a product marketing writer creating release notes for end users of a software product. + + Product: $PRODUCT_NAME - $PRODUCT_DESCRIPTION + Release: $CURRENT_TAG + + Here are the commit messages from this release: + $COMMITS + + Create user-friendly release notes in markdown format. This is for NON-TECHNICAL end users who want to know what's new and improved in the product. + + IMPORTANT RULES: + 1. ONLY include changes that DIRECTLY AFFECT END USERS - things they can see, use, or benefit from + 2. COMPLETELY IGNORE internal/technical changes like: + - CI/CD, GitHub Actions, deployment pipelines + - Code refactoring, component restructuring + - Database migrations, backend infrastructure + - Internal API changes, gRPC, service communication + - Developer tooling, linting, formatting + - README updates, internal documentation + 3. Write in simple, non-technical language + 4. Focus on BENEFITS to the user, not implementation details + 5. Group into these categories ONLY (skip empty categories): + - **What's New** - New features users can now use + - **Improved** - Enhancements to existing features + - **Fixed** - Bugs that were affecting users + 6. Start with a brief 1-2 sentence summary of the release highlights + 7. Use bullet points, be concise (one line per item) + 8. Do NOT wrap output in markdown code blocks + 9. Do NOT include commit hashes or author names + 10. If most commits are internal/technical, just summarize with 'Minor improvements and bug fixes' + + Write the release notes directly in markdown format, ready to be used as-is." + + # Call OpenAI API + RESPONSE=$(curl -s https://api.openai.com/v1/chat/completions \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $OPENAI_API_KEY" \ + -d "$(jq -n \ + --arg prompt "$PROMPT" \ + '{ + model: "gpt-4o-mini", + messages: [ + {role: "system", content: "You are a technical writer specializing in software changelogs."}, + {role: "user", content: $prompt} + ], + temperature: 0.3, + max_tokens: 2000 + }')") + + # Extract the changelog from response + CHANGELOG=$(echo "$RESPONSE" | jq -r '.choices[0].message.content // empty') + + if [ -z "$CHANGELOG" ]; then + echo "Error: Failed to generate changelog" + echo "Response: $RESPONSE" + # Fallback to simple commit list + CHANGELOG="## What's Changed + + $COMMITS + + **Full Changelog**: https://github.com/${{ github.repository }}/compare/${PREVIOUS_TAG}...${CURRENT_TAG}" + fi + + # Add comparison link at the end + CHANGELOG="${CHANGELOG} + + --- + **Full Changelog**: https://github.com/${{ github.repository }}/compare/${PREVIOUS_TAG}...${CURRENT_TAG}" + + # Save changelog to file + echo "$CHANGELOG" > /tmp/changelog.md + + # Output changelog using multiline format + echo "changelog<> $GITHUB_OUTPUT + cat /tmp/changelog.md >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + + - name: Output changelog preview + run: | + echo "## Generated Changelog Preview" + echo "" + cat /tmp/changelog.md diff --git a/.github/workflows/installer-release.yml b/.github/workflows/installer-release.yml index 8101cb808..5454628ac 100644 --- a/.github/workflows/installer-release.yml +++ b/.github/workflows/installer-release.yml @@ -1,42 +1,110 @@ name: Installer Release on: - release: - types: ['released'] + workflow_call: + inputs: + version: + description: 'Release version (e.g., v11.2.0)' + required: true + type: string + version_major: + description: 'Major version (v10 or v11)' + required: true + type: string + environment: + description: 'Environment (dev or rc)' + required: true + type: string + prerelease: + description: 'Whether this is a prerelease' + required: false + type: boolean + default: false + changelog: + description: 'Changelog content for the release body' + required: false + type: string + default: '' + secrets: + API_SECRET: + required: false + CM_ENCRYPT_SALT: + required: false + CM_SIGN_PUBLIC_KEY: + required: false jobs: - setup_deployment: - name: Validate & Setup - runs-on: ubuntu-24.04 - outputs: - version_major: ${{ steps.validate.outputs.version_major }} - version: ${{ steps.validate.outputs.version }} + # ============================================ + # V10 DEV - Deploy to runner only + # ============================================ + deploy_v10_dev: + name: Deploy V10 to Dev Runner + runs-on: utmstack-v10-dev + if: inputs.version_major == 'v10' && inputs.environment == 'dev' steps: - - name: Validate Release Version - id: validate + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: ^1.20 + + - name: Build and Deploy + working-directory: ./installer + env: + GOOS: linux + GOARCH: amd64 run: | - VERSION="${{ github.event.release.tag_name }}" - echo "Validating release: $VERSION" + echo "Building V10 Installer for dev environment" + go build -o installer -v . + mv installer /home/utmstack/installer + chmod +x /home/utmstack/installer - if [[ "$VERSION" =~ ^v10\.[0-9]+\.[0-9]+ ]]; then - echo "โœ… V10 release detected: $VERSION" - echo "version_major=v10" >> $GITHUB_OUTPUT - echo "version=$VERSION" >> $GITHUB_OUTPUT + - name: Run Installer + working-directory: /home/utmstack + run: | + sudo ./installer - elif [[ "$VERSION" =~ ^v11\.[0-9]+\.[0-9]+ ]]; then - echo "โœ… V11 release detected: $VERSION" - echo "version_major=v11" >> $GITHUB_OUTPUT - echo "version=$VERSION" >> $GITHUB_OUTPUT + # ============================================ + # V10 RC - Deploy to runner + # ============================================ + deploy_v10_rc_runner: + name: Deploy V10 to RC Runner + runs-on: utmstack-v10-rc + if: inputs.version_major == 'v10' && inputs.environment == 'rc' + steps: + - name: Check out code + uses: actions/checkout@v4 - else - echo "โญ๏ธ Skipping: Not a v10 or v11 release (got $VERSION)" - fi + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: ^1.20 + + - name: Build and Deploy + working-directory: ./installer + env: + GOOS: linux + GOARCH: amd64 + run: | + echo "Building V10 Installer for rc environment" + go build -o installer -v . + mv installer /home/utmstack/installer + chmod +x /home/utmstack/installer + + - name: Run Installer + working-directory: /home/utmstack + run: | + sudo ./installer - build_v10: - name: Build V10 Installer + # ============================================ + # V10 RC - Upload to prerelease + # ============================================ + deploy_v10_rc_prerelease: + name: Upload V10 Installer to Prerelease runs-on: ubuntu-24.04 - needs: setup_deployment - if: needs.setup_deployment.outputs.version_major == 'v10' + if: inputs.version_major == 'v10' && inputs.environment == 'rc' steps: - name: Check out code uses: actions/checkout@v4 @@ -45,31 +113,88 @@ jobs: uses: actions/setup-go@v5 with: go-version: ^1.20 - id: go + + - name: Prepare changelog + id: changelog + env: + CHANGELOG_CONTENT: ${{ inputs.changelog }} + run: | + printf '%s' "$CHANGELOG_CONTENT" > /tmp/CHANGELOG.md - name: Build working-directory: ./installer env: GOOS: linux GOARCH: amd64 - run: go build -o installer -v . + run: | + echo "Building V10 Installer for prerelease" + go build -o installer -v . - name: Upload Release Assets uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - body_path: ./CHANGELOG.md + tag_name: ${{ inputs.version }} + body_path: /tmp/CHANGELOG.md draft: false - prerelease: false + prerelease: ${{ inputs.prerelease }} files: | ./installer/installer - build_v11: - name: Build V11 Installer + # ============================================ + # V11 DEV - Deploy to runner with dev branch + # ============================================ + deploy_v11_dev: + name: Deploy V11 to Dev Runner + runs-on: utmstack-v11-dev + if: inputs.version_major == 'v11' && inputs.environment == 'dev' + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: ^1.20 + + - name: Configure git for private modules + run: | + git config --global url."https://${{ secrets.API_SECRET }}:x-oauth-basic@github.com/".insteadOf "https://github.com/" + echo "GOPRIVATE=github.com/utmstack" >> $GITHUB_ENV + echo "GONOPROXY=github.com/utmstack" >> $GITHUB_ENV + echo "GONOSUMDB=github.com/utmstack" >> $GITHUB_ENV + + - name: Build and Deploy + working-directory: ./installer + env: + GOOS: linux + GOARCH: amd64 + GOPRIVATE: github.com/utmstack + GONOPROXY: github.com/utmstack + GONOSUMDB: github.com/utmstack + run: | + echo "Building V11 Installer for dev environment (branch=dev)" + go build -o installer -v -ldflags "\ + -X 'github.com/utmstack/UTMStack/installer/config.DEFAULT_BRANCH=dev' \ + -X 'github.com/utmstack/UTMStack/installer/config.INSTALLER_VERSION=${{ inputs.version }}' \ + -X 'github.com/utmstack/UTMStack/installer/config.REPLACE=${{ secrets.CM_ENCRYPT_SALT }}' \ + -X 'github.com/utmstack/UTMStack/installer/config.PUBLIC_KEY=${{ secrets.CM_SIGN_PUBLIC_KEY }}'" . + mv installer /home/utmstack/installer + chmod +x /home/utmstack/installer + + - name: Run Installer + working-directory: /home/utmstack + run: | + sudo ./installer + + # ============================================ + # V11 RC - Upload to prerelease only + # ============================================ + build_v11_rc: + name: Build V11 Installer for Prerelease runs-on: ubuntu-24.04 - needs: setup_deployment - if: needs.setup_deployment.outputs.version_major == 'v11' + if: inputs.version_major == 'v11' && inputs.environment == 'rc' steps: - name: Check out code uses: actions/checkout@v4 @@ -78,7 +203,6 @@ jobs: uses: actions/setup-go@v5 with: go-version: ^1.20 - id: go - name: Configure git for private modules run: | @@ -87,6 +211,13 @@ jobs: echo "GONOPROXY=github.com/utmstack" >> $GITHUB_ENV echo "GONOSUMDB=github.com/utmstack" >> $GITHUB_ENV + - name: Prepare changelog + id: changelog + env: + CHANGELOG_CONTENT: ${{ inputs.changelog }} + run: | + printf '%s' "$CHANGELOG_CONTENT" > /tmp/CHANGELOG.md + - name: Build working-directory: ./installer env: @@ -96,10 +227,10 @@ jobs: GONOPROXY: github.com/utmstack GONOSUMDB: github.com/utmstack run: | - echo "Building V11 Installer for production release" + echo "Building V11 Installer for prerelease (branch=prod)" go build -o installer -v -ldflags "\ -X 'github.com/utmstack/UTMStack/installer/config.DEFAULT_BRANCH=prod' \ - -X 'github.com/utmstack/UTMStack/installer/config.INSTALLER_VERSION=${{ needs.setup_deployment.outputs.version }}' \ + -X 'github.com/utmstack/UTMStack/installer/config.INSTALLER_VERSION=${{ inputs.version }}' \ -X 'github.com/utmstack/UTMStack/installer/config.REPLACE=${{ secrets.CM_ENCRYPT_SALT }}' \ -X 'github.com/utmstack/UTMStack/installer/config.PUBLIC_KEY=${{ secrets.CM_SIGN_PUBLIC_KEY }}'" . @@ -108,7 +239,9 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - body_path: ./CHANGELOG.md + tag_name: ${{ inputs.version }} + body_path: /tmp/CHANGELOG.md draft: false + prerelease: ${{ inputs.prerelease }} files: | ./installer/installer diff --git a/.github/workflows/v10-deployment-pipeline.yml b/.github/workflows/v10-deployment-pipeline.yml index 3340d6429..17c8992e5 100644 --- a/.github/workflows/v10-deployment-pipeline.yml +++ b/.github/workflows/v10-deployment-pipeline.yml @@ -2,10 +2,9 @@ name: V10 - Build & Deploy Pipeline on: push: - branches: [ 'v10', 'release/v10**' ] - tags: [ 'v10.*' ] - pull_request: - branches: [ 'v10' ] + branches: [ 'release/v10**' ] + release: + types: [ prereleased, released ] jobs: setup_deployment: @@ -13,19 +12,40 @@ jobs: runs-on: ubuntu-24.04 outputs: tag: ${{ steps.set-env.outputs.tag }} + environment: ${{ steps.set-env.outputs.environment }} + release_tag: ${{ steps.set-env.outputs.release_tag }} steps: - name: Determine Build Environment id: set-env run: | + # =================== + # DEV Environment + # =================== + # Triggered by: push to release/v10.x.x branches if ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/v10') }}; then echo "DEV environment" echo "tag=v10-dev" >> $GITHUB_OUTPUT - elif ${{ github.event_name == 'push' && github.ref == 'refs/heads/v10' }}; then + echo "environment=dev" >> $GITHUB_OUTPUT + + # =================== + # RC Environment + # =================== + # Triggered by: prerelease creation + elif ${{ github.event_name == 'release' && github.event.action == 'prereleased' }}; then echo "RC environment" echo "tag=v10-rc" >> $GITHUB_OUTPUT - elif ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v10.') }}; then - echo "RELEASE environment" + echo "environment=rc" >> $GITHUB_OUTPUT + echo "release_tag=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT + + # =================== + # PROD Environment + # =================== + # Triggered by: prerelease promoted to release + elif ${{ github.event_name == 'release' && github.event.action == 'released' }}; then + echo "PROD environment" echo "tag=v10" >> $GITHUB_OUTPUT + echo "environment=prod" >> $GITHUB_OUTPUT + echo "release_tag=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT fi validations: @@ -288,62 +308,23 @@ jobs: steps: - run: echo "โœ… All builds completed successfully" - deploy_dev: - name: Deploy to v10-dev environment + deploy_installer_dev: + name: Deploy Installer (Dev) needs: [all_builds_complete, setup_deployment] - if: ${{ needs.setup_deployment.outputs.tag == 'v10-dev' }} - runs-on: utmstack-v10-dev - steps: - - name: Check out code into the right branch - uses: actions/checkout@v4 - - - name: Set up Go 1.x - uses: actions/setup-go@v5 - with: - go-version: ^1.20 - id: go - - - name: Build - working-directory: ./installer - env: - GOOS: linux - GOARCH: amd64 - run: | - go build -o installer -v . - mv installer /home/utmstack/installer - chmod +x /home/utmstack/installer - - - name: Run - working-directory: /home/utmstack - run: | - sudo ./installer + if: ${{ needs.setup_deployment.outputs.environment == 'dev' }} + uses: ./.github/workflows/installer-release.yml + with: + version: ${{ needs.setup_deployment.outputs.tag }} + version_major: v10 + environment: dev - deploy_rc: - name: Deploy to v10-rc environment + deploy_installer_rc: + name: Deploy Installer (RC) needs: [all_builds_complete, setup_deployment] - if: ${{ needs.setup_deployment.outputs.tag == 'v10-rc' }} - runs-on: utmstack-v10-rc - steps: - - name: Check out code into the right branch - uses: actions/checkout@v4 - - - name: Set up Go 1.x - uses: actions/setup-go@v5 - with: - go-version: ^1.20 - id: go - - - name: Build - working-directory: ./installer - env: - GOOS: linux - GOARCH: amd64 - run: | - go build -o installer -v . - mv installer /home/utmstack/installer - chmod +x /home/utmstack/installer - - - name: Run - working-directory: /home/utmstack - run: | - sudo ./installer + if: ${{ needs.setup_deployment.outputs.environment == 'rc' }} + uses: ./.github/workflows/installer-release.yml + with: + version: ${{ needs.setup_deployment.outputs.release_tag }} + version_major: v10 + environment: rc + prerelease: true diff --git a/.github/workflows/v11-deployment-pipeline.yml b/.github/workflows/v11-deployment-pipeline.yml index 1171dbfd2..2550c46aa 100644 --- a/.github/workflows/v11-deployment-pipeline.yml +++ b/.github/workflows/v11-deployment-pipeline.yml @@ -1,95 +1,146 @@ name: "v11 - Build & Deploy Pipeline" on: - workflow_dispatch: - inputs: - version_tag: - description: "Version to deploy.(e.g., v11.0.0-dev.1, v11.1.0)" - required: true - event_processor_tag: - description: "Event processor version to use for this deployment.(e.g., 1.0.0-beta)" - required: true - default: "1.0.0-beta" + push: + branches: [ 'release/v11**' ] + release: + types: [ prereleased ] jobs: + setup_deployment: + name: Setup Deployment + runs-on: ubuntu-24.04 + outputs: + tag: ${{ steps.set-env.outputs.tag }} + environment: ${{ steps.set-env.outputs.environment }} + cm_url: ${{ steps.set-env.outputs.cm_url }} + event_processor_tag: ${{ steps.set-env.outputs.event_processor_tag }} + steps: + - name: Determine Build Environment + id: set-env + run: | + # =================== + # DEV Environment + # =================== + # Triggered by: push to release/v11.x.x branches + if ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/v11') }}; then + ENVIRONMENT="dev" + CM_URL="https://cm.dev.utmstack.com" + echo "Environment: $ENVIRONMENT" + echo "CM URL: $CM_URL" + + # Extract version from branch name (e.g., release/v11.2.1 -> v11.2.1) + BRANCH_VERSION=$(echo "${{ github.ref }}" | sed 's|refs/heads/release/||') + echo "Branch version: $BRANCH_VERSION" + + # Get latest version from CM + RESPONSE=$(curl -s "${CM_URL}/api/v1/versions/latest") + LATEST_VERSION=$(echo "$RESPONSE" | jq -r '.version // empty') + echo "Latest version from CM: $LATEST_VERSION" + + if [ -n "$LATEST_VERSION" ]; then + # Extract base version from latest (e.g., v11.2.1-dev.9 -> v11.2.1) + LATEST_BASE=$(echo "$LATEST_VERSION" | sed 's/-dev\.[0-9]*$//') + echo "Latest base version: $LATEST_BASE" + + if [ "$BRANCH_VERSION" = "$LATEST_BASE" ]; then + # Versions match - increment dev number + DEV_NUM=$(echo "$LATEST_VERSION" | grep -oP '(?<=-dev\.)\d+') + NEW_DEV_NUM=$((DEV_NUM + 1)) + TAG="${BRANCH_VERSION}-dev.${NEW_DEV_NUM}" + echo "Versions match, incrementing: $TAG" + else + # Versions don't match - CM not updated yet, start at dev.1 + TAG="${BRANCH_VERSION}-dev.1" + echo "Versions don't match, starting fresh: $TAG" + fi + else + # No version found in CM - start at dev.1 + TAG="${BRANCH_VERSION}-dev.1" + echo "No previous version found, starting fresh: $TAG" + fi + + echo "tag=$TAG" >> $GITHUB_OUTPUT + echo "environment=$ENVIRONMENT" >> $GITHUB_OUTPUT + echo "cm_url=$CM_URL" >> $GITHUB_OUTPUT + echo "event_processor_tag=${{ vars.TW_EVENT_PROCESSOR_VERSION_DEV }}" >> $GITHUB_OUTPUT + + # =================== + # RC Environment + # =================== + # Triggered by: prerelease creation (tag should be v11.x.x) + elif ${{ github.event_name == 'release' && github.event.action == 'prereleased' }}; then + ENVIRONMENT="rc" + CM_URL="https://cm.utmstack.com" + echo "Environment: $ENVIRONMENT" + echo "CM URL: $CM_URL" + + # Get the tag from the prerelease event + TAG="${{ github.event.release.tag_name }}" + echo "Tag from prerelease: $TAG" + + echo "tag=$TAG" >> $GITHUB_OUTPUT + echo "environment=$ENVIRONMENT" >> $GITHUB_OUTPUT + echo "cm_url=$CM_URL" >> $GITHUB_OUTPUT + echo "event_processor_tag=${{ vars.TW_EVENT_PROCESSOR_VERSION_PROD }}" >> $GITHUB_OUTPUT + fi + validations: name: Validate permissions runs-on: ubuntu-24.04 + needs: setup_deployment + if: ${{ needs.setup_deployment.outputs.tag != '' }} steps: - name: Check permissions run: | - echo "Checking permissions..." + echo "Validating user permissions..." - # Check if version is production format (v11.x.x) or dev format (v11.x.x-dev.x, etc.) - if [[ "${{ github.event.inputs.version_tag }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - echo "๐Ÿ” Detected PRODUCTION version format: ${{ github.event.inputs.version_tag }}" + RESPONSE=$(curl -s -H "Authorization: Bearer ${{ secrets.API_SECRET }}" \ + -H "Accept: application/vnd.github.json" \ + "https://api.github.com/orgs/utmstack/teams/integration-developers/memberships/${{ github.actor }}") - # For production versions, only administrators can deploy - echo "Validating user permissions against administrators team..." + if echo "$RESPONSE" | grep -q '"state": "active"'; then + echo "โœ… User ${{ github.actor }} is a member of the integration-developers team." + else RESPONSE=$(curl -s -H "Authorization: Bearer ${{ secrets.API_SECRET }}" \ -H "Accept: application/vnd.github.json" \ - "https://api.github.com/orgs/utmstack/teams/administrators/memberships/${{ github.actor }}") + "https://api.github.com/orgs/utmstack/teams/core-developers/memberships/${{ github.actor }}") if echo "$RESPONSE" | grep -q '"state": "active"'; then - echo "โœ… User ${{ github.actor }} is a member of the administrators team." + echo "โœ… User ${{ github.actor }} is a member of the core-developers team." else - echo "โ›” ERROR: User ${{ github.actor }} is not a member of the administrators team." - echo "Production deployments require administrator permissions." + echo "โ›” ERROR: User ${{ github.actor }} is not a member of the core-developers or integration-developers team." echo $RESPONSE exit 1 fi + fi - elif [[ "${{ github.event.inputs.version_tag }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+-dev\.[0-9]+$ ]]; then - echo "๐Ÿ” Detected DEV version format: ${{ github.event.inputs.version_tag }}" - - if [[ "${{ github.ref }}" =~ ^refs/heads/(release/|feature/) ]]; then - echo "โœ… Base branch ${{ github.ref }} is valid." - else - echo "โ›” ERROR: Base branch ${{ github.ref }} is not valid. It should be release/ or feature/." - exit 1 - fi - - # For dev versions, check administrators first, then integration-developers, then core-developers - echo "Validating user permissions..." - RESPONSE=$(curl -s -H "Authorization: Bearer ${{ secrets.API_SECRET }}" \ - -H "Accept: application/vnd.github.json" \ - "https://api.github.com/orgs/utmstack/teams/administrators/memberships/${{ github.actor }}") + check_go_dependencies: + name: Check Go Dependencies + runs-on: ubuntu-24.04 + needs: [validations, setup_deployment] + if: ${{ needs.setup_deployment.outputs.environment == 'rc' }} + steps: + - name: Check out code + uses: actions/checkout@v4 - if echo "$RESPONSE" | grep -q '"state": "active"'; then - echo "โœ… User ${{ github.actor }} is a member of the administrators team." - else - RESPONSE=$(curl -s -H "Authorization: Bearer ${{ secrets.API_SECRET }}" \ - -H "Accept: application/vnd.github.json" \ - "https://api.github.com/orgs/utmstack/teams/integration-developers/memberships/${{ github.actor }}") + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: ^1.20 - if echo "$RESPONSE" | grep -q '"state": "active"'; then - echo "โœ… User ${{ github.actor }} is a member of the integration-developers team." - else - RESPONSE=$(curl -s -H "Authorization: Bearer ${{ secrets.API_SECRET }}" \ - -H "Accept: application/vnd.github.json" \ - "https://api.github.com/orgs/utmstack/teams/core-developers/memberships/${{ github.actor }}") - - if echo "$RESPONSE" | grep -q '"state": "active"'; then - echo "โœ… User ${{ github.actor }} is a member of the core-developers team." - else - echo "โ›” ERROR: User ${{ github.actor }} is not a member of administrators, integration-developers, or core-developers teams." - echo $RESPONSE - exit 1 - fi - fi - fi + - name: Configure git for private modules + run: | + git config --global url."https://${{ secrets.API_SECRET }}:x-oauth-basic@github.com/".insteadOf "https://github.com/" + echo "GOPRIVATE=github.com/utmstack" >> $GITHUB_ENV - else - echo "โ›” Version tag format is incorrect." - echo "Expected formats:" - echo " - Production: vX.Y.Z (e.g., v11.0.0)" - echo " - Development: vX.Y.Z-dev.N (e.g., v11.0.0-dev.1)" - exit 1 - fi + - name: Check for outdated dependencies + run: ${{ github.workspace }}/.github/scripts/golang-updater/golang-updater --check --discover build_agent: name: Build and Sign Agent - needs: [validations] + needs: [check_go_dependencies, setup_deployment] + if: ${{ always() && (needs.check_go_dependencies.result == 'success' || needs.check_go_dependencies.result == 'skipped') && needs.setup_deployment.outputs.tag != '' }} runs-on: utmstack-signer steps: - name: Check out code into the right branch @@ -153,7 +204,8 @@ jobs: build_utmstack_collector: name: Build UTMStack Collector - needs: [validations] + needs: [check_go_dependencies, setup_deployment] + if: ${{ always() && (needs.check_go_dependencies.result == 'success' || needs.check_go_dependencies.result == 'skipped') && needs.setup_deployment.outputs.tag != '' }} runs-on: ubuntu-24.04 steps: - name: Check out code into the right branch @@ -175,7 +227,8 @@ jobs: build_agent_manager: name: Build Agent Manager Microservice - needs: [validations, build_agent, build_utmstack_collector] + needs: [build_agent, build_utmstack_collector, setup_deployment] + if: ${{ always() && needs.build_agent.result == 'success' && needs.build_utmstack_collector.result == 'success' && needs.setup_deployment.outputs.tag != '' }} runs-on: ubuntu-24.04 steps: - name: Check out code into the right branch @@ -192,7 +245,7 @@ jobs: with: name: utmstack-collector path: ${{ github.workspace }}/utmstack-collector - + - name: Prepare dependencies for Agent Manager Image run: | cd ${{ github.workspace }}/agent-manager @@ -231,11 +284,12 @@ jobs: with: context: ./agent-manager push: true - tags: ghcr.io/utmstack/utmstack/agent-manager:${{ inputs.version_tag }}-community + tags: ghcr.io/utmstack/utmstack/agent-manager:${{ needs.setup_deployment.outputs.tag }} build_event_processor: name: Build Event Processor Microservice - needs: [validations] + needs: [check_go_dependencies, setup_deployment] + if: ${{ always() && (needs.check_go_dependencies.result == 'success' || needs.check_go_dependencies.result == 'skipped') && needs.setup_deployment.outputs.tag != '' }} runs-on: ubuntu-24.04 steps: - name: Check out code into the right branch @@ -261,6 +315,7 @@ jobs: cd ${{ github.workspace }}/plugins/soc-ai; go build -o com.utmstack.soc-ai.plugin -v . 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/threadwinds-ingestion; go build -o com.utmstack.threadwinds-ingestion.plugin -v . - name: Prepare Dependencies for Event Processor Image run: | @@ -284,17 +339,18 @@ jobs: context: . file: ./event_processor.Dockerfile push: true - tags: ghcr.io/utmstack/utmstack/eventprocessor:${{ inputs.version_tag }}-community + tags: ghcr.io/utmstack/utmstack/eventprocessor:${{ needs.setup_deployment.outputs.tag }} build-args: | - BASE_IMAGE=ghcr.io/threatwinds/eventprocessor/base:${{ inputs.event_processor_tag }} + BASE_IMAGE=ghcr.io/threatwinds/eventprocessor/base:${{ needs.setup_deployment.outputs.event_processor_tag }} build_backend: name: Build Backend Microservice - needs: [validations] + needs: [validations, setup_deployment] + if: ${{ needs.setup_deployment.outputs.tag != '' }} uses: ./.github/workflows/reusable-java.yml with: image_name: backend - tag: ${{ inputs.version_tag }}-community + tag: ${{ needs.setup_deployment.outputs.tag }} java_version: '17' use_tag_as_version: true maven_profile: 'prod' @@ -302,30 +358,33 @@ jobs: build_frontend: name: Build Frontend Microservice - needs: [validations] + needs: [validations, setup_deployment] + if: ${{ needs.setup_deployment.outputs.tag != '' }} uses: ./.github/workflows/reusable-node.yml with: image_name: frontend - tag: ${{ inputs.version_tag }}-community + tag: ${{ needs.setup_deployment.outputs.tag }} build_user_auditor: name: Build User-Auditor Microservice - needs: [validations] + needs: [validations, setup_deployment] + if: ${{ needs.setup_deployment.outputs.tag != '' }} uses: ./.github/workflows/reusable-java.yml with: image_name: user-auditor - tag: ${{ inputs.version_tag }}-community + tag: ${{ needs.setup_deployment.outputs.tag }} java_version: '11' use_version_file: false maven_goals: 'clean install -U' build_web_pdf: name: Build Web-PDF Microservice - needs: [validations] + needs: [validations, setup_deployment] + if: ${{ needs.setup_deployment.outputs.tag != '' }} uses: ./.github/workflows/reusable-java.yml with: image_name: web-pdf - tag: ${{ inputs.version_tag }}-community + tag: ${{ needs.setup_deployment.outputs.tag }} java_version: '11' use_version_file: false maven_goals: 'clean install -U' @@ -340,46 +399,95 @@ jobs: build_user_auditor, build_web_pdf ] + if: ${{ always() && needs.build_agent_manager.result == 'success' && needs.build_event_processor.result == 'success' && needs.build_backend.result == 'success' && needs.build_frontend.result == 'success' && needs.build_user_auditor.result == 'success' && needs.build_web_pdf.result == 'success' }} runs-on: ubuntu-24.04 steps: - run: echo "โœ… All builds completed successfully." - + + generate_changelog: + name: Generate Changelog + needs: [all_builds_complete, setup_deployment] + if: ${{ needs.setup_deployment.outputs.tag != '' && needs.setup_deployment.outputs.environment == 'rc' }} + uses: ./.github/workflows/generate-changelog.yml + with: + current_tag: ${{ needs.setup_deployment.outputs.tag }} + secrets: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + + build_installer_rc: + name: Build & Upload Installer (RC) + needs: [generate_changelog, setup_deployment] + if: ${{ needs.setup_deployment.outputs.tag != '' && needs.setup_deployment.outputs.environment == 'rc' }} + uses: ./.github/workflows/installer-release.yml + with: + version: ${{ needs.setup_deployment.outputs.tag }} + version_major: v11 + environment: rc + prerelease: true + changelog: ${{ needs.generate_changelog.outputs.changelog }} + secrets: + API_SECRET: ${{ secrets.API_SECRET }} + CM_ENCRYPT_SALT: ${{ secrets.CM_ENCRYPT_SALT }} + CM_SIGN_PUBLIC_KEY: ${{ secrets.CM_SIGN_PUBLIC_KEY }} + + deploy_installer_dev: + name: Deploy Installer (Dev) + needs: [all_builds_complete, setup_deployment] + if: ${{ always() && needs.all_builds_complete.result == 'success' && needs.setup_deployment.outputs.tag != '' && needs.setup_deployment.outputs.environment == 'dev' }} + uses: ./.github/workflows/installer-release.yml + with: + version: ${{ needs.setup_deployment.outputs.tag }} + version_major: v11 + environment: dev + secrets: + API_SECRET: ${{ secrets.API_SECRET }} + CM_ENCRYPT_SALT: ${{ secrets.CM_ENCRYPT_SALT }} + CM_SIGN_PUBLIC_KEY: ${{ secrets.CM_SIGN_PUBLIC_KEY }} + publish_new_version: name: Publish New Version to Customer Manager - needs: all_builds_complete + needs: [all_builds_complete, generate_changelog, setup_deployment] + if: ${{ always() && needs.all_builds_complete.result == 'success' && needs.setup_deployment.outputs.tag != '' }} runs-on: ubuntu-24.04 steps: - name: Check out code uses: actions/checkout@v4 - name: Publish version + env: + CHANGELOG_CONTENT: ${{ needs.generate_changelog.outputs.changelog }} + ENVIRONMENT: ${{ needs.setup_deployment.outputs.environment }} + TAG: ${{ needs.setup_deployment.outputs.tag }} + CM_URL: ${{ needs.setup_deployment.outputs.cm_url }} run: | - changelog=$(cat CHANGELOG.md) - - # Determine environment and CM_AUTH based on version format - if [[ "${{ inputs.version_tag }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - echo "๐Ÿ” Detected PRODUCTION version" - cmAuth=$(echo '${{ secrets.CM_AUTH }}' | jq -r '.') - cm_url="https://cm.utmstack.com/api/v1/versions/register" - elif [[ "${{ inputs.version_tag }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+-dev\.[0-9]+$ ]]; then - echo "๐Ÿ” Detected DEV version" - cmAuth=$(echo '${{ secrets.CM_AUTH_DEV }}' | jq -r '.') - cm_url="https://cm.dev.utmstack.com/api/v1/versions/register" + # Use AI changelog for rc, generic for dev + if [ "$ENVIRONMENT" = "rc" ] && [ -n "$CHANGELOG_CONTENT" ]; then + changelog="$CHANGELOG_CONTENT" + else + changelog="Development build $TAG - Internal testing release" + fi + + echo "Environment: $ENVIRONMENT" + echo "CM URL: $CM_URL" + echo "Tag: $TAG" + + # Select CM_SERVICE_ACCOUNT based on environment + if [ "$ENVIRONMENT" = "dev" ]; then + cmAuth=$(echo '${{ secrets.CM_SERVICE_ACCOUNT_DEV }}' | jq -r '.') else - echo "โ›” Version format not recognized" - exit 1 + cmAuth=$(echo '${{ secrets.CM_SERVICE_ACCOUNT_PROD }}' | jq -r '.') fi id=$(echo "$cmAuth" | jq -r '.id') key=$(echo "$cmAuth" | jq -r '.key') body=$(jq -n \ - --arg version "${{ inputs.version_tag }}" \ + --arg version "$TAG" \ --arg changelog "$changelog" \ '{version: $version, changelog: $changelog}' ) - response=$(curl -s -X POST "$cm_url" \ + response=$(curl -s -X POST "${CM_URL}/api/v1/versions/register" \ -H "Content-Type: application/json" \ -H "id: $id" \ -H "key: $key" \ @@ -389,53 +497,60 @@ jobs: schedule: name: Schedule release to our instances - needs: publish_new_version + needs: [publish_new_version, setup_deployment] + if: ${{ always() && needs.publish_new_version.result == 'success' && needs.setup_deployment.outputs.tag != '' }} runs-on: ubuntu-24.04 + env: + ENVIRONMENT: ${{ needs.setup_deployment.outputs.environment }} + TAG: ${{ needs.setup_deployment.outputs.tag }} + CM_URL: ${{ needs.setup_deployment.outputs.cm_url }} steps: - - name: Run publisher + - name: Schedule updates run: | - # Determine environment, instance IDs, and auth token based on version format - if [[ "${{ inputs.version_tag }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - echo "๐Ÿ” Detected PRODUCTION version" - environment="prod" - instance_ids="${{ vars.SCHEDULE_INSTANCES_PROD }}" - auth_token="${{ secrets.CM_SCHEDULE_TOKEN_PROD }}" - elif [[ "${{ inputs.version_tag }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+-dev\.[0-9]+$ ]]; then - echo "๐Ÿ” Detected DEV version" - environment="dev" + echo "๐Ÿ” Environment: $ENVIRONMENT" + echo "๐Ÿ” Version: $TAG" + echo "๐Ÿ” CM URL: $CM_URL" + + # Select instance IDs and auth based on environment + if [ "$ENVIRONMENT" = "dev" ]; then instance_ids="${{ vars.SCHEDULE_INSTANCES_DEV }}" - auth_token="${{ secrets.CM_SCHEDULE_TOKEN_DEV }}" + auth_json='${{ secrets.CM_SERVICE_ACCOUNT_DEV }}' else - echo "โ›” Version format not recognized" - exit 1 + # rc uses prod variables + instance_ids="${{ vars.SCHEDULE_INSTANCES_PROD }}" + auth_json='${{ secrets.CM_SERVICE_ACCOUNT_PROD }}' fi - # Download cm-version-publisher - curl -sSL "https://storage.googleapis.com/utmstack-updates/dependencies/cm-version-publisher" -o ./cm-version-publisher - chmod +x ./cm-version-publisher + # Extract id and key from auth JSON + auth_id=$(echo "$auth_json" | jq -r '.id') + auth_key=$(echo "$auth_json" | jq -r '.key') # Parse IDs (handle single ID or comma-separated IDs) IFS=',' read -ra ID_ARRAY <<< "$instance_ids" # Iterate over each instance ID for instance_id in "${ID_ARRAY[@]}"; do - # Trim whitespace instance_id=$(echo "$instance_id" | xargs) echo "๐Ÿ“… Scheduling release for instance: $instance_id" - ./cm-version-publisher \ - --env "$environment" \ - --instance-id "$instance_id" \ - --version "${{ inputs.version_tag }}" \ - --auth-token "$auth_token" - if [ $? -eq 0 ]; then + response=$(curl -s -w "\n%{http_code}" -X POST "${CM_URL}/api/v1/updates" \ + -H "Content-Type: application/json" \ + -H "id: $auth_id" \ + -H "key: $auth_key" \ + -d "{\"instance_id\": \"$instance_id\", \"version\": \"$TAG\"}") + + http_code=$(echo "$response" | tail -n1) + body=$(echo "$response" | sed '$d') + + if [ "$http_code" -ge 200 ] && [ "$http_code" -lt 300 ]; then echo "โœ… Successfully scheduled for instance: $instance_id" else - echo "โŒ Failed to schedule for instance: $instance_id" + echo "โŒ Failed to schedule for instance: $instance_id (HTTP $http_code)" + echo "Response: $body" exit 1 fi done - echo "โœ… Scheduled release for all instances with version ${{ inputs.version_tag }}" + echo "โœ… Scheduled release for all instances with version $TAG" \ No newline at end of file diff --git a/.gitignore b/.gitignore index e21cb1e8d..558dcea27 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,6 @@ installer/installer **/.vscode **/*.plugin +geolocation/ +installer/public_key.crt +.github/scripts/golang-updater/go-updater diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 8a79ee0bd..000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# UTMStack 11.2.0 โ€“ Release Notes - -The **UTMStack v11.2.0** release introduces key enhancements, new integrations, and important fixes to improve system stability, performance, and user experience. - -## Improvements & Fixes -- Enhanced AWS integration with updated setup guides and improved log processing reliability. -- Added CrowdStrike Falcon integration for advanced threat detection and response. diff --git a/agent-manager/agent/agent_imp.go b/agent-manager/agent/agent_imp.go index b1ecd3774..d9e09b870 100644 --- a/agent-manager/agent/agent_imp.go +++ b/agent-manager/agent/agent_imp.go @@ -83,7 +83,7 @@ func (s *AgentService) RegisterAgent(ctx context.Context, req *AgentRequest) (*A Key: oldAgent.AgentKey, }, nil } else { - catcher.Error("agent already exists", err, map[string]any{"hostname": agent.Hostname}) + catcher.Error("agent already exists", err, map[string]any{"hostname": agent.Hostname, "process": "agent-manager"}) return nil, status.Errorf(codes.AlreadyExists, "hostname has already been registered") } } @@ -92,7 +92,7 @@ func (s *AgentService) RegisterAgent(ctx context.Context, req *AgentRequest) (*A agent.AgentKey = key err = s.DBConnection.Create(agent) if err != nil { - catcher.Error("failed to create agent", err, nil) + catcher.Error("failed to create agent", err, map[string]any{"process": "agent-manager"}) return nil, status.Error(codes.Internal, fmt.Sprintf("failed to create agent: %v", err)) } @@ -106,7 +106,7 @@ func (s *AgentService) RegisterAgent(ctx context.Context, req *AgentRequest) (*A LastPing: time.Now(), } - catcher.Info("Agent registered correctly", map[string]any{"hostname": agent.Hostname, "id": agent.ID}) + catcher.Info("Agent registered correctly", map[string]any{"hostname": agent.Hostname, "id": agent.ID, "process": "agent-manager"}) return &AuthResponse{ Id: uint32(agent.ID), Key: key, @@ -126,7 +126,7 @@ func (s *AgentService) UpdateAgent(ctx context.Context, req *AgentRequest) (*Aut agent := &models.Agent{} err = s.DBConnection.GetFirst(agent, "id = ?", idInt) if err != nil { - catcher.Error("failed to fetch agent", err, nil) + catcher.Error("failed to fetch agent", err, map[string]any{"process": "agent-manager"}) return nil, status.Errorf(codes.NotFound, "agent not found") } @@ -157,7 +157,7 @@ func (s *AgentService) UpdateAgent(ctx context.Context, req *AgentRequest) (*Aut err = s.DBConnection.Upsert(&agent, "id = ?", nil, idInt) if err != nil { - catcher.Error("failed to update agent", err, nil) + catcher.Error("failed to update agent", err, map[string]any{"process": "agent-manager"}) return nil, status.Errorf(codes.Internal, "failed to update agent: %v", err) } @@ -181,18 +181,18 @@ func (s *AgentService) DeleteAgent(ctx context.Context, req *DeleteRequest) (*Au err = s.DBConnection.Upsert(&models.Agent{}, "id = ?", map[string]interface{}{"deleted_by": req.DeletedBy}, id) if err != nil { - catcher.Error("unable to update delete_by field in agent", err, nil) + catcher.Error("unable to update delete_by field in agent", err, map[string]any{"process": "agent-manager"}) } err = s.DBConnection.Delete(&models.AgentCommand{}, "agent_id = ?", false, uint(idInt)) if err != nil { - catcher.Error("unable to delete agent commands", err, nil) + catcher.Error("unable to delete agent commands", err, map[string]any{"process": "agent-manager"}) return &AuthResponse{}, status.Error(codes.Internal, fmt.Sprintf("unable to delete agent commands: %v", err.Error())) } err = s.DBConnection.Delete(&models.Agent{}, "id = ?", false, id) if err != nil { - catcher.Error("unable to delete agent", err, nil) + catcher.Error("unable to delete agent", err, map[string]any{"process": "agent-manager"}) return &AuthResponse{}, status.Error(codes.Internal, fmt.Sprintf("unable to delete agent: %v", err.Error())) } @@ -204,7 +204,7 @@ func (s *AgentService) DeleteAgent(ctx context.Context, req *DeleteRequest) (*Au delete(s.AgentStreamMap, uint(idInt)) s.AgentStreamMutex.Unlock() - catcher.Info("Agent deleted", map[string]any{"key": key, "deleted_by": req.DeletedBy}) + catcher.Info("Agent deleted", map[string]any{"key": key, "deleted_by": req.DeletedBy, "process": "agent-manager"}) return &AuthResponse{ Id: uint32(idInt), @@ -219,7 +219,7 @@ func (s *AgentService) ListAgents(ctx context.Context, req *ListRequest) (*ListA agents := []models.Agent{} total, err := s.DBConnection.GetByPagination(&agents, page, filter, "", false) if err != nil { - catcher.Error("failed to fetch agents", err, nil) + catcher.Error("failed to fetch agents", err, map[string]any{"process": "agent-manager"}) return nil, status.Errorf(codes.Internal, "failed to fetch agents: %v", err) } @@ -267,7 +267,7 @@ func (s *AgentService) AgentStream(stream AgentService_AgentStreamServer) error switch msg := in.StreamMessage.(type) { case *BidirectionalStream_Result: - catcher.Info("Received command result from agent", map[string]any{"agent_id": msg.Result.AgentId, "result": msg.Result.Result}) + catcher.Info("Received command result from agent", map[string]any{"agent_id": msg.Result.AgentId, "result": msg.Result.Result, "process": "agent-manager"}) cmdID := msg.Result.GetCmdId() s.CommandResultChannelM.Lock() @@ -279,7 +279,7 @@ func (s *AgentService) AgentStream(stream AgentService_AgentStreamServer) error ExecutedAt: msg.Result.ExecutedAt, } } else { - catcher.Error("failed to find result channel for CmdID", nil, map[string]any{"cmdID": cmdID}) + catcher.Error("failed to find result channel for CmdID", nil, map[string]any{"cmdID": cmdID, "process": "agent-manager"}) } s.CommandResultChannelM.Unlock() } @@ -325,7 +325,7 @@ func (s *AgentService) ProcessCommand(stream PanelService_ProcessCommandServer) histCommand := createHistoryCommand(cmd, cmdID, uint(streamId)) err = s.DBConnection.Create(&histCommand) if err != nil { - catcher.Error("unable to create a new command history", err, nil) + catcher.Error("unable to create a new command history", err, map[string]any{"process": "agent-manager"}) } err = agentStream.Send(&BidirectionalStream{ @@ -349,7 +349,7 @@ func (s *AgentService) ProcessCommand(stream PanelService_ProcessCommandServer) cmd.AgentId, cmdID, ) if err != nil { - catcher.Error("failed to update command status", err, nil) + catcher.Error("failed to update command status", err, map[string]any{"process": "agent-manager"}) } err = stream.Send(result) @@ -370,7 +370,7 @@ func (s *AgentService) ListAgentCommands(ctx context.Context, req *ListRequest) commands := []models.AgentCommand{} total, err := s.DBConnection.GetByPagination(&commands, page, filter, "", false) if err != nil { - catcher.Error("failed to fetch agent commands", err, nil) + catcher.Error("failed to fetch agent commands", err, map[string]any{"process": "agent-manager"}) return nil, status.Errorf(codes.Internal, "failed to fetch agent commands: %v", err) } diff --git a/agent-manager/agent/collector_imp.go b/agent-manager/agent/collector_imp.go index 271ac5919..e0f27de69 100644 --- a/agent-manager/agent/collector_imp.go +++ b/agent-manager/agent/collector_imp.go @@ -63,7 +63,7 @@ func InitCollectorService() { collectors := []models.Collector{} _, err := CollectorServ.DBConnection.GetAll(&collectors, "") if err != nil { - catcher.Error("failed to fetch collectors", err, nil) + catcher.Error("failed to fetch collectors", err, map[string]any{"process": "agent-manager"}) os.Exit(1) } for _, c := range collectors { @@ -79,7 +79,7 @@ func InitCollectorService() { moduleConfig := &types.ConfigurationSection{} moduleConfig, err = client.GetUTMConfig(moduleType) if err != nil { - catcher.Error("failed to get module config", err, nil) + catcher.Error("failed to get module config", err, map[string]any{"process": "agent-manager"}) time.Sleep(5 * time.Second) continue external } @@ -89,7 +89,7 @@ func InitCollectorService() { var idInt int idInt, err = strconv.Atoi(group.CollectorID) if err != nil { - catcher.Error("invalid collector ID", err, nil) + catcher.Error("invalid collector ID", err, map[string]any{"process": "agent-manager"}) continue } @@ -131,7 +131,7 @@ func (s *CollectorService) RegisterCollector(ctx context.Context, req *RegisterR Key: oldCollector.CollectorKey, }, nil } else { - catcher.Error("collector already registered with different IP", nil, map[string]any{"hostname": oldCollector.Hostname, "module": oldCollector.Module, "id": oldCollector.ID}) + catcher.Error("collector already registered with different IP", nil, map[string]any{"hostname": oldCollector.Hostname, "module": oldCollector.Module, "id": oldCollector.ID, "process": "agent-manager"}) return nil, status.Errorf(codes.AlreadyExists, "hostname has already been registered") } } @@ -140,7 +140,7 @@ func (s *CollectorService) RegisterCollector(ctx context.Context, req *RegisterR collector.CollectorKey = key err = s.DBConnection.Create(collector) if err != nil { - catcher.Error("failed to create collector", err, nil) + catcher.Error("failed to create collector", err, map[string]any{"process": "agent-manager"}) return nil, status.Error(codes.Internal, fmt.Sprintf("failed to create collector: %v", err)) } @@ -154,7 +154,7 @@ func (s *CollectorService) RegisterCollector(ctx context.Context, req *RegisterR LastPing: time.Now(), } - catcher.Info("Collector registered correctly", map[string]any{"hostname": collector.Hostname, "module": collector.Module, "id": collector.ID}) + catcher.Info("Collector registered correctly", map[string]any{"hostname": collector.Hostname, "module": collector.Module, "id": collector.ID, "process": "agent-manager"}) return &AuthResponse{ Id: uint32(collector.ID), Key: key, @@ -173,12 +173,12 @@ func (s *CollectorService) DeleteCollector(ctx context.Context, req *DeleteReque err = s.DBConnection.Upsert(&models.Collector{}, "id = ?", map[string]interface{}{"deleted_by": req.DeletedBy}, id) if err != nil { - catcher.Error("unable to delete collector", err, nil) + catcher.Error("unable to delete collector", err, map[string]any{"process": "agent-manager"}) } err = s.DBConnection.Delete(&models.Collector{}, "id = ?", false, id) if err != nil { - catcher.Error("unable to delete collector", err, nil) + catcher.Error("unable to delete collector", err, map[string]any{"process": "agent-manager"}) return nil, status.Error(codes.Internal, fmt.Sprintf("unable to delete collector: %v", err.Error())) } @@ -190,7 +190,7 @@ func (s *CollectorService) DeleteCollector(ctx context.Context, req *DeleteReque delete(s.CollectorStreamMap, uint(idInt)) s.CollectorStreamMutex.Unlock() - catcher.Info("Collector deleted", map[string]any{"key": key, "deleted_by": req.DeletedBy}) + catcher.Info("Collector deleted", map[string]any{"key": key, "deleted_by": req.DeletedBy, "process": "agent-manager"}) return &AuthResponse{ Id: uint32(idInt), Key: key, @@ -204,7 +204,7 @@ func (s *CollectorService) ListCollector(ctx context.Context, req *ListRequest) collectors := []models.Collector{} total, err := s.DBConnection.GetByPagination(&collectors, page, filter, "", false) if err != nil { - catcher.Error("failed to fetch collectors", err, nil) + catcher.Error("failed to fetch collectors", err, map[string]any{"process": "agent-manager"}) return nil, status.Errorf(codes.Internal, "failed to fetch collectors: %v", err) } return convertModelToCollectorResponse(collectors, total), nil @@ -214,7 +214,7 @@ func (s *CollectorService) ProcessPendingConfigs() { for configs := range s.CollectorPendigConfigChan { collectorID, err := strconv.Atoi(configs.CollectorId) if err != nil { - catcher.Error("invalid collector ID", err, nil) + catcher.Error("invalid collector ID", err, map[string]any{"process": "agent-manager"}) continue } @@ -231,7 +231,7 @@ func (s *CollectorService) ProcessPendingConfigs() { }, }) if err != nil { - catcher.Error("failed to send config to collector", err, nil) + catcher.Error("failed to send config to collector", err, map[string]any{"process": "agent-manager"}) } } } @@ -276,7 +276,7 @@ func (s *CollectorService) CollectorStream(stream CollectorService_CollectorStre switch msg := in.StreamMessage.(type) { case *CollectorMessages_Result: - catcher.Info("Received Knowledge", map[string]any{"request_id": msg.Result.RequestId}) + catcher.Info("Received Knowledge", map[string]any{"request_id": msg.Result.RequestId, "process": "agent-manager"}) case *CollectorMessages_Config: // Not implemented diff --git a/agent-manager/agent/lastseen_imp.go b/agent-manager/agent/lastseen_imp.go index 6a877e982..60ec4ca9d 100644 --- a/agent-manager/agent/lastseen_imp.go +++ b/agent-manager/agent/lastseen_imp.go @@ -51,7 +51,7 @@ func (s *LastSeenService) InitPingSync() { for { _, err := s.DBConnection.GetAll(&pings, "") if err != nil { - catcher.Error("failed to get LastSeen items", err, nil) + catcher.Error("failed to get LastSeen items", err, map[string]any{"process": "agent-manager"}) time.Sleep(5 * time.Second) continue } @@ -78,7 +78,7 @@ func (s *LastSeenService) processPings() { } } - catcher.Info("processPings goroutine ended", nil) + catcher.Info("processPings goroutine ended", map[string]any{"process": "agent-manager"}) } func (s *LastSeenService) flushLastSeenToDB() { @@ -131,7 +131,7 @@ func (s *LastSeenService) flushLastSeenToDB() { for ping := range pingChan { err := s.DBConnection.Upsert(&ping, "connector_id = ?", nil, ping.ConnectorID) if err != nil { - catcher.Error("failed to save LastSeen item for connector", err, map[string]any{"connector_id": ping.ConnectorID}) + catcher.Error("failed to save LastSeen item for connector", err, map[string]any{"connector_id": ping.ConnectorID, "process": "agent-manager"}) select { case errorChan <- err: default: diff --git a/agent-manager/agent/parser.go b/agent-manager/agent/parser.go index 973dfe837..3dae283d7 100644 --- a/agent-manager/agent/parser.go +++ b/agent-manager/agent/parser.go @@ -40,7 +40,7 @@ func createHistoryCommand(cmd *UtmCommand, cmdID string, agentId uint) *models.A func parseAgentToProto(agent models.Agent) *Agent { agentStatus, lastSeen, err := LastSeenServ.GetLastSeenStatus(agent.ID, "agent") if err != nil { - catcher.Error("failed to get last seen status for agent", err, map[string]any{"agent": agent.ID}) + catcher.Error("failed to get last seen status for agent", err, map[string]any{"agent": agent.ID, "process": "agent-manager"}) } agentResult := &Agent{ Id: uint32(agent.ID), @@ -108,7 +108,7 @@ func replaceSecretValues(input string) string { func modelToProtoCollector(model models.Collector) *Collector { collectorStatus, lastSeen, err := LastSeenServ.GetLastSeenStatus(model.ID, "collector") if err != nil { - catcher.Error("failed to get last seen status for collector", err, map[string]any{"model": model.ID}) + catcher.Error("failed to get last seen status for collector", err, map[string]any{"model": model.ID, "process": "agent-manager"}) } return &Collector{ Id: int32(model.ID), diff --git a/agent-manager/agent/utmgrpc.go b/agent-manager/agent/utmgrpc.go index 6b2d9c01a..476de475f 100644 --- a/agent-manager/agent/utmgrpc.go +++ b/agent-manager/agent/utmgrpc.go @@ -16,7 +16,7 @@ import ( func InitGrpcServer() { err := InitAgentService() if err != nil { - catcher.Error("failed to init agent service", err, nil) + catcher.Error("failed to init agent service", err, map[string]any{"process": "agent-manager"}) os.Exit(1) } @@ -29,13 +29,13 @@ func InitGrpcServer() { func StartGrpcServer() { listener, err := net.Listen("tcp", "0.0.0.0:50051") if err != nil { - catcher.Error("failed to listen", err, nil) + catcher.Error("failed to listen", err, map[string]any{"process": "agent-manager"}) os.Exit(1) } loadedCert, err := tls.LoadX509KeyPair(config.CertPath, config.CertKeyPath) if err != nil { - catcher.Error("failed to load TLS credentials: %v", err, nil) + catcher.Error("failed to load TLS credentials: %v", err, map[string]any{"process": "agent-manager"}) os.Exit(1) } @@ -59,9 +59,9 @@ func StartGrpcServer() { grpc_health_v1.RegisterHealthServer(grpcServer, healthServer) healthServer.SetServingStatus("", grpc_health_v1.HealthCheckResponse_SERVING) - catcher.Info("Starting gRPC server on 0.0.0.0:50051", nil) + catcher.Info("Starting gRPC server on 0.0.0.0:50051", map[string]any{"process": "agent-manager"}) if err := grpcServer.Serve(listener); err != nil { - catcher.Error("failed to serve", err, nil) + catcher.Error("failed to serve", err, map[string]any{"process": "agent-manager"}) os.Exit(1) } } diff --git a/agent-manager/go.mod b/agent-manager/go.mod index 1352089a5..963cb0ebe 100644 --- a/agent-manager/go.mod +++ b/agent-manager/go.mod @@ -1,34 +1,39 @@ module github.com/utmstack/UTMStack/agent-manager -go 1.24.2 +go 1.25.5 require ( github.com/AtlasInsideCorp/AtlasInsideAES v1.0.0 - github.com/gin-contrib/gzip v1.2.3 - github.com/gin-gonic/gin v1.10.1 + github.com/gin-contrib/gzip v1.2.5 + github.com/gin-gonic/gin v1.11.0 github.com/google/uuid v1.6.0 github.com/utmstack/config-client-go v1.2.7 - google.golang.org/grpc v1.74.2 - google.golang.org/protobuf v1.36.6 + google.golang.org/grpc v1.78.0 + google.golang.org/protobuf v1.36.11 gorm.io/driver/postgres v1.6.0 - gorm.io/gorm v1.30.0 + gorm.io/gorm v1.31.1 ) -require github.com/kr/text v0.2.0 // indirect +require ( + github.com/bytedance/gopkg v0.1.3 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect +) require ( - github.com/bytedance/sonic v1.14.0 // indirect - github.com/bytedance/sonic/loader v0.3.0 // indirect - github.com/cloudwego/base64x v0.1.5 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect github.com/gin-contrib/sse v1.1.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.27.0 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect github.com/goccy/go-json v0.10.5 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect - github.com/jackc/pgx/v5 v5.7.5 // indirect + github.com/jackc/pgx/v5 v5.8.0 // indirect github.com/jackc/puddle/v2 v2.2.2 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect @@ -39,15 +44,14 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect - github.com/threatwinds/go-sdk v1.0.45 + github.com/threatwinds/go-sdk v1.1.7 github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.3.0 // indirect - golang.org/x/arch v0.19.0 // indirect - golang.org/x/crypto v0.40.0 // indirect - golang.org/x/net v0.42.0 // indirect - golang.org/x/sync v0.16.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/text v0.27.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect + github.com/ugorji/go/codec v1.3.1 // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect ) diff --git a/agent-manager/go.sum b/agent-manager/go.sum index 39d1ca794..af8fa8767 100644 --- a/agent-manager/go.sum +++ b/agent-manager/go.sum @@ -1,25 +1,25 @@ github.com/AtlasInsideCorp/AtlasInsideAES v1.0.0 h1:TBiBl9KCa4i4epY0/q9WSC4ugavL6+6JUkOXWDnMM6I= github.com/AtlasInsideCorp/AtlasInsideAES v1.0.0/go.mod h1:cRhQ3TS/VEfu/z+qaciyuDZdtxgaXgaX8+G6Wa5NzBk= -github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= -github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= -github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= +github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= -github.com/gin-contrib/gzip v1.2.3 h1:dAhT722RuEG330ce2agAs75z7yB+NKvX/ZM1r8w0u2U= -github.com/gin-contrib/gzip v1.2.3/go.mod h1:ad72i4Bzmaypk8M762gNXa2wkxxjbz0icRNnuLJ9a/c= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= +github.com/gin-contrib/gzip v1.2.5 h1:fIZs0S+l17pIu1P5XRJOo/YNqfIuPCrZZ3TWB7pjckI= +github.com/gin-contrib/gzip v1.2.5/go.mod h1:aomRgR7ftdZV3uWY0gW/m8rChfxau0n8YVvwlOHONzw= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= -github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= -github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -30,10 +30,12 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= @@ -45,8 +47,8 @@ github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsI github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= -github.com/jackc/pgx/v5 v5.7.5 h1:JHGfMnQY+IEtGM63d+NGMjoRpysB2JBwDr5fsngwmJs= -github.com/jackc/pgx/v5 v5.7.5/go.mod h1:aruU7o91Tc2q2cFp5h4uP3f6ztExVpyVv88Xl/8Vl8M= +github.com/jackc/pgx/v5 v5.8.0 h1:TYPDoleBBme0xGSAX3/+NujXXtpZn9HBONkQC7IEZSo= +github.com/jackc/pgx/v5 v5.8.0/go.mod h1:QVeDInX2m9VyzvNeiCJVjCkNFqzsNb43204HshNSZKw= github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= @@ -55,14 +57,8 @@ github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= @@ -74,67 +70,73 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/threatwinds/go-sdk v1.0.45 h1:KZ3s3HviNRrOkg5EqjFnoauANFFzTqjNFyshPLY2SoI= -github.com/threatwinds/go-sdk v1.0.45/go.mod h1:tcWn6r6vqID/W/nL3UKfc5NafA3V/cSkiLvfJnwB58c= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo= +github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= -github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= github.com/utmstack/config-client-go v1.2.7 h1:JeRdI5JjH1liNzMW3LmyevjuPd67J/yt9MAO3+oJAuM= github.com/utmstack/config-client-go v1.2.7/go.mod h1:kM0KoUizM9ZlcQp0qKviGTWn/+anT5Rfjx3zfZk79nM= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= -go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= -go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= -go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= -golang.org/x/arch v0.19.0 h1:LmbDQUodHThXE+htjrnmVD73M//D9GTH6wFZjyDkjyU= -golang.org/x/arch v0.19.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= -golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= -golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 h1:qJW29YvkiJmXOYMu5Tf8lyrTp3dOS+K4z6IixtLaCf8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/driver/postgres v1.6.0 h1:2dxzU8xJ+ivvqTRph34QX+WrRaJlmfyPqXmoGVjMBa4= gorm.io/driver/postgres v1.6.0/go.mod h1:vUw0mrGgrTK+uPHEhAdV4sfFELrByKVGnaVRkXDhtWo= -gorm.io/gorm v1.30.0 h1:qbT5aPv1UH8gI99OsRlvDToLxW5zR7FzS9acZDOZcgs= -gorm.io/gorm v1.30.0/go.mod h1:8Z33v652h4//uMA76KjeDH8mJXPm1QNCYrMeatR0DOE= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= +gorm.io/gorm v1.31.1 h1:7CA8FTFz/gRfgqgpeKIBcervUn3xSyPUmr6B2WXJ7kg= +gorm.io/gorm v1.31.1/go.mod h1:XyQVbO2k6YkOis7C2437jSit3SsDK72s7n7rsSHd+Gs= diff --git a/agent-manager/main.go b/agent-manager/main.go index 227e656f1..b8c64e77b 100644 --- a/agent-manager/main.go +++ b/agent-manager/main.go @@ -10,11 +10,11 @@ import ( ) func main() { - catcher.Info("Starting Agent Manager v1.0.0 ...", nil) + catcher.Info("Starting Agent Manager", map[string]any{"process": "agent-manager"}) err := database.MigrateDatabase() if err != nil { - catcher.Error("failed to migrate database", err, nil) + _ = catcher.Error("failed to migrate database", err, map[string]any{"process": "agent-manager"}) os.Exit(1) } diff --git a/agent-manager/updates/updates.go b/agent-manager/updates/updates.go index 71642889a..2aad922ea 100644 --- a/agent-manager/updates/updates.go +++ b/agent-manager/updates/updates.go @@ -17,7 +17,7 @@ func InitUpdatesManager() { } func ServeDependencies() { - catcher.Info("Serving dependencies", map[string]any{"path": config.UpdatesDependenciesFolder}) + catcher.Info("Serving dependencies", map[string]any{"path": config.UpdatesDependenciesFolder, "process": "agent-manager"}) gin.SetMode(gin.ReleaseMode) r := gin.New() @@ -33,7 +33,7 @@ func ServeDependencies() { loadedCert, err := tls.LoadX509KeyPair(config.CertPath, config.CertKeyPath) if err != nil { - catcher.Error("failed to load TLS credentials", err, nil) + catcher.Error("failed to load TLS credentials", err, map[string]any{"process": "agent-manager"}) os.Exit(1) } @@ -55,9 +55,9 @@ func ServeDependencies() { TLSConfig: tlsConfig, } - catcher.Info("Starting HTTP server on port 8080", nil) + catcher.Info("Starting HTTP server on port 8080", map[string]any{"process": "agent-manager"}) if err := server.ListenAndServeTLS("", ""); err != nil { - catcher.Error("error starting HTTP server", err, nil) + catcher.Error("error starting HTTP server", err, map[string]any{"process": "agent-manager"}) return } } diff --git a/agent/go.mod b/agent/go.mod index 1622d8e6c..504232f94 100644 --- a/agent/go.mod +++ b/agent/go.mod @@ -1,74 +1,79 @@ module github.com/utmstack/UTMStack/agent -go 1.24.2 +go 1.25.5 require ( github.com/AtlasInsideCorp/AtlasInsideAES v1.0.0 - github.com/elastic/go-sysinfo v1.15.3 + github.com/elastic/go-sysinfo v1.15.4 github.com/glebarez/sqlite v1.11.0 github.com/google/uuid v1.6.0 - github.com/kardianos/service v1.2.2 + github.com/kardianos/service v1.2.4 github.com/tehmaze/netflow v0.0.0-20240303214733-8c13bb004068 - github.com/threatwinds/go-sdk v1.0.43 - github.com/threatwinds/logger v1.2.2 - golang.org/x/sys v0.34.0 - google.golang.org/grpc v1.74.2 - google.golang.org/protobuf v1.36.6 + github.com/threatwinds/go-sdk v1.1.7 + github.com/threatwinds/logger v1.2.3 + golang.org/x/sys v0.40.0 + google.golang.org/grpc v1.78.0 + google.golang.org/protobuf v1.36.11 gopkg.in/yaml.v2 v2.4.0 - gorm.io/gorm v1.30.0 + gorm.io/gorm v1.31.1 ) require ( - cel.dev/expr v0.24.0 // indirect + cel.dev/expr v0.25.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/bytedance/sonic v1.14.0 // indirect - github.com/bytedance/sonic/loader v0.3.0 // indirect - github.com/cloudwego/base64x v0.1.5 // indirect + github.com/bytedance/gopkg v0.1.3 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/elastic/go-windows v1.0.2 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect github.com/gin-contrib/sse v1.1.0 // indirect - github.com/gin-gonic/gin v1.10.1 // indirect + github.com/gin-gonic/gin v1.11.0 // indirect github.com/glebarez/go-sqlite v1.22.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.27.0 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect github.com/goccy/go-json v0.10.5 // indirect - github.com/google/cel-go v0.26.0 // indirect - github.com/google/pprof v0.0.0-20250607225305-033d6d78b36a // indirect + github.com/goccy/go-yaml v1.19.2 // indirect + github.com/google/cel-go v0.26.1 // indirect + github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect - github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/ncruces/go-strftime v0.1.9 // indirect + github.com/ncruces/go-strftime v1.0.0 // indirect + github.com/opensearch-project/opensearch-go/v4 v4.6.0 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect - github.com/prometheus/procfs v0.16.1 // indirect + github.com/prometheus/procfs v0.19.2 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/stoewer/go-strcase v1.3.1 // indirect github.com/tidwall/gjson v1.18.0 // indirect - github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.3.0 // indirect - go.yaml.in/yaml/v2 v2.4.2 // indirect - golang.org/x/arch v0.19.0 // indirect - golang.org/x/crypto v0.40.0 // indirect - golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 // indirect - golang.org/x/net v0.42.0 // indirect - golang.org/x/text v0.27.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 // indirect + github.com/ugorji/go/codec v1.3.1 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/text v0.33.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect howett.net/plist v1.0.1 // indirect - modernc.org/libc v1.66.0 // indirect + modernc.org/libc v1.67.6 // indirect modernc.org/mathutil v1.7.1 // indirect modernc.org/memory v1.11.0 // indirect - modernc.org/sqlite v1.38.0 // indirect - sigs.k8s.io/yaml v1.5.0 // indirect + modernc.org/sqlite v1.44.2 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/agent/go.sum b/agent/go.sum index 75f83f153..e02ad3a63 100644 --- a/agent/go.sum +++ b/agent/go.sum @@ -1,33 +1,33 @@ -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= github.com/AtlasInsideCorp/AtlasInsideAES v1.0.0 h1:TBiBl9KCa4i4epY0/q9WSC4ugavL6+6JUkOXWDnMM6I= github.com/AtlasInsideCorp/AtlasInsideAES v1.0.0/go.mod h1:cRhQ3TS/VEfu/z+qaciyuDZdtxgaXgaX8+G6Wa5NzBk= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= -github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= -github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= +github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/elastic/go-sysinfo v1.15.3 h1:W+RnmhKFkqPTCRoFq2VCTmsT4p/fwpo+3gKNQsn1XU0= -github.com/elastic/go-sysinfo v1.15.3/go.mod h1:K/cNrqYTDrSoMh2oDkYEMS2+a72GRxMvNP+GC+vRIlo= +github.com/elastic/go-sysinfo v1.15.4 h1:A3zQcunCxik14MgXu39cXFXcIw2sFXZ0zL886eyiv1Q= +github.com/elastic/go-sysinfo v1.15.4/go.mod h1:ZBVXmqS368dOn/jvijV/zHLfakWTYHBZPk3G244lHrU= github.com/elastic/go-windows v1.0.2 h1:yoLLsAsV5cfg9FLhZ9EXZ2n2sQFKeDYrHenkcivY4vI= github.com/elastic/go-windows v1.0.2/go.mod h1:bGcDpBzXgYSqM0Gx3DM4+UxFj300SZLixie9u9ixLM8= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= -github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= -github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= github.com/glebarez/go-sqlite v1.22.0 h1:uAcMJhaA6r3LHMTFgP0SifzgXg46yJkgxqyuyec+ruQ= github.com/glebarez/go-sqlite v1.22.0/go.mod h1:PlBIdHe0+aUEFn+r2/uthrWq4FxbzugL0L8Li6yQJbc= github.com/glebarez/sqlite v1.11.0 h1:wSG0irqzP6VurnMEpFGer5Li19RpIRi2qvQz++w0GMw= @@ -42,21 +42,25 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= -github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20250607225305-033d6d78b36a h1://KbezygeMJZCSHH+HgUZiTeSoiuFspbMg1ge+eFj18= -github.com/google/pprof v0.0.0-20250607225305-033d6d78b36a/go.mod h1:5hDyRhoBCxViHszMt12TnOpEI4VVi+U8Gm9iphldiMA= +github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 h1:z2ogiKUYzX5Is6zr/vP9vJGqPwcdqsWjOt+V8J7+bTc= +github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= @@ -64,12 +68,10 @@ github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kardianos/service v1.2.2 h1:ZvePhAHfvo0A7Mftk/tEzqEZ7Q4lgnR8sGz4xu1YX60= -github.com/kardianos/service v1.2.2/go.mod h1:CIMRFEJVL+0DS1a3Nx06NaMn4Dz63Ng6O7dl0qH0zVM= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/kardianos/service v1.2.4 h1:XNlGtZOYNx2u91urOdg/Kfmc+gfmuIo1Dd3rEi2OgBk= +github.com/kardianos/service v1.2.4/go.mod h1:E4V9ufUuY82F7Ztlu1eN9VXWIQxg8NoLQlmFe0MtrXc= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -83,91 +85,109 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= -github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= +github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w= +github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= +github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc= +github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= -github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/procfs v0.19.2 h1:zUMhqEW66Ex7OXIiDkll3tl9a1ZdilUOd/F6ZXw4Vws= +github.com/prometheus/procfs v0.19.2/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/tehmaze/netflow v0.0.0-20240303214733-8c13bb004068 h1:1B+EAUqxEyPByCfk55tB21DtR7WF7Q2w71g7+uVkvIg= github.com/tehmaze/netflow v0.0.0-20240303214733-8c13bb004068/go.mod h1:QRP5wJOf7gGMGL2fCAfmh/5CMZQspRxT5DqghaPRrjM= -github.com/threatwinds/go-sdk v1.0.43 h1:q2Pl0DvmFpeBCs5sZRcsG1oDn2zIoIB5vHwcJ/VDgD8= -github.com/threatwinds/go-sdk v1.0.43/go.mod h1:S0R7kQj2BsTgaYnX6eZ3keEFRy9yt4f9SCEKYMJzD6g= -github.com/threatwinds/logger v1.2.2 h1:sVuT8yhbecPqP4tT8EwHfp1czNC6e1wdkE1ihNnuBdA= -github.com/threatwinds/logger v1.2.2/go.mod h1:Amq0QI1y7fkTpnBUgeGVu2Z/C4u4ys2pNLUOuj3UAAU= +github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo= +github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw= +github.com/threatwinds/logger v1.2.3 h1:V2SVAXzbq+/huCvIWOfqzMTH+WBHJxankyBgVG2hy1Y= +github.com/threatwinds/logger v1.2.3/go.mod h1:N+bJKvF4FQNJZLfQpVYWpr6D8iEAFnAQfHYqH5iR1TI= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= +github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= -github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= -go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= -go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= -go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= -go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= -go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= -go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= -go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= -golang.org/x/arch v0.19.0 h1:LmbDQUodHThXE+htjrnmVD73M//D9GTH6wFZjyDkjyU= -golang.org/x/arch v0.19.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 h1:R9PFI6EUdfVKgwKjZef7QIwGcBKu86OEFpJ9nUEP2l4= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc= -golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg= -golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= -golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= -golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ= +github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= +golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c= +golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= -golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0= -golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 h1:mVXdvnmR3S3BQOqHECm9NGMjYiRtEvDYcqAqedTXY6s= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 h1:qJW29YvkiJmXOYMu5Tf8lyrTp3dOS+K4z6IixtLaCf8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc= +golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -179,22 +199,24 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/gorm v1.30.0 h1:qbT5aPv1UH8gI99OsRlvDToLxW5zR7FzS9acZDOZcgs= -gorm.io/gorm v1.30.0/go.mod h1:8Z33v652h4//uMA76KjeDH8mJXPm1QNCYrMeatR0DOE= +gorm.io/gorm v1.31.1 h1:7CA8FTFz/gRfgqgpeKIBcervUn3xSyPUmr6B2WXJ7kg= +gorm.io/gorm v1.31.1/go.mod h1:XyQVbO2k6YkOis7C2437jSit3SsDK72s7n7rsSHd+Gs= howett.net/plist v1.0.1 h1:37GdZ8tP09Q35o9ych3ehygcsL+HqKSwzctveSlarvM= howett.net/plist v1.0.1/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= -modernc.org/cc/v4 v4.26.1 h1:+X5NtzVBn0KgsBCBe+xkDC7twLb/jNVj9FPgiwSQO3s= -modernc.org/cc/v4 v4.26.1/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0= -modernc.org/ccgo/v4 v4.28.0 h1:rjznn6WWehKq7dG4JtLRKxb52Ecv8OUGah8+Z/SfpNU= -modernc.org/ccgo/v4 v4.28.0/go.mod h1:JygV3+9AV6SmPhDasu4JgquwU81XAKLd3OKTUDNOiKE= -modernc.org/fileutil v1.3.3 h1:3qaU+7f7xxTUmvU1pJTZiDLAIoJVdUSSauJNHg9yXoA= -modernc.org/fileutil v1.3.3/go.mod h1:HxmghZSZVAz/LXcMNwZPA/DRrQZEVP9VX0V4LQGQFOc= +modernc.org/cc/v4 v4.27.1 h1:9W30zRlYrefrDV2JE2O8VDtJ1yPGownxciz5rrbQZis= +modernc.org/cc/v4 v4.27.1/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0= +modernc.org/ccgo/v4 v4.30.1 h1:4r4U1J6Fhj98NKfSjnPUN7Ze2c6MnAdL0hWw6+LrJpc= +modernc.org/ccgo/v4 v4.30.1/go.mod h1:bIOeI1JL54Utlxn+LwrFyjCx2n2RDiYEaJVSrgdrRfM= +modernc.org/fileutil v1.3.40 h1:ZGMswMNc9JOCrcrakF1HrvmergNLAmxOPjizirpfqBA= +modernc.org/fileutil v1.3.40/go.mod h1:HxmghZSZVAz/LXcMNwZPA/DRrQZEVP9VX0V4LQGQFOc= modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI= modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito= -modernc.org/goabi0 v0.0.3 h1:y81b9r3asCh6Xtse6Nz85aYGB0cG3M3U6222yap1KWI= -modernc.org/goabi0 v0.0.3/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI= -modernc.org/libc v1.66.0 h1:eoFuDb1ozurUY5WSWlgvxHp0FuL+AncMwNjFqGYMJPQ= -modernc.org/libc v1.66.0/go.mod h1:AiZxInURfEJx516LqEaFcrC+X38rt9G7+8ojIXQKHbo= +modernc.org/gc/v3 v3.1.1 h1:k8T3gkXWY9sEiytKhcgyiZ2L0DTyCQ/nvX+LoCljoRE= +modernc.org/gc/v3 v3.1.1/go.mod h1:HFK/6AGESC7Ex+EZJhJ2Gni6cTaYpSMmU/cT9RmlfYY= +modernc.org/goabi0 v0.2.0 h1:HvEowk7LxcPd0eq6mVOAEMai46V+i7Jrj13t4AzuNks= +modernc.org/goabi0 v0.2.0/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI= +modernc.org/libc v1.67.6 h1:eVOQvpModVLKOdT+LvBPjdQqfrZq+pC39BygcT+E7OI= +modernc.org/libc v1.67.6/go.mod h1:JAhxUVlolfYDErnwiqaLvUqc8nfb2r6S6slAgZOnaiE= modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI= @@ -203,12 +225,11 @@ modernc.org/opt v0.1.4 h1:2kNGMRiUjrp4LcaPuLY2PzUfqM/w9N23quVwhKt5Qm8= modernc.org/opt v0.1.4/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns= modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w= modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE= -modernc.org/sqlite v1.38.0 h1:+4OrfPQ8pxHKuWG4md1JpR/EYAh3Md7TdejuuzE7EUI= -modernc.org/sqlite v1.38.0/go.mod h1:1Bj+yES4SVvBZ4cBOpVZ6QgesMCKpJZDq0nxYzOpmNE= +modernc.org/sqlite v1.44.2 h1:EdYqXeBpKFJjg8QYnw6E71MpANkoxyuYi+g68ugOL8g= +modernc.org/sqlite v1.44.2/go.mod h1:CzbrU2lSB1DKUusvwGz7rqEKIq+NUd8GWuBBZDs9/nA= modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0= modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A= modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ= -sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/agent/updater/go.mod b/agent/updater/go.mod index 8b6343295..8b7e97c5f 100644 --- a/agent/updater/go.mod +++ b/agent/updater/go.mod @@ -1,46 +1,49 @@ module github.com/utmstack/UTMStack/agent/updater -go 1.25.0 +go 1.25.5 require ( - github.com/kardianos/service v1.2.2 - github.com/threatwinds/go-sdk v1.0.40 - github.com/threatwinds/logger v1.2.2 - gopkg.in/yaml.v3 v3.0.1 - + github.com/kardianos/service v1.2.4 + github.com/threatwinds/go-sdk v1.1.7 + github.com/threatwinds/logger v1.2.3 + gopkg.in/yaml.v3 v3.0.1 ) require ( - github.com/bytedance/sonic v1.13.3 // indirect - github.com/bytedance/sonic/loader v0.2.4 // indirect - github.com/cloudwego/base64x v0.1.5 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/bytedance/gopkg v0.1.3 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect github.com/gin-contrib/sse v1.1.0 // indirect - github.com/gin-gonic/gin v1.10.1 // indirect + github.com/gin-gonic/gin v1.11.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.26.0 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect github.com/goccy/go-json v0.10.5 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect github.com/google/uuid v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/cpuid/v2 v2.2.10 // indirect - github.com/kr/text v0.2.0 // indirect + github.com/klauspost/cpuid/v2 v2.3.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect github.com/tidwall/gjson v1.18.0 // indirect - github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.2.14 // indirect - golang.org/x/arch v0.18.0 // indirect - golang.org/x/crypto v0.39.0 // indirect - golang.org/x/net v0.41.0 // indirect - golang.org/x/sys v0.33.0 // indirect - golang.org/x/text v0.26.0 // indirect - google.golang.org/protobuf v1.36.6 // indirect + github.com/ugorji/go/codec v1.3.1 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + google.golang.org/protobuf v1.36.11 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect - sigs.k8s.io/yaml v1.4.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/agent/updater/go.sum b/agent/updater/go.sum index 23d1acc42..c710c1a04 100644 --- a/agent/updater/go.sum +++ b/agent/updater/go.sum @@ -1,32 +1,33 @@ -github.com/bytedance/sonic v1.13.3 h1:MS8gmaH16Gtirygw7jV91pDCN33NyMrPbN7qiYhEsF0= -github.com/bytedance/sonic v1.13.3/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1+KgkJhz4= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.2.4 h1:ZWCw4stuXUsn1/+zQDqeE7JKP+QO47tz7QCNan80NzY= -github.com/bytedance/sonic/loader v0.2.4/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= +github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= -github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= -github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.26.0 h1:SP05Nqhjcvz81uJaRfEV0YBSSSGMc/iMaVtFbr3Sw2k= -github.com/go-playground/validator/v10 v10.26.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -34,12 +35,10 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kardianos/service v1.2.2 h1:ZvePhAHfvo0A7Mftk/tEzqEZ7Q4lgnR8sGz4xu1YX60= -github.com/kardianos/service v1.2.2/go.mod h1:CIMRFEJVL+0DS1a3Nx06NaMn4Dz63Ng6O7dl0qH0zVM= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= -github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= +github.com/kardianos/service v1.2.4 h1:XNlGtZOYNx2u91urOdg/Kfmc+gfmuIo1Dd3rEi2OgBk= +github.com/kardianos/service v1.2.4/go.mod h1:E4V9ufUuY82F7Ztlu1eN9VXWIQxg8NoLQlmFe0MtrXc= +github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= +github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -55,49 +54,61 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/threatwinds/go-sdk v1.0.40 h1:g0XS8WiGVGD6djucY0ZuckpZljBbXDuqGJ1dKOjce3I= -github.com/threatwinds/go-sdk v1.0.40/go.mod h1:ZLcT5kB0s2xFEUVJoFpwlLucnbQ8VBNU44aoKKC/j/g= -github.com/threatwinds/logger v1.2.2 h1:sVuT8yhbecPqP4tT8EwHfp1czNC6e1wdkE1ihNnuBdA= -github.com/threatwinds/logger v1.2.2/go.mod h1:Amq0QI1y7fkTpnBUgeGVu2Z/C4u4ys2pNLUOuj3UAAU= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo= +github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw= +github.com/threatwinds/logger v1.2.3 h1:V2SVAXzbq+/huCvIWOfqzMTH+WBHJxankyBgVG2hy1Y= +github.com/threatwinds/logger v1.2.3/go.mod h1:N+bJKvF4FQNJZLfQpVYWpr6D8iEAFnAQfHYqH5iR1TI= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= +github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.2.14 h1:yOQvXCBc3Ij46LRkRoh4Yd5qK6LVOgi0bYOXfb7ifjw= -github.com/ugorji/go/codec v1.2.14/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= -golang.org/x/arch v0.18.0 h1:WN9poc33zL4AzGxqf8VtpKUnGvMi8O9lhNyBMF/85qc= -golang.org/x/arch v0.18.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= -golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM= -golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U= -golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= -golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= -golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= -golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= -golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -106,6 +117,5 @@ gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYs gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/agent/updater/utils/zip.go b/agent/updater/utils/zip.go index e8c8381b8..ecb690a38 100644 --- a/agent/updater/utils/zip.go +++ b/agent/updater/utils/zip.go @@ -16,27 +16,37 @@ func Unzip(zipFile, destPath string) error { defer archive.Close() for _, f := range archive.File { - filePath := path.Join(destPath, f.Name) - if f.FileInfo().IsDir() { - os.MkdirAll(filePath, os.ModePerm) - continue - } - if err := os.MkdirAll(filepath.Dir(filePath), os.ModePerm); err != nil { - return err - } - dstFile, err := os.OpenFile(filePath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, f.Mode()) - if err != nil { - return err - } - fileInArchive, err := f.Open() + err := func() error { + filePath := path.Join(destPath, f.Name) + if f.FileInfo().IsDir() { + os.MkdirAll(filePath, os.ModePerm) + return nil + } + if err := os.MkdirAll(filepath.Dir(filePath), os.ModePerm); err != nil { + return err + } + + dstFile, err := os.OpenFile(filePath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, f.Mode()) + if err != nil { + return err + } + defer dstFile.Close() + + fileInArchive, err := f.Open() + if err != nil { + return err + } + defer fileInArchive.Close() + + if _, err := io.Copy(dstFile, fileInArchive); err != nil { + return err + } + + return nil + }() if err != nil { return err } - if _, err := io.Copy(dstFile, fileInArchive); err != nil { - return err - } - dstFile.Close() - fileInArchive.Close() } return nil } diff --git a/agent/utils/files.go b/agent/utils/files.go index 51da99255..2fcfa2bef 100644 --- a/agent/utils/files.go +++ b/agent/utils/files.go @@ -101,6 +101,8 @@ func GenerateFromTemplate(data interface{}, templateFile string, configFile stri return err } + defer writer.Close() + err = ut.Execute(writer, data) if err != nil { return err @@ -132,6 +134,7 @@ func ReadFileLines(path string) ([]string, error) { if err != nil { return nil, err } + defer file.Close() var lines []string @@ -148,6 +151,7 @@ func IsDirEmpty(path string) (bool, error) { if err != nil { return false, err } + defer f.Close() _, err = f.Readdirnames(1) @@ -163,12 +167,14 @@ func copyFile(src, dst string) error { if err != nil { return err } + defer sourceFile.Close() destFile, err := os.Create(dst) if err != nil { return err } + defer destFile.Close() _, err = io.Copy(destFile, sourceFile) diff --git a/agent/utils/zip.go b/agent/utils/zip.go index e8c8381b8..ecb690a38 100644 --- a/agent/utils/zip.go +++ b/agent/utils/zip.go @@ -16,27 +16,37 @@ func Unzip(zipFile, destPath string) error { defer archive.Close() for _, f := range archive.File { - filePath := path.Join(destPath, f.Name) - if f.FileInfo().IsDir() { - os.MkdirAll(filePath, os.ModePerm) - continue - } - if err := os.MkdirAll(filepath.Dir(filePath), os.ModePerm); err != nil { - return err - } - dstFile, err := os.OpenFile(filePath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, f.Mode()) - if err != nil { - return err - } - fileInArchive, err := f.Open() + err := func() error { + filePath := path.Join(destPath, f.Name) + if f.FileInfo().IsDir() { + os.MkdirAll(filePath, os.ModePerm) + return nil + } + if err := os.MkdirAll(filepath.Dir(filePath), os.ModePerm); err != nil { + return err + } + + dstFile, err := os.OpenFile(filePath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, f.Mode()) + if err != nil { + return err + } + defer dstFile.Close() + + fileInArchive, err := f.Open() + if err != nil { + return err + } + defer fileInArchive.Close() + + if _, err := io.Copy(dstFile, fileInArchive); err != nil { + return err + } + + return nil + }() if err != nil { return err } - if _, err := io.Copy(dstFile, fileInArchive); err != nil { - return err - } - dstFile.Close() - fileInArchive.Close() } return nil } diff --git a/backend/src/main/java/com/park/utmstack/config/RestTemplateConfiguration.java b/backend/src/main/java/com/park/utmstack/config/RestTemplateConfiguration.java index a67a43fd7..5af8523ff 100644 --- a/backend/src/main/java/com/park/utmstack/config/RestTemplateConfiguration.java +++ b/backend/src/main/java/com/park/utmstack/config/RestTemplateConfiguration.java @@ -9,7 +9,9 @@ import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.http.client.ClientHttpResponse; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; +import org.springframework.web.client.DefaultResponseErrorHandler; import org.springframework.web.client.RestTemplate; import javax.net.ssl.HostnameVerifier; @@ -37,6 +39,19 @@ public RestTemplate restTemplateWithSsl() { return rest; } + @Bean(name = "rawRestTemplate") + public RestTemplate rawRestTemplate() { + RestTemplate rest = new RestTemplate(); + rest.setErrorHandler(new DefaultResponseErrorHandler() { + @Override + public boolean hasError(ClientHttpResponse response) { + return false; + } + }); + return rest; + } + + private HttpComponentsClientHttpRequestFactory clientHttpRequestFactory() { final String ctx = CLASSNAME + ".clientHttpRequestFactory"; try { diff --git a/backend/src/main/java/com/park/utmstack/domain/correlation/rules/UtmCorrelationRules.java b/backend/src/main/java/com/park/utmstack/domain/correlation/rules/UtmCorrelationRules.java index 2df7f39b2..b81abf8d6 100644 --- a/backend/src/main/java/com/park/utmstack/domain/correlation/rules/UtmCorrelationRules.java +++ b/backend/src/main/java/com/park/utmstack/domain/correlation/rules/UtmCorrelationRules.java @@ -110,6 +110,10 @@ public class UtmCorrelationRules implements Serializable { @Setter(AccessLevel.NONE) private List afterEvents; + @JsonIgnore + @Column(name = "rule_group_by_def") + private String ruleGroupByDef; + @JsonIgnore @Column(name = "rule_deduplicate_by_def") private String deduplicateByDef; @@ -136,6 +140,28 @@ public void setDeduplicateBy(List deduplicateBy) throws UtmSerialization this.deduplicateBy = deduplicateBy; } + @Transient + @JsonSerialize + @JsonDeserialize + @Getter(AccessLevel.NONE) + @Setter(AccessLevel.NONE) + private List groupBy; + + public List getGroupBy() throws UtmSerializationException { + if (StringUtils.hasText(ruleGroupByDef)) + groupBy = UtilSerializer.jsonDeserializeList(String.class, ruleGroupByDef); + return groupBy == null ? new ArrayList<>() : groupBy; + } + + public void setGroupBy(List groupBy) throws UtmSerializationException { + if (CollectionUtils.isEmpty(groupBy)) + this.ruleGroupByDef = null; + else + this.ruleGroupByDef = UtilSerializer.jsonSerialize(groupBy); + + this.groupBy = groupBy; + } + @ManyToMany(fetch = FetchType.EAGER) @JoinTable(name = "utm_group_rules_data_type", joinColumns = @JoinColumn(name = "rule_id"), diff --git a/backend/src/main/java/com/park/utmstack/domain/network_scan/enums/PropertyFilter.java b/backend/src/main/java/com/park/utmstack/domain/network_scan/enums/PropertyFilter.java index 55370e8df..bc4cbc8c8 100644 --- a/backend/src/main/java/com/park/utmstack/domain/network_scan/enums/PropertyFilter.java +++ b/backend/src/main/java/com/park/utmstack/domain/network_scan/enums/PropertyFilter.java @@ -23,6 +23,7 @@ public enum PropertyFilter implements Property { COLLECTOR_GROUP("assetGroup.groupName", "UtmCollector", ""), RULE_TECHNIQUE("ruleTechnique","UtmCorrelationRules", ""), RULE_ADVERSARY("ruleAdversary","UtmCorrelationRules", ""), + RULE_STATUS("ruleActive","UtmCorrelationRules", ""), RULE_CATEGORY("ruleCategory","UtmCorrelationRules", ""); //RULE_DATA_TYPES("jt.dataType","UtmCorrelationRules", "dataTypes"); //DATA_TYPES("jt.dataType","UtmNetworkScan", "dataInputSourceList"); diff --git a/backend/src/main/java/com/park/utmstack/domain/shared_types/enums/SectionType.java b/backend/src/main/java/com/park/utmstack/domain/shared_types/enums/SectionType.java index e8e6940aa..820176c14 100644 --- a/backend/src/main/java/com/park/utmstack/domain/shared_types/enums/SectionType.java +++ b/backend/src/main/java/com/park/utmstack/domain/shared_types/enums/SectionType.java @@ -9,7 +9,8 @@ public enum SectionType { INSTANCE_REGISTRATION, SYSTEM_LICENSE, INSTANCE_UPDATE_FREQUENCY, - INSTANCE_ENABLE_SEND_LOGS + INSTANCE_ENABLE_SEND_LOGS, + THREATWINDS_CREDENTIALS } diff --git a/backend/src/main/java/com/park/utmstack/service/app_info/AppInfoService.java b/backend/src/main/java/com/park/utmstack/service/app_info/AppInfoService.java index c54247d44..a161a8ca5 100644 --- a/backend/src/main/java/com/park/utmstack/service/app_info/AppInfoService.java +++ b/backend/src/main/java/com/park/utmstack/service/app_info/AppInfoService.java @@ -16,7 +16,7 @@ public class AppInfoService { private static final String CLASSNAME = "AppInfoService"; - public AppInfoDto loadVersionInfo() throws Exception { + public AppInfoDto loadVersionInfo() { final String ctx = "loadVersionInfo"; try { ObjectMapper mapper = new ObjectMapper(); diff --git a/backend/src/main/java/com/park/utmstack/service/compliance/ComplianceFileResponse.java b/backend/src/main/java/com/park/utmstack/service/compliance/ComplianceFileResponse.java index 9fc1b74aa..0beccfa66 100644 --- a/backend/src/main/java/com/park/utmstack/service/compliance/ComplianceFileResponse.java +++ b/backend/src/main/java/com/park/utmstack/service/compliance/ComplianceFileResponse.java @@ -1,18 +1,17 @@ package com.park.utmstack.service.compliance; -public class ComplianceFileResponse { - byte [] pdfBytes; - - public ComplianceFileResponse(byte[] pdfBytes) { - this.pdfBytes = pdfBytes; - } - public ComplianceFileResponse(){} +import lombok.Builder; +import lombok.Data; - public byte[] getPdfBytes() { - return pdfBytes; - } +@Data +@Builder +public class ComplianceFileResponse { + // Success fields + private byte[] pdfBytes; - public void setPdfBytes(byte[] pdfBytes) { - this.pdfBytes = pdfBytes; - } + // Error fields + private boolean error; + private String message; + private String details; } + diff --git a/backend/src/main/java/com/park/utmstack/service/dto/correlation/UtmCorrelationRulesDTO.java b/backend/src/main/java/com/park/utmstack/service/dto/correlation/UtmCorrelationRulesDTO.java index 21ee83dfe..ba02274f8 100644 --- a/backend/src/main/java/com/park/utmstack/service/dto/correlation/UtmCorrelationRulesDTO.java +++ b/backend/src/main/java/com/park/utmstack/service/dto/correlation/UtmCorrelationRulesDTO.java @@ -62,5 +62,7 @@ public class UtmCorrelationRulesDTO implements Serializable { private List deduplicateBy; + private List groupBy; + } diff --git a/backend/src/main/java/com/park/utmstack/service/dto/correlation/UtmCorrelationRulesMapper.java b/backend/src/main/java/com/park/utmstack/service/dto/correlation/UtmCorrelationRulesMapper.java index d8cf75e56..033b9a2e3 100644 --- a/backend/src/main/java/com/park/utmstack/service/dto/correlation/UtmCorrelationRulesMapper.java +++ b/backend/src/main/java/com/park/utmstack/service/dto/correlation/UtmCorrelationRulesMapper.java @@ -35,6 +35,7 @@ public UtmCorrelationRulesDTO toDto(UtmCorrelationRules entity) { dto.setRuleActive(entity.getRuleActive()); dto.setAfterEvents(entity.getAfterEvents()); dto.setDeduplicateBy(entity.getDeduplicateBy()); + dto.setGroupBy(entity.getGroupBy()); return dto; } catch (UtmSerializationException e) { logger.error("Error serializing rule references", e); @@ -62,6 +63,7 @@ public UtmCorrelationRules toEntity(UtmCorrelationRulesDTO dto) { entity.setRuleLastUpdate(Instant.now(Clock.systemUTC())); entity.setAfterEvents(dto.getAfterEvents()); entity.setDeduplicateBy(dto.getDeduplicateBy()); + entity.setGroupBy(dto.getGroupBy()); return entity; } catch (UtmSerializationException e) { diff --git a/backend/src/main/java/com/park/utmstack/service/dto/web_pdf/PdfServiceResponse.java b/backend/src/main/java/com/park/utmstack/service/dto/web_pdf/PdfServiceResponse.java new file mode 100644 index 000000000..ee2620e39 --- /dev/null +++ b/backend/src/main/java/com/park/utmstack/service/dto/web_pdf/PdfServiceResponse.java @@ -0,0 +1,12 @@ +package com.park.utmstack.service.dto.web_pdf; + +import lombok.Data; + +@Data +public class PdfServiceResponse { + private boolean error; + private String message; + private String details; + private byte[] pdfBytes; +} + diff --git a/backend/src/main/java/com/park/utmstack/service/impl/UtmAlertServiceImpl.java b/backend/src/main/java/com/park/utmstack/service/impl/UtmAlertServiceImpl.java index b22a0680b..c3b3f0d3e 100644 --- a/backend/src/main/java/com/park/utmstack/service/impl/UtmAlertServiceImpl.java +++ b/backend/src/main/java/com/park/utmstack/service/impl/UtmAlertServiceImpl.java @@ -81,6 +81,7 @@ public void checkForNewAlerts() { List filters = new ArrayList<>(); filters.add(new FilterType(Constants.alertStatus, OperatorType.IS, AlertStatus.OPEN.getCode())); + filters.add(new FilterType(Constants.alertTags, OperatorType.DOES_NOT_CONTAIN, Constants.FALSE_POSITIVE_TAG)); filters.add(new FilterType(Constants.timestamp, OperatorType.IS_GREATER_THAN, initialDate.getLastAlertTimestamp().toString())); SearchRequest.Builder srb = new SearchRequest.Builder(); diff --git a/backend/src/main/java/com/park/utmstack/service/util/PdfService.java b/backend/src/main/java/com/park/utmstack/service/util/PdfService.java index 7b731b0b9..5441694b0 100644 --- a/backend/src/main/java/com/park/utmstack/service/util/PdfService.java +++ b/backend/src/main/java/com/park/utmstack/service/util/PdfService.java @@ -2,10 +2,13 @@ import com.park.utmstack.config.Constants; import com.park.utmstack.service.compliance.ComplianceFileResponse; +import com.park.utmstack.service.dto.web_pdf.PdfServiceResponse; import com.park.utmstack.service.federation_service.UtmFederationServiceClientService; import com.park.utmstack.service.web_clients.rest_template.RestTemplateService; +import com.park.utmstack.util.exceptions.ApiException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -60,7 +63,7 @@ public byte[] getPdf(String url, String accessKey, String accessType) throws Exc ResponseEntity rs = restTemplateService.get(urlService, ComplianceFileResponse.class); log.info("Requesting PDF creation to URL : {}", Constants.PDF_SERVICE_URL + "?url=" + url); if (!rs.getStatusCode().is2xxSuccessful()) { - log.error(ctx + ": " + restTemplateService.extractErrorMessage(rs)); + log.error(ctx + ": {}", restTemplateService.extractErrorMessage(rs)); } else { byte[] pdfInBytes = Objects.requireNonNull(rs.getBody()).getPdfBytes(); if (pdfInBytes != null && pdfInBytes.length > 0) { @@ -72,6 +75,51 @@ public byte[] getPdf(String url, String accessKey, String accessType) throws Exc return null; } + public PdfServiceResponse downloadPdf(String url, String accessKey, String accessType) { + final String ctx = CLASSNAME + ".getPdf"; + + String urlService = UriComponentsBuilder.fromUriString(Constants.PDF_SERVICE_URL) + .queryParam("baseUrl", Constants.FRONT_BASE_URL) + .queryParam("url", url) + .queryParam("accessKey", accessKey) + .queryParam("accessType", accessType) + .build().toUriString(); + try { + log.info("Requesting PDF creation to URL : {}", urlService); + ResponseEntity rs = + restTemplateService.getRaw(urlService, PdfServiceResponse.class); + + if (!rs.getStatusCode().is2xxSuccessful()) { + PdfServiceResponse errorBody = rs.getBody(); + + String message = (errorBody != null && errorBody.getMessage() != null) + ? errorBody.getMessage() + : "Unknown error returned from PDF service"; + + throw new ApiException(message, rs.getStatusCode()); + } + + + PdfServiceResponse body = rs.getBody(); + + if (body == null || body.getPdfBytes() == null || body.getPdfBytes().length == 0) { + log.error("{}: No data returned from PDF service", ctx); + + PdfServiceResponse error = new PdfServiceResponse(); + error.setError(true); + error.setMessage("No data returned from PDF service"); + return error; + } + + return body; + + } catch (Exception e){ + log.error("{}: Exception occurred while requesting PDF service: {}", ctx, e.getMessage()); + throw new ApiException(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR); + } + } + + /** * Enum used to define type of access used when accessing the PDF microservice * */ diff --git a/backend/src/main/java/com/park/utmstack/service/validators/tw_config/TwConfigValidatorService.java b/backend/src/main/java/com/park/utmstack/service/validators/tw_config/TwConfigValidatorService.java new file mode 100644 index 000000000..6feef35c7 --- /dev/null +++ b/backend/src/main/java/com/park/utmstack/service/validators/tw_config/TwConfigValidatorService.java @@ -0,0 +1,43 @@ +package com.park.utmstack.service.validators.tw_config; + +import com.park.utmstack.domain.UtmConfigurationParameter; +import com.park.utmstack.service.app_info.AppInfoService; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; +import org.springframework.validation.Errors; +import org.springframework.validation.Validator; + +@Service +@RequiredArgsConstructor +public class TwConfigValidatorService implements Validator { + + private final AppInfoService infoService; + + @Override + public boolean supports(Class clazz) { + return UtmConfigurationParameter.class.equals(clazz); + } + + @Override + public void validate(Object target, Errors errors) { + UtmConfigurationParameter parameter = (UtmConfigurationParameter) target; + + String value = parameter.getConfParamValue(); + if (value == null) { + errors.rejectValue("confParamValue", "null", "Value cannot be null"); + return; + } + + String edition; + try { + edition = infoService.loadVersionInfo().getEdition(); + } catch (Exception e) { + errors.reject("appInfo.error", "Could not determine application edition"); + return; + } + + if (!Boolean.parseBoolean(value) && "community".equals(edition)) { + errors.rejectValue("confParamValue", "forbidden", "Forbidden to disable in COMMUNITY edition"); + } + } +} diff --git a/backend/src/main/java/com/park/utmstack/service/web_clients/rest_template/RestTemplateService.java b/backend/src/main/java/com/park/utmstack/service/web_clients/rest_template/RestTemplateService.java index c7543cc31..3cdbfa5be 100644 --- a/backend/src/main/java/com/park/utmstack/service/web_clients/rest_template/RestTemplateService.java +++ b/backend/src/main/java/com/park/utmstack/service/web_clients/rest_template/RestTemplateService.java @@ -4,6 +4,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.park.utmstack.web.rest.util.HeaderUtil; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.*; import org.springframework.stereotype.Service; @@ -15,17 +17,22 @@ import java.util.Objects; @Service +@Slf4j public class RestTemplateService { private static final String CLASSNAME = "RestTemplateService"; private final RestTemplate rest; + private final RestTemplate rawRestTemplate; private final RestTemplate restTemplateWithSsl; private final HttpHeaders headers = new HttpHeaders(); - public RestTemplateService(RestTemplate restTemplate, RestTemplate restTemplateWithSsl) { + public RestTemplateService(RestTemplate restTemplate, + RestTemplate restTemplateWithSsl, + @Qualifier("rawRestTemplate") RestTemplate rawRestTemplate) { this.rest = restTemplate; this.restTemplateWithSsl = restTemplateWithSsl; + this.rawRestTemplate = rawRestTemplate; headers.add("Content-Type", "application/json"); headers.add("Accept", "*/*"); } @@ -42,6 +49,12 @@ public ResponseEntity get(String url, Class type) throws Exception { } } + public ResponseEntity getRaw(String url, Class type) { + HttpEntity requestEntity = new HttpEntity<>("", headers); + return rawRestTemplate.exchange(url, HttpMethod.GET, requestEntity, type); + } + + public ResponseEntity get(String url, Class type, HttpHeaders headers) throws Exception { final String ctx = CLASSNAME + ".get"; try { @@ -169,10 +182,4 @@ public RestTemplateService addHeader(String key, List value) { return this; } - public RestTemplateService acceptingSsl() { - - - return this; - - } } diff --git a/backend/src/main/java/com/park/utmstack/web/rest/UtmConfigurationParameterResource.java b/backend/src/main/java/com/park/utmstack/web/rest/UtmConfigurationParameterResource.java index 5360dbc7d..18e29aacc 100644 --- a/backend/src/main/java/com/park/utmstack/web/rest/UtmConfigurationParameterResource.java +++ b/backend/src/main/java/com/park/utmstack/web/rest/UtmConfigurationParameterResource.java @@ -9,9 +9,11 @@ import com.park.utmstack.service.dto.UtmConfigurationParameterCriteria; import com.park.utmstack.service.mail_config.MailConfigService; import com.park.utmstack.service.validators.email.EmailValidatorService; +import com.park.utmstack.service.validators.tw_config.TwConfigValidatorService; import com.park.utmstack.util.ResponseUtil; import com.park.utmstack.util.exceptions.UtmMailException; import com.park.utmstack.web.rest.util.PaginationUtil; +import lombok.RequiredArgsConstructor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springdoc.api.annotations.ParameterObject; @@ -35,6 +37,7 @@ * REST controller for managing UtmConfigurationParameter. */ @RestController +@RequiredArgsConstructor @RequestMapping("/api") public class UtmConfigurationParameterResource { @@ -48,19 +51,7 @@ public class UtmConfigurationParameterResource { private final EmailValidatorService emailValidatorService; private final MailConfigService mailConfigService; private final UtmStackService utmStackService; - public UtmConfigurationParameterResource(UtmConfigurationParameterService utmConfigurationParameterService, - UtmConfigurationParameterQueryService utmConfigurationParameterQueryService, - ApplicationEventService applicationEventService, - EmailValidatorService emailValidatorService, - MailConfigService mailConfigService, - UtmStackService utmStackService) { - this.utmConfigurationParameterService = utmConfigurationParameterService; - this.utmConfigurationParameterQueryService = utmConfigurationParameterQueryService; - this.applicationEventService = applicationEventService; - this.emailValidatorService = emailValidatorService; - this.mailConfigService = mailConfigService; - this.utmStackService = utmStackService; - } + private final TwConfigValidatorService twConfigValidatorService; /** * PUT /utm-configuration-parameters : Updates an existing utmConfigurationParameter. @@ -76,16 +67,21 @@ public ResponseEntity updateConfigurationParameters(@Valid @RequestBody Li try { Assert.notEmpty(parameters, "There isn't any parameter to update"); for (UtmConfigurationParameter parameter : parameters) { + Errors errors = new BeanPropertyBindingResult(parameter, "utmConfigurationParameter"); + + if(parameter.getConfParamShort().equals("utmstack.tw.enable")){ + twConfigValidatorService.validate(parameter, errors); + } + if(StringUtils.hasText(parameter.getConfParamRegexp())){ - Errors errors = new BeanPropertyBindingResult(parameter, "utmConfigurationParameter"); emailValidatorService.validate(parameter, errors); + } - if (errors.hasErrors()) { - String msg = String.format("Validation failed for field %s.", parameter.getConfParamShort()); - log.error(msg); - applicationEventService.createEvent(msg, ApplicationEventType.ERROR); - return ResponseUtil.buildPreconditionFailedResponse(msg); - } + if (errors.hasErrors()) { + String msg = String.format("Validation failed for field %s.", parameter.getConfParamShort()); + log.error(msg); + applicationEventService.createEvent(msg, ApplicationEventType.ERROR); + return ResponseUtil.buildPreconditionFailedResponse(msg); } } utmConfigurationParameterService.saveAll(parameters); diff --git a/backend/src/main/java/com/park/utmstack/web/rest/util/PdfGeneratorResource.java b/backend/src/main/java/com/park/utmstack/web/rest/util/PdfGeneratorResource.java index 85ebab44a..9f1b2b336 100644 --- a/backend/src/main/java/com/park/utmstack/web/rest/util/PdfGeneratorResource.java +++ b/backend/src/main/java/com/park/utmstack/web/rest/util/PdfGeneratorResource.java @@ -1,16 +1,13 @@ package com.park.utmstack.web.rest.util; -import com.park.utmstack.domain.application_events.enums.ApplicationEventType; import com.park.utmstack.security.jwt.JWTFilter; -import com.park.utmstack.service.application_events.ApplicationEventService; +import com.park.utmstack.service.dto.web_pdf.PdfServiceResponse; import com.park.utmstack.service.util.PdfService; -import com.park.utmstack.util.ResponseUtil; import com.park.utmstack.web.rest.errors.BadRequestAlertException; -import javassist.NotFoundException; +import lombok.RequiredArgsConstructor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; @@ -19,63 +16,41 @@ * REST controller for managing {@link PdfGeneratorResource}. */ @RestController +@RequiredArgsConstructor @RequestMapping("/api") public class PdfGeneratorResource { private static final String CLASSNAME = "PdfGeneratorResource"; private final Logger log = LoggerFactory.getLogger(PdfGeneratorResource.class); - private final ApplicationEventService applicationEventService; - - private final PdfService pdfService; - public PdfGeneratorResource( - ApplicationEventService applicationEventService, - PdfService pdfService) { - this.applicationEventService = applicationEventService; - this.pdfService = pdfService; - } + @GetMapping("/generate-pdf-report") + public ResponseEntity getPdfReportInBytes(@RequestParam String url, + @RequestParam PdfService.PdfAccessTypes accessType, + @RequestParam String filename, + @RequestHeader(JWTFilter.AUTHORIZATION_HEADER) String accessKey) { - /** - * {@code GET /generate-pdf-report} : get pdf report in bytes, from a dashboard or compliance. - * - * @return the {@link ResponseEntity} with status {@code 200 (OK)} and the pdf report in bytes in body. - */ - @RequestMapping( - value = "/generate-pdf-report", - produces = MediaType.APPLICATION_PDF_VALUE, - method = RequestMethod.GET - ) - public ResponseEntity getPdfReportInBytes(@RequestParam String url, - @RequestParam PdfService.PdfAccessTypes accessType, - @RequestParam String filename, - @RequestHeader(JWTFilter.AUTHORIZATION_HEADER) String accessKey) { final String ctx = CLASSNAME + ".getPdfReportInBytes"; - try { - if (accessType == PdfService.PdfAccessTypes.PDF_TYPE_INTERNAL) { - throw new BadRequestAlertException("Access type ("+ accessType.get() +") not allowed","pdfreport","accesskeynotvalid"); - } - log.debug("REST request to get pdf report"); - - HttpHeaders headers = new HttpHeaders(); - headers.add(HttpHeaders.CACHE_CONTROL, "no-cache, no-store, must-revalidate"); - headers.add(HttpHeaders.PRAGMA, "no-cache"); - headers.add(HttpHeaders.EXPIRES, "0"); - headers.add(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + filename); - headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_PDF_VALUE); - byte [] resultPdf = pdfService.getPdf( url, accessKey.substring(7), accessType.get()); - if (resultPdf != null && resultPdf.length > 0 ) { - return ResponseEntity.ok().headers(headers).body(resultPdf); - } else { - throw new NotFoundException("We couldn't generate the pdf, reason: No data returned from PDF service"); - } - } catch (Exception e) { - String msg = ctx + ": " + e.getLocalizedMessage(); - log.error(msg); - applicationEventService.createEvent(msg, ApplicationEventType.ERROR); - return ResponseUtil.buildErrorResponse(HttpStatus.INTERNAL_SERVER_ERROR, msg); + if (accessType == PdfService.PdfAccessTypes.PDF_TYPE_INTERNAL) { + throw new BadRequestAlertException(String.format("PDF Service not implemented for %s", accessType), CLASSNAME, null); } + + log.debug("REST request to get pdf report"); + + PdfServiceResponse pdfResponse = + pdfService.downloadPdf(url, accessKey.substring(7), accessType.get()); + + HttpHeaders headers = new HttpHeaders(); + headers.add(HttpHeaders.CACHE_CONTROL, "no-cache, no-store, must-revalidate"); + headers.add(HttpHeaders.PRAGMA, "no-cache"); + headers.add(HttpHeaders.EXPIRES, "0"); + headers.add(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + filename); + headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_PDF_VALUE); + + return ResponseEntity.ok() + .headers(headers) + .body(pdfResponse.getPdfBytes()); } } diff --git a/backend/src/main/resources/config/liquibase/changelog/20260112001_add_threatwinds_credentials_section.xml b/backend/src/main/resources/config/liquibase/changelog/20260112001_add_threatwinds_credentials_section.xml new file mode 100644 index 000000000..e792871a8 --- /dev/null +++ b/backend/src/main/resources/config/liquibase/changelog/20260112001_add_threatwinds_credentials_section.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/backend/src/main/resources/config/liquibase/changelog/20260113001_update_macos_integration_category.xml b/backend/src/main/resources/config/liquibase/changelog/20260113001_update_macos_integration_category.xml new file mode 100644 index 000000000..40b8a8a72 --- /dev/null +++ b/backend/src/main/resources/config/liquibase/changelog/20260113001_update_macos_integration_category.xml @@ -0,0 +1,15 @@ + + + + + + + + module_name = 'MACOS' + + + + diff --git a/backend/src/main/resources/config/liquibase/changelog/20260114001_update_section_instance_config.xml b/backend/src/main/resources/config/liquibase/changelog/20260114001_update_section_instance_config.xml new file mode 100644 index 000000000..6b8f29762 --- /dev/null +++ b/backend/src/main/resources/config/liquibase/changelog/20260114001_update_section_instance_config.xml @@ -0,0 +1,26 @@ + + + + + + + + + id = 6 + + + + + + conf_param_short = 'utmstack.instance.data' + + + + conf_param_short in ('utmstack.instance.contact_email', 'utmstack.instance.country', 'utmstack.instance.organization') + + + + diff --git a/backend/src/main/resources/config/liquibase/changelog/20260119001_update_menu_url_for_soc_ai.xml b/backend/src/main/resources/config/liquibase/changelog/20260119001_update_menu_url_for_soc_ai.xml new file mode 100644 index 000000000..1b21a341a --- /dev/null +++ b/backend/src/main/resources/config/liquibase/changelog/20260119001_update_menu_url_for_soc_ai.xml @@ -0,0 +1,15 @@ + + + + + + + + name = 'SOC AI' + + + + diff --git a/backend/src/main/resources/config/liquibase/changelog/20260120001_add_rule_group_by_to_correlation_rules.xml b/backend/src/main/resources/config/liquibase/changelog/20260120001_add_rule_group_by_to_correlation_rules.xml new file mode 100644 index 000000000..e36d0ef49 --- /dev/null +++ b/backend/src/main/resources/config/liquibase/changelog/20260120001_add_rule_group_by_to_correlation_rules.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + diff --git a/backend/src/main/resources/config/liquibase/master.xml b/backend/src/main/resources/config/liquibase/master.xml index dfefaf11b..0dcd8b3ee 100644 --- a/backend/src/main/resources/config/liquibase/master.xml +++ b/backend/src/main/resources/config/liquibase/master.xml @@ -299,5 +299,17 @@ + + + + + + + + + + + + diff --git a/event_processor.Dockerfile b/event_processor.Dockerfile index b5009a65d..fc84aae97 100644 --- a/event_processor.Dockerfile +++ b/event_processor.Dockerfile @@ -18,3 +18,4 @@ COPY ./plugins/stats/com.utmstack.stats.plugin /workdir/plugins/utmstack/ COPY ./plugins/soc-ai/com.utmstack.soc-ai.plugin /workdir/plugins/utmstack/ COPY ./plugins/modules-config/com.utmstack.modules-config.plugin /workdir/plugins/utmstack/ COPY ./plugins/crowdStrike/com.utmstack.crowdstrike.plugin /workdir/plugins/utmstack/ +COPY ./plugins/threadwinds-ingestion/com.utmstack.threadwinds-ingestion.plugin /workdir/plugins/utmstack/ \ No newline at end of file diff --git a/filters/crowdstrike/crowdstrike.yml b/filters/crowdstrike/crowdstrike.yml index 88cfcfb91..40d8d1bde 100644 --- a/filters/crowdstrike/crowdstrike.yml +++ b/filters/crowdstrike/crowdstrike.yml @@ -1,4 +1,4 @@ -# Crowdstrike module filter, version 1.0.0 +# Crowdstrike module filter, version 1.1.0 # Based in docs and samples provided # # Documentations @@ -9,4 +9,303 @@ pipeline: - crowdstrike steps: - json: - source: raw \ No newline at end of file + source: raw + + # .......................................................................# + # Rename to utmstack format to normalize fields + # .......................................................................# + - rename: + from: + - log.RawMessage.event.Attributes.APIClientID + to: log.eventAttributesAPIClientID + + - rename: + from: + - log.RawMessage.event.Attributes.actor_cid + to: log.eventAttributesActorCid + + - rename: + from: + - log.RawMessage.event.Attributes.actor_user + to: log.eventAttributesActorUser + + - rename: + from: + - log.RawMessage.event.Attributes.actor_user_uuid + to: log.eventAttributesActorUserUUID + + - rename: + from: + - log.RawMessage.event.Attributes.name + to: log.eventAttributesName + + - rename: + from: + - log.RawMessage.event.Attributes.trace_id + to: log.eventAttributesTraceID + + - rename: + from: + - log.RawMessage.event.Attributes.cid + to: log.eventAttributesCid + + - rename: + from: + - log.RawMessage.event.Attributes.consumes + to: log.eventAttributesConsumes + + - rename: + from: + - log.RawMessage.event.Attributes.elapsed_microseconds + to: log.eventAttributesElapsedMicroseconds + + - rename: + from: + - log.RawMessage.event.Attributes.elapsed_time + to: log.eventAttributesElapsedTime + + - rename: + from: + - log.RawMessage.event.Attributes.produces + to: log.eventAttributesProduces + + - rename: + from: + - log.RawMessage.event.Attributes.received_time + to: log.eventAttributesReceivedTime + + - rename: + from: + - log.RawMessage.event.Attributes.request_content_type + to: log.eventAttributesRequestContentType + + - rename: + from: + - log.RawMessage.event.Attributes.request_method + to: log.eventAttributesRequestMethod + + - rename: + from: + - log.RawMessage.event.Attributes.request_uri_length + to: log.eventAttributesRequestURILength + + - rename: + from: + - log.RawMessage.event.Attributes.status_code + to: log.statusCode + + - rename: + from: + - log.RawMessage.event.Attributes.sub_component_1 + to: log.eventAttributesSubComponent1 + + - rename: + from: + - log.RawMessage.event.Attributes.sub_component_2 + to: log.eventAttributesSubComponent2 + + - rename: + from: + - log.RawMessage.event.Attributes.sub_component_3 + to: log.eventAttributesSubComponent3 + + - rename: + from: + - log.RawMessage.event.Attributes.trace_id + to: log.eventAttributesTraceID + + - rename: + from: + - log.RawMessage.event.Attributes.user_agent + to: log.eventAttributesUserAgent + + - rename: + from: + - log.RawMessage.event.Attributes.eventType + to: log.eventAttributesEventType + + - rename: + from: + - log.RawMessage.event.Attributes.offset + to: log.eventAttributesOffset + + - rename: + from: + - log.RawMessage.event.Attributes.partition + to: log.eventAttributesPartition + + - rename: + from: + - log.RawMessage.event.Attributes.request_accept + to: log.eventAttributesRequestAccept + + - rename: + from: + - log.RawMessage.event.Attributes.request_path + to: log.eventAttributesRequestPath + + - rename: + from: + - log.RawMessage.event.Attributes.request_query + to: log.eventAttributesRequestQuery + + - rename: + from: + - log.RawMessage.event.Attributes.scopes + to: log.eventAttributesScopes + + - rename: + from: + - log.RawMessage.event.AuditKeyValues + to: log.eventAuditKeyValues + + - rename: + from: + - log.RawMessage.event.Message + to: log.eventMessage + + - rename: + from: + - log.RawMessage.event.OperationName + to: log.eventOperationName + + - rename: + from: + - log.RawMessage.event.ServiceName + to: log.eventServiceName + + - rename: + from: + - log.RawMessage.event.Source + to: log.eventSource + + - rename: + from: + - log.RawMessage.event.ServiceName + to: log.eventServiceName + + - rename: + from: + - log.RawMessage.event.SourceIp + to: origin.ip + + - rename: + from: + - log.RawMessage.event.Success + to: log.eventSuccess + + - rename: + from: + - log.RawMessage.event.UTCTimestamp + to: log.eventUTCTimestamp + + - rename: + from: + - log.RawMessage.event.UserId + to: log.eventUserId + + - rename: + from: + - log.RawMessage.metadata.customerIDString + to: log.metadataCustomerIDString + + - rename: + from: + - log.RawMessage.metadata.eventCreationTime + to: log.metadataEventCreationTime + + - rename: + from: + - log.RawMessage.metadata.eventType + to: log.metadataEventType + + - rename: + from: + - log.RawMessage.metadata.offset + to: log.metadataOffset + + - rename: + from: + - log.RawMessage.metadata.version + to: log.metadataVersion + + # .......................................................................# + # Reformat and field conversions + # .......................................................................# + - cast: + fields: + - log.statusCode + to: float + + # .......................................................................# + # Renaming "log.statusCode" to "statusCode" to add it to the event structure + # .......................................................................# + - rename: + from: + - log.statusCode + to: statusCode + + # .......................................................................# + # Adding geolocation to origin ip + # .......................................................................# + - dynamic: + plugin: com.utmstack.geolocation + params: + source: origin.ip + destination: origin.geolocation + where: exists("origin.ip") + + # .......................................................................# + # Normalizing request method and renaming to action + # .......................................................................# + - add: + function: 'string' + params: + key: action + value: 'get' + where: safe("log.eventAttributesRequestMethod", "") == "GET" + + - add: + function: 'string' + params: + key: action + value: 'post' + where: safe("log.eventAttributesRequestMethod", "") == "POST" + + - add: + function: 'string' + params: + key: action + value: 'put' + where: safe("log.eventAttributesRequestMethod", "") == "PUT" + + - add: + function: 'string' + params: + key: action + value: 'delete' + where: safe("log.eventAttributesRequestMethod", "") == "DELETE" + + - add: + function: 'string' + params: + key: action + value: 'request' + where: safe("log.eventAttributesRequestMethod", "") == "REQUEST" + + # .......................................................................# + # Removing unused fields + # .......................................................................# + - delete: + fields: + - log.statusCode + - log.RawMessage.event.Attributes + - log.RawMessage.event.UserIp + - log.metadata + - log.event.AuditKeyValues + - log.event.OperationName + - log.event.ServiceName + - log.event.Success + - log.event.UTCTimestamp + - log.event.UserId + - log.event.UserIp \ No newline at end of file diff --git a/frontend/src/app/app-management/layout/app-management-sidebar/app-management-sidebar.component.html b/frontend/src/app/app-management/layout/app-management-sidebar/app-management-sidebar.component.html index 1ca77a565..f31ac2421 100644 --- a/frontend/src/app/app-management/layout/app-management-sidebar/app-management-sidebar.component.html +++ b/frontend/src/app/app-management/layout/app-management-sidebar/app-management-sidebar.component.html @@ -49,7 +49,7 @@ - @@ -57,7 +57,7 @@   User access audit - + --> -   Application logs - + --> { this.offline = true; - this.apiServiceCheckerService.checkApiAvailability(); }); } diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index 089880fed..ee57b55fd 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -36,17 +36,16 @@ import {AlertIncidentStatusChangeBehavior} from './shared/behaviors/alert-incide import {GettingStartedBehavior} from './shared/behaviors/getting-started.behavior'; import {NavBehavior} from './shared/behaviors/nav.behavior'; import {NewAlertBehavior} from './shared/behaviors/new-alert.behavior'; -import {AppVersionService} from './shared/services/version/app-version.service'; import {TimezoneFormatService} from './shared/services/utm-timezone.service'; +import {AppVersionService} from './shared/services/version/app-version.service'; import {UtmSharedModule} from './shared/utm-shared.module'; -export function initTimezoneFormat( - timezoneService: TimezoneFormatService, - apiChecker: ApiServiceCheckerService, - appVersionService: AppVersionService -) { - return () => - new Promise((resolve, reject) => { +export function initTimezoneFormat(apiChecker: ApiServiceCheckerService, + timezoneService: TimezoneFormatService, + appVersionService: AppVersionService) { + return () => { + apiChecker.init(); + return new Promise((resolve, reject) => { apiChecker.isOnlineApi$ .pipe(first(val => val === true)) .subscribe({ @@ -59,6 +58,8 @@ export function initTimezoneFormat( error: reject }); }); + }; + } @NgModule({ @@ -135,8 +136,8 @@ export function initTimezoneFormat( provide: APP_INITIALIZER, useFactory: initTimezoneFormat, deps: [ - TimezoneFormatService, ApiServiceCheckerService, + TimezoneFormatService, AppVersionService ], multi: true diff --git a/frontend/src/app/assets-discover/assets-view/assets-view.component.html b/frontend/src/app/assets-discover/assets-view/assets-view.component.html index 8776a0ae6..0713f5e1d 100644 --- a/frontend/src/app/assets-discover/assets-view/assets-view.component.html +++ b/frontend/src/app/assets-discover/assets-view/assets-view.component.html @@ -110,130 +110,135 @@
Types - - Last input + + Last Input Action - - - - -
-
- -
- - + + + + +
+
+ +
+ + - + - -
- - - - - - {{ asset.displayName }} - - -
+ +
+ + + + + + {{ asset.displayName }} + + +
- - {{ dat.dataType }} - - - -
- - - - {{ dat.dataType + ' is ' + (isSourceConnected(asset, dat) ? 'up' : 'taking longer than usual to send logs') }} - - - - - - Last input: {{ formatTimestampToDate(dat.timestamp) | date }} + + {{ dat.dataType }} + + + +
+ + + + {{ dat.dataType + ' is ' + (isSourceConnected(asset, dat) ? 'up' : 'taking longer than usual to send logs') }} - -
-
-
+
+ + + + Last input: {{ formatTimestampToDate(dat.timestamp) | date }} + + +
+
+
-
- - - {{ getLastInput(asset) }} - +
+ + + {{ asset.lastInput | date }} + - -
+ +
- + - -
- - - + +
+ + +
- - - - - + + + + + - - -
- - -
- - + + +
+ + +
+ + diff --git a/frontend/src/app/assets-discover/assets-view/assets-view.component.ts b/frontend/src/app/assets-discover/assets-view/assets-view.component.ts index 27285420e..dc8bf7e0a 100644 --- a/frontend/src/app/assets-discover/assets-view/assets-view.component.ts +++ b/frontend/src/app/assets-discover/assets-view/assets-view.component.ts @@ -1,12 +1,12 @@ import {HttpResponse} from '@angular/common/http'; -import {ChangeDetectionStrategy, Component, OnDestroy, OnInit} from '@angular/core'; +import {ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit} from '@angular/core'; import {Router} from '@angular/router'; import {NgbModal} from '@ng-bootstrap/ng-bootstrap'; import {ResizeEvent} from 'angular-resizable-element'; import * as moment from 'moment'; import {NgxSpinnerService} from 'ngx-spinner'; -import {Observable} from 'rxjs'; -import {filter, map, switchMap, tap} from 'rxjs/operators'; +import {Observable, Subject} from 'rxjs'; +import {filter, finalize, map, switchMap, take, takeUntil, tap} from 'rxjs/operators'; import {AccountService} from '../../core/auth/account.service'; import {UtmToastService} from '../../shared/alert/utm-toast.service'; import { @@ -14,6 +14,7 @@ import { } from '../../shared/components/utm/util/modal-confirmation/modal-confirmation.component'; import {ALERT_SENSOR_FIELD} from '../../shared/constants/alert/alert-field.constant'; import {ITEMS_PER_PAGE} from '../../shared/constants/pagination.constants'; +import {SortDirection} from '../../shared/directives/sortable/type/sort-direction.type'; import {SortEvent} from '../../shared/directives/sortable/type/sort-event'; import {ChartValueSeparator} from '../../shared/enums/chart-value-separator'; import {ElasticOperatorsEnum} from '../../shared/enums/elastic-operators.enum'; @@ -35,7 +36,6 @@ import {AssetFilterType} from '../shared/types/asset-filter.type'; import {UtmDataInputStatus} from '../shared/types/data-source-input.type'; import {NetScanType} from '../shared/types/net-scan.type'; import {SourceDataTypeConfigComponent} from '../source-data-type-config/source-data-type-config.component'; -import {SortDirection} from "../../shared/directives/sortable/type/sort-direction.type"; @Component({ selector: 'app-assets-view', @@ -53,7 +53,7 @@ export class AssetsViewComponent implements OnInit, OnDestroy { sortEvent: any; totalItems: any; page = 0; - loading = true; + loading = false; itemsPerPage = ITEMS_PER_PAGE; viewAssetDetail: NetScanType; sortBy = AssetFieldEnum.ASSET_ID + ',asc'; @@ -85,6 +85,7 @@ export class AssetsViewComponent implements OnInit, OnDestroy { reasonRun: IncidentCommandType; agent: string; noData = false; + destroy$ = new Subject(); constructor(private utmNetScanService: UtmNetScanService, private modalService: NgbModal, @@ -94,7 +95,7 @@ export class AssetsViewComponent implements OnInit, OnDestroy { private spinner: NgxSpinnerService, private accountService: AccountService, private assetFiltersBehavior: AssetFiltersBehavior, - private datePipe: UtmDatePipe) { + private cdr: ChangeDetectorRef) { } ngOnInit() { @@ -109,14 +110,16 @@ export class AssetsViewComponent implements OnInit, OnDestroy { }; }); - this.assets$ = this.utmNetScanService.onRefresh$ + this.utmNetScanService.onRefresh$ .pipe( + takeUntil(this.destroy$), filter(refresh => !!refresh), - switchMap(() => this.utmNetScanService.fetchData(this.requestParam)), + switchMap(() => { + this.loading = true; + return this.utmNetScanService.fetchData(this.requestParam); + }), tap((response: HttpResponse) => { this.totalItems = Number(response.headers.get('X-Total-Count')); - this.loading = false; - this.assets = response.body; this.noData = response.body.length === 0; }), map((response) => { @@ -127,6 +130,8 @@ export class AssetsViewComponent implements OnInit, OnDestroy { asset.dataInputList = []; } + asset.lastInput = this.getLastInput(asset); + const displayName = asset.assetName && asset.assetIp ? `${asset.assetName} (${asset.assetIp})` : asset.assetName ? asset.assetName : asset.assetIp ? asset.assetIp : 'Unknown source'; @@ -135,10 +140,24 @@ export class AssetsViewComponent implements OnInit, OnDestroy { return { ...asset, displayName, sortKey }; }); }) - ); + ) + .subscribe( { + next: (assets: NetScanType[]) => { + this.assets = assets; + this.loading = false; + this.cdr.markForCheck(); + }, + error: () => { + this.assets = []; + this.loading = false; + this.cdr.markForCheck(); + this.utmToastService.showError('Error loading assets', + 'There was an error while trying to load assets, please try again'); + } + }); this.utmNetScanService.notifyRefresh(true); - //this.starInterval(); + // this.starInterval(); } setInitialWidth() { @@ -180,12 +199,26 @@ export class AssetsViewComponent implements OnInit, OnDestroy { onSortBy($event: SortEvent) { if ($event.column === 'displayName') { this.sortAssets($event.direction); + } else if ($event.column === 'lastInput') { + this.sortLastInput($event.direction); } else { this.requestParam.sort = $event.column + ',' + $event.direction; this.getAssets(); } } + sortLastInput(direction: SortDirection) { + this.assets.sort((a, b) => { + const t1 = a.lastInputTimestamp ? a.lastInputTimestamp : -Infinity; + const t2 = b.lastInputTimestamp ? b.lastInputTimestamp : -Infinity; + + return direction === 'asc' + ? t1 - t2 + : t2 - t1; + }); + } + + sortAssets(direction: SortDirection) { this.assets.sort((a, b) => { @@ -355,22 +388,23 @@ export class AssetsViewComponent implements OnInit, OnDestroy { }); } - getLastInput(asset: NetScanType) { + console.log('getLastInput', asset.lastInput); if (asset.dataInputList.length > 0) { - const lastInput = asset.dataInputList.sort((a, b) => a.timestamp > b.timestamp ? 1 : -1)[0].timestamp; - return this.datePipe.transform(this.formatTimestampToDate(lastInput)); - } else { - return 'Unknown'; + const lastInput = asset.dataInputList[asset.dataInputList.length - 1].timestamp; + asset.lastInputTimestamp = lastInput; + return this.formatTimestampToDate(lastInput); } + + asset.lastInputTimestamp = null; + return 'Unknown'; } + formatTimestampToDate(time: number) { - const date = moment.unix(time); - return moment.utc(date).format('YYYY-MM-DD HH:mm:ss'); + return moment.unix(time).utc().toISOString(); } - toggleAsset(asset: NetScanType) { if (this.viewAssetDetail && this.viewAssetDetail.id === asset.id) { this.viewAssetDetail = undefined; @@ -439,6 +473,9 @@ export class AssetsViewComponent implements OnInit, OnDestroy { } ngOnDestroy(): void { + this.destroy$.next(); + this.destroy$.complete(); + this.utmNetScanService.notifyRefresh(false); this.stopInterval(true); this.assetFiltersBehavior.$assetFilter.next(null); } diff --git a/frontend/src/app/assets-discover/shared/components/assets-apply-note/assets-apply-note.component.ts b/frontend/src/app/assets-discover/shared/components/assets-apply-note/assets-apply-note.component.ts index 41138116b..4702a6043 100644 --- a/frontend/src/app/assets-discover/shared/components/assets-apply-note/assets-apply-note.component.ts +++ b/frontend/src/app/assets-discover/shared/components/assets-apply-note/assets-apply-note.component.ts @@ -24,7 +24,11 @@ export class AssetsApplyNoteComponent implements OnInit { addNote() { this.creating = true; - this.utmNetScanService.update(this.asset).subscribe(response => { + const asset = { + ...this.asset, + metrics: [] + }; + this.utmNetScanService.update(asset).subscribe(response => { this.utmToastService.showSuccessBottom('Comment added successfully'); this.applyNote.emit('success'); this.focus.emit(false); diff --git a/frontend/src/app/assets-discover/shared/types/net-scan.type.ts b/frontend/src/app/assets-discover/shared/types/net-scan.type.ts index 3d2b67cb0..42212b4e4 100644 --- a/frontend/src/app/assets-discover/shared/types/net-scan.type.ts +++ b/frontend/src/app/assets-discover/shared/types/net-scan.type.ts @@ -27,7 +27,7 @@ export class NetScanType { modifiedAt: Date; ports: NetScanPortsType[]; assetNotes: string; - metrics: NetScanMetricsType; + metrics: any; softwares: NetScanSoftwares[]; registeredMode: AssetDiscoveryTypeEnum; agent: boolean; @@ -37,4 +37,6 @@ export class NetScanType { assetOsMajorVersion?: string; displayName?: string; sortKey?: string; + lastInput: string; + lastInputTimestamp: number; } diff --git a/frontend/src/app/compliance/compliance-reports-view/components/compliance-print-view/compliance-print-view.component.html b/frontend/src/app/compliance/compliance-reports-view/components/compliance-print-view/compliance-print-view.component.html index 49a949363..bdb08cc26 100644 --- a/frontend/src/app/compliance/compliance-reports-view/components/compliance-print-view/compliance-print-view.component.html +++ b/frontend/src/app/compliance/compliance-reports-view/components/compliance-print-view/compliance-print-view.component.html @@ -1,4 +1,4 @@ -
+

Compliance Assessment diff --git a/frontend/src/app/core/auth/api-checker-service.ts b/frontend/src/app/core/auth/api-checker-service.ts index d85f1cd4d..aa50270b4 100644 --- a/frontend/src/app/core/auth/api-checker-service.ts +++ b/frontend/src/app/core/auth/api-checker-service.ts @@ -1,7 +1,7 @@ -import {HttpClient} from '@angular/common/http'; +import {HttpClient, HttpResponse} from '@angular/common/http'; import {Injectable} from '@angular/core'; -import {BehaviorSubject, interval, Observable, Subject} from 'rxjs'; -import {first, takeUntil} from 'rxjs/operators'; +import {BehaviorSubject, interval, Observable, of, Subject, Subscription} from 'rxjs'; +import {catchError, distinctUntilChanged, filter, first, map, takeUntil, tap} from 'rxjs/operators'; import {SERVER_API_URL} from '../../app.constants'; @Injectable({ @@ -10,37 +10,56 @@ import {SERVER_API_URL} from '../../app.constants'; export class ApiServiceCheckerService { public resourceUrl = SERVER_API_URL + 'api/ping'; - private retryInterval = 3000; - private isOnline: BehaviorSubject = new BehaviorSubject(null); - public isOnlineApi$: Observable = this.isOnline.asObservable(); - private stopInterval$: Subject = new Subject(); + private retryInterval = 5000; - constructor(private http: HttpClient) { + private isOnline = new BehaviorSubject(false); + public isOnlineApi$ = this.isOnline.asObservable(); + + private stopInterval$ = new Subject(); + private intervalSub?: Subscription; + + constructor(private http: HttpClient) { } + + init() { this.checkApiAvailability(); + + this.isOnlineApi$ + .pipe(distinctUntilChanged()) + .subscribe(isOnline => { + if (!isOnline) { + this.startCheckApiIsOnline(); + } else { + this.stopChecking(); + } + }); } - checkApiAvailability() { - interval(this.retryInterval) + private checkApiAvailability() { + this.checkApiStatus() + .subscribe(status => this.isOnline.next(status)); + } + + private checkApiStatus(): Observable { + return this.http.get(this.resourceUrl, { observe: 'response' }).pipe( + map(res => res.status === 200), + catchError(() => of(false)) + ); + } + + private startCheckApiIsOnline() { + if (this.intervalSub) { return; } + + this.intervalSub = interval(this.retryInterval) .pipe(takeUntil(this.stopInterval$)) .subscribe(() => { - this.http - .get(this.resourceUrl, { observe: 'response' }) - .pipe(first()) - .subscribe( - resp => { - if (resp.status === 200) { - this.isOnline.next(true); - this.stopInterval$.next(true); - } else { - this.isOnline.next(false); - } - }, - err => this.isOnline.next(false) - ); - }); + this.checkApiStatus(). + subscribe(status => this.isOnline.next(status)); + }); } - setOnlineStatus(status: boolean) { - this.isOnline.next(status); + private stopChecking() { + this.stopInterval$.next(); + this.intervalSub.unsubscribe(); + this.intervalSub = undefined; } } diff --git a/frontend/src/app/dashboard/compliance-export/compliance-export.component.html b/frontend/src/app/dashboard/compliance-export/compliance-export.component.html index f7402df1c..ded496106 100644 --- a/frontend/src/app/dashboard/compliance-export/compliance-export.component.html +++ b/frontend/src/app/dashboard/compliance-export/compliance-export.component.html @@ -18,7 +18,7 @@ -
+
diff --git a/frontend/src/app/dashboard/dashboard-export-pdf/dashboard-export-pdf.component.html b/frontend/src/app/dashboard/dashboard-export-pdf/dashboard-export-pdf.component.html index 653755006..96bfb8f22 100644 --- a/frontend/src/app/dashboard/dashboard-export-pdf/dashboard-export-pdf.component.html +++ b/frontend/src/app/dashboard/dashboard-export-pdf/dashboard-export-pdf.component.html @@ -13,7 +13,7 @@
-
+
-
+
-
+
-
+
diff --git a/frontend/src/app/dashboard/dashboard-overview/dashboard-overview.component.scss b/frontend/src/app/dashboard/dashboard-overview/dashboard-overview.component.scss index 67ad9f9b8..c396a3d2f 100644 --- a/frontend/src/app/dashboard/dashboard-overview/dashboard-overview.component.scss +++ b/frontend/src/app/dashboard/dashboard-overview/dashboard-overview.component.scss @@ -16,3 +16,10 @@ .card-header-chart { padding-right: 0 !important; } + +@media print { + .d-print-block { + display: block !important; + overflow: visible !important; + } +} diff --git a/frontend/src/app/dashboard/dashboard-render/dashboard-render.component.ts b/frontend/src/app/dashboard/dashboard-render/dashboard-render.component.ts index d3f48e2a6..f8266ee66 100644 --- a/frontend/src/app/dashboard/dashboard-render/dashboard-render.component.ts +++ b/frontend/src/app/dashboard/dashboard-render/dashboard-render.component.ts @@ -177,8 +177,9 @@ export class DashboardRenderComponent implements OnInit, OnDestroy, AfterViewIni exportToPdf() { filtersToStringParam(this.filtersValues).then(queryParams => { this.spinner.show('buildPrintPDF'); - const url = '/dashboard/export/' + this.dashboard.id + '/' + normalizeString(this.dashboard.name) + '?' + queryParams; - // window.open('/dashboard/export/' + this.dashboardId + '/' + normalizeString(this.dashboard.name) + '?' + queryParams, '_blank'); + const safeParams = new URLSearchParams(queryParams).toString(); + const url = `/dashboard/export/${this.dashboard.id}/${normalizeString(this.dashboard.name)}?${safeParams}`; + this.exportPdfService.getPdf(url, this.dashboard.name, 'PDF_TYPE_TOKEN').subscribe(response => { this.spinner.hide('buildPrintPDF').then(() => this.exportPdfService.handlePdfResponse(response)); diff --git a/frontend/src/app/dashboard/shared/render-visualization-print/render-visualization-print.component.html b/frontend/src/app/dashboard/shared/render-visualization-print/render-visualization-print.component.html index ff7265b27..56cd22ed5 100644 --- a/frontend/src/app/dashboard/shared/render-visualization-print/render-visualization-print.component.html +++ b/frontend/src/app/dashboard/shared/render-visualization-print/render-visualization-print.component.html @@ -1,5 +1,5 @@
-
this.visualizationLoaded.emit(true), 3000); - console.log('All the visualizations now has rendered'); + this.visualizationLoaded.emit(true); } } } diff --git a/frontend/src/app/graphic-builder/shared/components/viewer/chart-view/chart-view.component.ts b/frontend/src/app/graphic-builder/shared/components/viewer/chart-view/chart-view.component.ts index 34da00e67..7377d17db 100644 --- a/frontend/src/app/graphic-builder/shared/components/viewer/chart-view/chart-view.component.ts +++ b/frontend/src/app/graphic-builder/shared/components/viewer/chart-view/chart-view.component.ts @@ -78,8 +78,10 @@ export class ChartViewComponent implements OnInit, OnDestroy { this.data$ = this.refreshService.refresh$ .pipe( takeUntil(this.destroy$), - filter((refreshType) => refreshType === RefreshType.ALL || - refreshType === this.refreshType), + filter((refreshType) => { + return refreshType === RefreshType.ALL || + refreshType === this.refreshType; + }), switchMap((value, index) => this.runVisualization())); @@ -131,7 +133,11 @@ export class ChartViewComponent implements OnInit, OnDestroy { if (!this.defaultTime) { this.defaultTime = resolveDefaultVisualizationTime(this.visualization); - this.refreshService.sendRefresh(this.refreshType); + + if (!this.defaultTime) { + this.refreshService.sendRefresh(this.refreshType); + } + } } diff --git a/frontend/src/app/graphic-builder/shared/components/viewer/goal-view/goal-view.component.ts b/frontend/src/app/graphic-builder/shared/components/viewer/goal-view/goal-view.component.ts index af6d39e6d..94882ebd9 100644 --- a/frontend/src/app/graphic-builder/shared/components/viewer/goal-view/goal-view.component.ts +++ b/frontend/src/app/graphic-builder/shared/components/viewer/goal-view/goal-view.component.ts @@ -95,7 +95,11 @@ export class GoalViewComponent implements OnInit, OnDestroy { if (!this.defaultTime) { this.defaultTime = resolveDefaultVisualizationTime(this.visualization); - this.refreshService.sendRefresh(this.refreshType); + + if (!this.defaultTime) { + this.refreshService.sendRefresh(this.refreshType); + } + } } diff --git a/frontend/src/app/graphic-builder/shared/components/viewer/map-view/map-view.component.ts b/frontend/src/app/graphic-builder/shared/components/viewer/map-view/map-view.component.ts index bbf2c48c0..f0fe83e1d 100644 --- a/frontend/src/app/graphic-builder/shared/components/viewer/map-view/map-view.component.ts +++ b/frontend/src/app/graphic-builder/shared/components/viewer/map-view/map-view.component.ts @@ -324,7 +324,11 @@ export class MapViewComponent implements OnInit, AfterViewInit, OnDestroy { if (!this.defaultTime) { this.defaultTime = resolveDefaultVisualizationTime(this.visualization); - this.refreshService.sendRefresh(this.refreshType); + + if (!this.defaultTime) { + this.refreshService.sendRefresh(this.refreshType); + } + } } diff --git a/frontend/src/app/graphic-builder/shared/components/viewer/metric-view/metric-view.component.ts b/frontend/src/app/graphic-builder/shared/components/viewer/metric-view/metric-view.component.ts index c62ce7511..b4ae1abbb 100644 --- a/frontend/src/app/graphic-builder/shared/components/viewer/metric-view/metric-view.component.ts +++ b/frontend/src/app/graphic-builder/shared/components/viewer/metric-view/metric-view.component.ts @@ -100,7 +100,11 @@ export class MetricViewComponent implements OnInit, OnDestroy { if (!this.defaultTime) { this.defaultTime = resolveDefaultVisualizationTime(this.visualization); - this.refreshService.sendRefresh(this.refreshType); + + if (!this.defaultTime) { + this.refreshService.sendRefresh(this.refreshType); + } + } } diff --git a/frontend/src/app/graphic-builder/shared/components/viewer/table-view/table-view.component.ts b/frontend/src/app/graphic-builder/shared/components/viewer/table-view/table-view.component.ts index 02438d976..fb87dd3d0 100644 --- a/frontend/src/app/graphic-builder/shared/components/viewer/table-view/table-view.component.ts +++ b/frontend/src/app/graphic-builder/shared/components/viewer/table-view/table-view.component.ts @@ -127,7 +127,11 @@ export class TableViewComponent implements OnInit, OnChanges, OnDestroy { if (!this.defaultTime) { this.defaultTime = resolveDefaultVisualizationTime(this.visualization); - this.refreshService.sendRefresh(this.refreshType); + + if (!this.defaultTime) { + this.refreshService.sendRefresh(this.refreshType); + } + } } diff --git a/frontend/src/app/rule-management/app-correlation-management/components/patterns/patterns.component.ts b/frontend/src/app/rule-management/app-correlation-management/components/patterns/patterns.component.ts index 145c3cf51..9157b31f1 100644 --- a/frontend/src/app/rule-management/app-correlation-management/components/patterns/patterns.component.ts +++ b/frontend/src/app/rule-management/app-correlation-management/components/patterns/patterns.component.ts @@ -97,10 +97,6 @@ export class PatternsComponent implements OnInit, OnDestroy { } loadPage($event: number) { - if (this.isInitialized) { - this.isInitialized = false; - return; - } const page = $event - 1; this.request = { ...this.request, @@ -133,13 +129,11 @@ export class PatternsComponent implements OnInit, OnDestroy { } onItemsPerPageChange($event: number) { - if (this.isInitialized) { - this.isInitialized = false; - return; - } this.itemsPerPage = $event; + this.page = 0; this.request = { ...this.request, + page: this.page, size: this.itemsPerPage }; this.loadRegexPatterns(); diff --git a/frontend/src/app/rule-management/app-correlation-management/components/types/types.component.ts b/frontend/src/app/rule-management/app-correlation-management/components/types/types.component.ts index 228e68dba..a74085582 100644 --- a/frontend/src/app/rule-management/app-correlation-management/components/types/types.component.ts +++ b/frontend/src/app/rule-management/app-correlation-management/components/types/types.component.ts @@ -66,7 +66,6 @@ export class TypesComponent implements OnInit, OnDestroy { tap((data: { response: HttpResponse }) => { this.types = data.response.body; this.totalItems = parseInt(data.response.headers.get('X-Total-Count') || '0', 10); - console.log('TOTAL', this.totalItems); this.isInitialized = true; }), map((data: { response: HttpResponse }) => data.response.body) diff --git a/frontend/src/app/rule-management/app-rule/app-rule.component.html b/frontend/src/app/rule-management/app-rule/app-rule.component.html index 7743e9f51..1a317acb5 100644 --- a/frontend/src/app/rule-management/app-rule/app-rule.component.html +++ b/frontend/src/app/rule-management/app-rule/app-rule.component.html @@ -32,7 +32,7 @@
Manage Rules
-
+
diff --git a/frontend/src/app/rule-management/app-rule/app-rule.component.ts b/frontend/src/app/rule-management/app-rule/app-rule.component.ts index 030e471bd..84d42fd75 100644 --- a/frontend/src/app/rule-management/app-rule/app-rule.component.ts +++ b/frontend/src/app/rule-management/app-rule/app-rule.component.ts @@ -3,7 +3,7 @@ import {SERVER_API_URL} from '../../app.constants'; import {EventDataTypeEnum} from '../../data-management/alert-management/shared/enums/event-data-type.enum'; import {Actions} from '../app-correlation-management/models/config.type'; import {ConfigService} from '../app-correlation-management/services/config.service'; -import {FILTER_RULE_FIELDS} from '../models/rule.constant'; +import {RULE_FILTERS_FIELDS} from '../models/rule.constant'; import {FilterService} from '../services/filter.service'; @@ -21,10 +21,12 @@ export class AppRuleComponent implements OnInit { } dataType: EventDataTypeEnum = EventDataTypeEnum.ALERT; - fieldFilters = FILTER_RULE_FIELDS; + ruleFilters = RULE_FILTERS_FIELDS; filterUrl = `${SERVER_API_URL}api/correlation-rule/search-property-values`; - ngOnInit() {} + ngOnInit() { + console.log(this.ruleFilters); + } addRule(action: Actions) { this.configService.onAction(action); diff --git a/frontend/src/app/rule-management/app-rule/components/add-rule/add-rule.component.html b/frontend/src/app/rule-management/app-rule/components/add-rule/add-rule.component.html index f3091f0d4..7a3e20944 100644 --- a/frontend/src/app/rule-management/app-rule/components/add-rule/add-rule.component.html +++ b/frontend/src/app/rule-management/app-rule/components/add-rule/add-rule.component.html @@ -221,8 +221,11 @@
-
- +
+ +
+
+
@@ -282,9 +285,9 @@ Next   -
diff --git a/frontend/src/app/rule-management/app-rule/components/add-rule/add-rule.component.ts b/frontend/src/app/rule-management/app-rule/components/add-rule/add-rule.component.ts index bdade549f..315773845 100644 --- a/frontend/src/app/rule-management/app-rule/components/add-rule/add-rule.component.ts +++ b/frontend/src/app/rule-management/app-rule/components/add-rule/add-rule.component.ts @@ -174,6 +174,7 @@ export class AddRuleComponent implements OnInit, OnDestroy { definition: [rule ? rule.definition : '', [Validators.required, minWordsValidator(2, 3)]], systemOwner: [rule ? rule.systemOwner : false], deduplicateBy: [rule ? rule.deduplicateBy || [] : []], + groupBy: [rule ? rule.groupBy || [] : []], afterEvents: this.fb.array( rule && rule.afterEvents && rule.afterEvents.length ? rule.afterEvents.map(event => this.buildSearchRequest(event)) diff --git a/frontend/src/app/rule-management/app-rule/components/deduplicate-fields/deduplicate-fields.component.css b/frontend/src/app/rule-management/app-rule/components/fields-selector/fields-selector.component.css similarity index 100% rename from frontend/src/app/rule-management/app-rule/components/deduplicate-fields/deduplicate-fields.component.css rename to frontend/src/app/rule-management/app-rule/components/fields-selector/fields-selector.component.css diff --git a/frontend/src/app/rule-management/app-rule/components/deduplicate-fields/deduplicate-fields.component.html b/frontend/src/app/rule-management/app-rule/components/fields-selector/fields-selector.component.html similarity index 72% rename from frontend/src/app/rule-management/app-rule/components/deduplicate-fields/deduplicate-fields.component.html rename to frontend/src/app/rule-management/app-rule/components/fields-selector/fields-selector.component.html index cb6e72341..e653cf220 100644 --- a/frontend/src/app/rule-management/app-rule/components/deduplicate-fields/deduplicate-fields.component.html +++ b/frontend/src/app/rule-management/app-rule/components/fields-selector/fields-selector.component.html @@ -1,8 +1,8 @@
- +
; operators = [ @@ -28,7 +29,7 @@ export class DeduplicateFieldsComponent implements OnInit { private fieldDataService: FieldDataService) { } ngOnInit() { - this.fields$ = this.fieldDataService.getFields(ALERT_INDEX_PATTERN).pipe( + this.fields$ = this.fieldDataService.getFields(LOG_INDEX_PATTERN).pipe( map((fields) => fields || []), catchError((error) => { this.toastService.showError('Error', 'Failed to load fields'); diff --git a/frontend/src/app/rule-management/app-rule/components/import-rules/import-rule.component.ts b/frontend/src/app/rule-management/app-rule/components/import-rules/import-rule.component.ts index 415c39072..b4683d73d 100644 --- a/frontend/src/app/rule-management/app-rule/components/import-rules/import-rule.component.ts +++ b/frontend/src/app/rule-management/app-rule/components/import-rules/import-rule.component.ts @@ -160,7 +160,6 @@ export class ImportRuleComponent implements OnInit, OnDestroy { }; const {isValid, errors} = this.importRuleService.isValidRule(rule); - // move null fields (required and not sended) upper than others Object.keys(rule).forEach(key => { if (rule[key] === null) { rule = {[key]: null, ...rule}; diff --git a/frontend/src/app/rule-management/app-rule/components/import-rules/import-rule.service.ts b/frontend/src/app/rule-management/app-rule/components/import-rules/import-rule.service.ts index eeb069f6b..100c69594 100644 --- a/frontend/src/app/rule-management/app-rule/components/import-rules/import-rule.service.ts +++ b/frontend/src/app/rule-management/app-rule/components/import-rules/import-rule.service.ts @@ -14,7 +14,7 @@ export class ImportRuleService { } private minWordsCheck(value: string, min: number, minLengthPerWord: number): boolean { - if (!value) return false; + if (!value) { return false; } const words = value.trim().split(/\s+/).filter(word => word.length >= minLengthPerWord); return words.length >= min; @@ -29,150 +29,151 @@ export class ImportRuleService { // dataTypes if (!Array.isArray(obj.dataTypes) || obj.dataTypes.length === 0) { - if(!obj.dataTypes){ - obj.dataTypes=null + if (!obj.dataTypes) { + obj.dataTypes = null; } - errors['dataTypes'] = ['dataTypes are required']; + errors.dataTypes = ['dataTypes are required']; } // name if (typeof obj.name !== 'string' || obj.name.trim() === '') { - if(!obj.name){ - obj.name=null + if (!obj.name) { + obj.name = null; } - errors['name'] = ['Name is required']; + errors.name = ['Name is required']; } else if (!this.minWordsCheck(obj.name, 2, 3)) { - errors['name'] = ['Name must contain between 2 and 3 words']; + errors.name = ['Name must contain between 2 and 3 words']; } // adversary if (typeof obj.adversary !== 'string' || obj.adversary.trim() === '') { - if(!obj.adversary){ - obj.adversary=null + if (!obj.adversary) { + obj.adversary = null; } - errors['adversary'] = ['Adversary is required']; - }else if(!['origin','target'].includes(obj.adversary) ){ - errors['adversary'] = ['Adversary must be one of these: "origin", "target"']; + errors.adversary = ['Adversary is required']; + } else if (!['origin', 'target'].includes(obj.adversary) ) { + errors.adversary = ['Adversary must be one of these: "origin", "target"']; } // confidentiality if (typeof obj.confidentiality !== 'number') { - if(!obj.confidentiality){ - obj.confidentiality=null - errors['confidentiality'] = ['Confidentiality is required']; - }else{ - errors['confidentiality'] = ['Confidentiality must be a number']; + if (!obj.confidentiality) { + obj.confidentiality = null; + errors.confidentiality = ['Confidentiality is required']; + } else { + errors.confidentiality = ['Confidentiality must be a number']; } } else if (obj.confidentiality < 0 || obj.confidentiality > 3) { - errors['confidentiality'] = ['Confidentiality must be between 0 and 3']; + errors.confidentiality = ['Confidentiality must be between 0 and 3']; } // integrity if (typeof obj.integrity !== 'number') { - if(!obj.integrity){ - obj.integrity=null - errors['integrity'] = ['Integrity is required']; - }else{ - errors['integrity'] = ['Integrity must be a number']; + if (!obj.integrity) { + obj.integrity = null; + errors.integrity = ['Integrity is required']; + } else { + errors.integrity = ['Integrity must be a number']; } } else if (obj.integrity < 0 || obj.integrity > 3) { - errors['integrity'] = ['Integrity must be between 0 and 3']; + errors.integrity = ['Integrity must be between 0 and 3']; } // availability if (typeof obj.availability !== 'number') { - if(!obj.availability){ - obj.availability=null - errors['availability'] = ['Availability is required']; - }else{ - errors['availability'] = ['Availability must be a number']; + if (!obj.availability) { + obj.availability = null; + errors.availability = ['Availability is required']; + } else { + errors.availability = ['Availability must be a number']; } } else if (obj.availability < 0 || obj.availability > 3) { - errors['availability'] = ['Availability must be between 0 and 3']; + errors.availability = ['Availability must be between 0 and 3']; } // category if (typeof obj.category !== 'string' || obj.category.trim() === '') { - if(!obj.category){ - obj.category=null + if (!obj.category) { + obj.category = null; } - errors['category'] = ['Category is required']; + errors.category = ['Category is required']; } else if (!this.minWordsCheck(obj.category, 1, 3)) { - errors['category'] = ['Category must contain between 1 and 3 words']; + errors.category = ['Category must contain between 1 and 3 words']; } // technique if (typeof obj.technique !== 'string' || obj.technique.trim() === '') { - if(!obj.technique){ - obj.technique=null + if (!obj.technique) { + obj.technique = null; } - errors['technique'] = ['Technique is required']; + errors.technique = ['Technique is required']; } else if (!this.minWordsCheck(obj.technique, 1, 3)) { - errors['technique'] = ['Technique must contain between 1 and 3 words']; + errors.technique = ['Technique must contain between 1 and 3 words']; } // description if (typeof obj.description !== 'string' || obj.description.trim() === '') { - if(!obj.description){ - obj={description:null,...obj} + if (!obj.description) { + obj = {description: null, ...obj}; } - errors['description'] = ['Description is required']; + errors.description = ['Description is required']; } else if (!this.minWordsCheck(obj.description, 2, 3)) { - errors['description'] = ['Description must contain between 2 and 3 words']; + errors.description = ['Description must contain between 2 and 3 words']; } // definition if (typeof obj.definition !== 'string' || obj.definition.trim() === '') { - if(!obj.definition){ - obj.definition=null + if (!obj.definition) { + obj.definition = null; } - errors['definition'] = ['Definition is required']; + errors.definition = ['Definition is required']; } else if (!this.minWordsCheck(obj.definition, 2, 3)) { - errors['definition'] = ['Definition must contain between 2 and 3 words']; + errors.definition = ['Definition must contain between 2 and 3 words']; } // references if (!Array.isArray(obj.references)) { - if(!obj.references){ - obj.references=null - errors['references'] = ['References is required']; - }else{ - errors['references'] = ['References must be an array']; + if (!obj.references) { + obj.references = null; + errors.references = ['References is required']; + } else { + errors.references = ['References must be an array']; } } else { const invalidRefs = obj.references.filter((ref: any) => typeof ref !== 'string' || !this.isValidURL(ref)); if (invalidRefs.length > 0) { - errors['references'] = ['All references must be valid URLs']; + errors.references = ['All references must be valid URLs']; } } const allowedFields = [ - "id", - "dataTypes", - "impact", - "where", - "afterEvents", - "name", - "adversary", - "confidentiality", - "integrity", - "availability", + 'id', + 'dataTypes', + 'impact', + 'where', + 'afterEvents', + 'name', + 'adversary', + 'confidentiality', + 'integrity', + 'availability', 'references', - "category", - "technique", - "description", - "definition", - "systemOwner", - "deduplicateBy" + 'category', + 'technique', + 'description', + 'definition', + 'systemOwner', + 'deduplicateBy', + 'groupBy' ]; - Object.keys(obj).filter(key=>!allowedFields.includes(key)).forEach(key=>{ - errors[key]=[`uknowed field: ${key}`] + Object.keys(obj).filter(key => !allowedFields.includes(key)).forEach(key => { + errors[key] = [`uknowed field: ${key}`]; }); diff --git a/frontend/src/app/rule-management/app-rule/components/rule-list/rule-list.component.html b/frontend/src/app/rule-management/app-rule/components/rule-list/rule-list.component.html index 9b368a475..f715e1dff 100644 --- a/frontend/src/app/rule-management/app-rule/components/rule-list/rule-list.component.html +++ b/frontend/src/app/rule-management/app-rule/components/rule-list/rule-list.component.html @@ -15,9 +15,9 @@ [ngStyle]="{'width': item.width}" *ngFor="let item of fields; let i = index" [hidden]="!item.visible" - [isSortable]="true" + [isSortable]="!!item.sortField" [sortEvent]="sortEvent" - [sortable]="item.field" + [sortable]="item.sortField" appColumnSortable class="font-weight-semibold cursor-pointer"> {{item.label}} diff --git a/frontend/src/app/rule-management/models/rule.constant.ts b/frontend/src/app/rule-management/models/rule.constant.ts index 9f4aac9a7..4fe430a1a 100644 --- a/frontend/src/app/rule-management/models/rule.constant.ts +++ b/frontend/src/app/rule-management/models/rule.constant.ts @@ -9,6 +9,7 @@ export const RULE_CONFIDENTIALITY = 'confidentiality'; export const RULE_INTEGRITY = 'integrity'; export const RULE_AVAILABILITY = 'availability'; export const RULE_ADVERSARY = 'adversary'; +export const RULE_STATUS = 'active'; // FILTERS FIELDS @@ -17,6 +18,7 @@ export const RULE_FILTER_DATA_TYPES = 'RULE_DATA_TYPES'; export const RULE_FILTER_CATEGORY = 'RULE_CATEGORY'; export const RULE_FILTER_TECHNIQUE = 'RULE_TECHNIQUE'; export const RULE_FILTER_ADVERSARY = 'RULE_ADVERSARY'; +export const RULE_FILTER_STATUS = 'RULE_STATUS'; export const RULE_FILTER_REFERENCES = 'references'; @@ -27,7 +29,8 @@ export const RULE_FIELDS: UtmFieldType[] = [ type: ElasticDataTypesEnum.STRING, visible: true, filter: false, - width: '30%' + width: '30%', + sortField: 'ruleName', }, { label: 'Types', @@ -45,7 +48,8 @@ export const RULE_FIELDS: UtmFieldType[] = [ visible: true, filter: true, filterField: RULE_FILTER_CATEGORY, - width: '15%' + width: '15%', + sortField: 'ruleCategory', }, { label: 'Technique', @@ -54,7 +58,8 @@ export const RULE_FIELDS: UtmFieldType[] = [ visible: true, filter: true, filterField: RULE_FILTER_TECHNIQUE, - width: '30%' + width: '30%', + sortField: 'ruleTechnique' }, { label: 'Adversary', @@ -63,7 +68,8 @@ export const RULE_FIELDS: UtmFieldType[] = [ visible: true, filter: true, filterField: RULE_FILTER_ADVERSARY, - width: '10%' + width: '10%', + sortField: 'ruleAdversary' }, { label: 'Confidentiality', @@ -71,7 +77,8 @@ export const RULE_FIELDS: UtmFieldType[] = [ type: ElasticDataTypesEnum.STRING, visible: true, filter: false, - width: '5%' + width: '5%', + sortField: 'ruleConfidentiality' }, { label: 'Integrity', @@ -79,7 +86,8 @@ export const RULE_FIELDS: UtmFieldType[] = [ type: ElasticDataTypesEnum.STRING, visible: true, filter: false, - width: '5%' + width: '5%', + sortField: 'ruleIntegrity' }, { label: 'Availability', @@ -87,11 +95,25 @@ export const RULE_FIELDS: UtmFieldType[] = [ type: ElasticDataTypesEnum.STRING, visible: true, filter: false, - width: '5%' + width: '5%', + sortField: 'ruleAvailability' }, ]; -export const FILTER_RULE_FIELDS = RULE_FIELDS.filter(f => f.filter); +export const RULE_FILTERS_FIELDS = [ + { + label: 'Status', + field: RULE_STATUS, + type: ElasticDataTypesEnum.BOOLEAN, + visible: true, + filter: true, + width: '5%', + sortField: 'ruleActive', + filterField: RULE_FILTER_STATUS, + formatValue: (value: boolean) => value ? 'Active' : 'Inactive' + }, + ... RULE_FIELDS.filter(f => f.filter) +] export interface RuleFilterType { ruleName?: string; diff --git a/frontend/src/app/rule-management/models/rule.model.ts b/frontend/src/app/rule-management/models/rule.model.ts index adf7168c9..781ad68e9 100644 --- a/frontend/src/app/rule-management/models/rule.model.ts +++ b/frontend/src/app/rule-management/models/rule.model.ts @@ -74,6 +74,7 @@ export interface Rule { isLoading: boolean; afterEvents: SearchRequest[]; deduplicateBy?: string[]; + groupBy?: string[]; } export interface Expression { diff --git a/frontend/src/app/rule-management/rule-management.module.ts b/frontend/src/app/rule-management/rule-management.module.ts index 84b990677..6d4b76f2b 100644 --- a/frontend/src/app/rule-management/rule-management.module.ts +++ b/frontend/src/app/rule-management/rule-management.module.ts @@ -29,7 +29,7 @@ import {AppRuleComponent} from './app-rule/app-rule.component'; import {AddAfterEventComponent} from './app-rule/components/add-after-event/add-after-event.component'; import {AddRuleComponent} from './app-rule/components/add-rule/add-rule.component'; import {AddVariableComponent} from './app-rule/components/add-variable/add-variable.component'; -import {DeduplicateFieldsComponent} from './app-rule/components/deduplicate-fields/deduplicate-fields.component'; +import {FieldsSelectorComponent} from './app-rule/components/fields-selector/fields-selector.component'; import {ExpressionConsoleComponent} from './app-rule/components/expression-console/expression-console.component'; import {ImportRuleComponent} from './app-rule/components/import-rules/import-rule.component'; import {ImportRuleService} from './app-rule/components/import-rules/import-rule.service'; @@ -71,7 +71,7 @@ import {RuleDetailComponent} from "./app-rule/components/rule-list/components/ru AddReferenceComponent, AddVariableComponent, AddAfterEventComponent, - DeduplicateFieldsComponent, + FieldsSelectorComponent, ExpressionConsoleComponent, RuleDetailComponent diff --git a/frontend/src/app/rule-management/share/generic-filter/generic-filter.component.html b/frontend/src/app/rule-management/share/generic-filter/generic-filter.component.html index b552ec04a..79c10ee65 100644 --- a/frontend/src/app/rule-management/share/generic-filter/generic-filter.component.html +++ b/frontend/src/app/rule-management/share/generic-filter/generic-filter.component.html @@ -35,7 +35,7 @@ class="mb-0 text-filter" placement="bottom" tooltipClass="utm-tooltip-bottom"> - {{item[0]}} + {{ formatValue(item[0]) }} diff --git a/frontend/src/app/rule-management/share/generic-filter/generic-filter.component.ts b/frontend/src/app/rule-management/share/generic-filter/generic-filter.component.ts index c02c28fb4..b1033eb1a 100644 --- a/frontend/src/app/rule-management/share/generic-filter/generic-filter.component.ts +++ b/frontend/src/app/rule-management/share/generic-filter/generic-filter.component.ts @@ -90,6 +90,13 @@ export class GenericFilterComponent implements OnInit, A this.filterService.notifyRefresh(this.fieldFilter.filterField); } + formatValue(value: string): string { + if (this.fieldFilter.formatValue) { + return this.fieldFilter.formatValue(value); + } + return value; + } + ngOnDestroy(): void { this.filterService.resetFieldValues(); this.destroy$.next(); diff --git a/frontend/src/app/shared/components/getting-started/welcome-to-utmstack/welcome-to-utmstack.component.ts b/frontend/src/app/shared/components/getting-started/welcome-to-utmstack/welcome-to-utmstack.component.ts index c4d076868..7ba819d78 100644 --- a/frontend/src/app/shared/components/getting-started/welcome-to-utmstack/welcome-to-utmstack.component.ts +++ b/frontend/src/app/shared/components/getting-started/welcome-to-utmstack/welcome-to-utmstack.component.ts @@ -21,20 +21,17 @@ import {UtmInstanceInfoComponent} from '../utm-instance-info/utm-instance-info.c templateUrl: './welcome-to-utmstack.component.html', styleUrls: ['./welcome-to-utmstack.component.scss'] }) -export class WelcomeToUtmstackComponent implements OnInit, OnDestroy { +export class WelcomeToUtmstackComponent implements OnInit { private unsubscriber: Subject = new Subject(); accountSetup = true; onlineDoc = ONLINE_DOCUMENTATION_BASE; inSass: boolean; - isIncompleteConfig = false; constructor(private router: Router, private accountService: AccountService, private utmGettingStartedService: GettingStartedService, private gettingStartedBehavior: GettingStartedBehavior, - private modalService: NgbModal, - private utmConfigParamsService: UtmConfigParamsService, - private toastService: UtmToastService) { + private modalService: NgbModal) { } @@ -47,42 +44,12 @@ export class WelcomeToUtmstackComponent implements OnInit, OnDestroy { ).subscribe((_) => { history.pushState(null, ''); }); - - this.utmConfigParamsService.query({ - page: 0, - size: 10000, - 'sectionId.equals': ApplicationConfigSectionEnum.INSTANCE_REGISTRATION, - sort: 'id,asc' - }).pipe( - map(res => - res.body.filter(c => c.confParamShort !== 'utmstack.instance.data' - && c.confParamShort !== 'utmstack.instance.auth')), - tap(config => this.isIncompleteConfig = config.some(c => c.confParamValue === '')), - catchError(err => { - this.toastService.showError('Error', - 'Error occurred while fetching instance registration configuration'); - return of([]); - }) - ) - .subscribe((response) => { - if (this.isIncompleteConfig) { - this.loadInstanceForm(response || []); - } - }); } exit() { this.setUpAdmin(false); } - loadInstanceForm(formConfigs: SectionConfigParamType[]) { - const modal = this.modalService.open(UtmInstanceInfoComponent, {centered: true}); - modal.componentInstance.formConfigs = formConfigs; - - modal.result.then((result) => { - }); - } - setUpAdmin(gettingStarted: boolean) { this.accountService.identity().then(account => { const modal = this.modalService.open(UtmAdminChangeEmailComponent, { @@ -128,13 +95,4 @@ export class WelcomeToUtmstackComponent implements OnInit, OnDestroy { ApplicationConfigSectionEnum.DATE_SETTINGS]; } } - - isRegister(){ - - } - - ngOnDestroy(): void { - this.unsubscriber.next(); - this.unsubscriber.complete(); - } } diff --git a/frontend/src/app/shared/components/utm/config/app-config-sections/app-config-sections.component.html b/frontend/src/app/shared/components/utm/config/app-config-sections/app-config-sections.component.html index dae0f3ac3..2ed339dbc 100644 --- a/frontend/src/app/shared/components/utm/config/app-config-sections/app-config-sections.component.html +++ b/frontend/src/app/shared/components/utm/config/app-config-sections/app-config-sections.component.html @@ -46,10 +46,11 @@
{{section.section | titlecase}}

{{section.description}}

-
-

placement="auto"> {{conf.confParamLarge}} - + @@ -69,143 +70,145 @@
{{section.section | titlecase}}
ngbTooltip="If you change this config an application reload will be necessary, when we ready to reload a notice show up" placement="auto">
- -
- + - - -
- - - {{ conf.confParamLarge }} is invalid - - - - - - - Please enter valid email addresses separated by commas. - - - - - ({{ item.timezone | timezoneOffset }}) {{ item.label }} - - - - - - - {{item.label + ' (' + item.equivalentTo + ')'}} - - - - -
-
-
- -   - {{option}} - -
-
+ [id]="'sectionParam'+conf.id" + [required]="conf.confParamRequired" + [disabled]="checkDisable(conf)" + [type]="conf.confParamDatatype" class="form-control pr-5"> + +
-
- - - + {{ conf.confParamLarge }} is invalid + + + + + + + + Please enter valid email addresses separated by commas. + + + - - - - - - - - - + id="timezoneSetting"> + + ({{ item.timezone | timezoneOffset }}) {{ item.label }} - - - - - + + + {{item.label + ' (' + item.equivalentTo + ')'}} + + + +
+
+
+ +   + {{option}} + +
+
+
+
+ + + - + + + + + + + + + + + + + + + + + + + - Param {{conf.confParamLarge}} is required - - + class="text-danger"> + Param {{conf.confParamLarge}} is required + + +
diff --git a/frontend/src/app/shared/components/utm/config/app-config-sections/app-config-sections.component.ts b/frontend/src/app/shared/components/utm/config/app-config-sections/app-config-sections.component.ts index f81340280..e210ce30e 100644 --- a/frontend/src/app/shared/components/utm/config/app-config-sections/app-config-sections.component.ts +++ b/frontend/src/app/shared/components/utm/config/app-config-sections/app-config-sections.component.ts @@ -14,6 +14,7 @@ import {UtmConfigParamsService} from '../../../../services/config/utm-config-par import {LocationService, SelectOption} from '../../../../services/location.service'; import {NetworkService} from '../../../../services/network.service'; import {TimezoneFormatService} from '../../../../services/utm-timezone.service'; +import {VersionInfoService, VersionType} from '../../../../services/version/version-info.service'; import {ConfigDataTypeEnum, SectionConfigParamType} from '../../../../types/configuration/section-config-param.type'; import {ApplicationConfigSectionEnum, SectionConfigType} from '../../../../types/configuration/section-config.type'; import {ScheduleConfigValidator} from '../../../schedule-config/schedule-config.validator'; @@ -49,6 +50,8 @@ export class AppConfigSectionsComponent implements OnInit, OnDestroy { destroy$ = new Subject(); isOnline = false; ConfigDataTypeEnum = ConfigDataTypeEnum; + versionType = VersionType.COMMUNITY; + VERSION_TYPE = VersionType; constructor(private utmConfigParamsService: UtmConfigParamsService, @@ -57,7 +60,8 @@ export class AppConfigSectionsComponent implements OnInit, OnDestroy { private toastService: UtmToastService, private timezoneFormatService: TimezoneFormatService, private locationService: LocationService, - private networkService: NetworkService) { + private networkService: NetworkService, + private versionInfoService: VersionInfoService) { } @@ -68,6 +72,11 @@ export class AppConfigSectionsComponent implements OnInit, OnDestroy { this.networkService.isOnline$ .pipe(takeUntil(this.destroy$)) .subscribe( isOnline => this.isOnline = isOnline); + + this.versionInfoService.versionType$ + .pipe(takeUntil(this.destroy$)) + .subscribe( versionType => this.versionType = versionType); + } getConfigurations() { diff --git a/frontend/src/app/shared/services/util/refresh.service.ts b/frontend/src/app/shared/services/util/refresh.service.ts index 48d812f1d..d8874fbf2 100644 --- a/frontend/src/app/shared/services/util/refresh.service.ts +++ b/frontend/src/app/shared/services/util/refresh.service.ts @@ -45,7 +45,6 @@ export class RefreshService { this.refreshSubject.next(null); if (this.subscription) { this.subscription.unsubscribe(); - console.log('refresh stopped'); } } diff --git a/frontend/src/app/shared/types/table/utm-field.type.ts b/frontend/src/app/shared/types/table/utm-field.type.ts index eafce502e..745a2dc91 100644 --- a/frontend/src/app/shared/types/table/utm-field.type.ts +++ b/frontend/src/app/shared/types/table/utm-field.type.ts @@ -10,6 +10,8 @@ export class UtmFieldType { filter?: boolean; width?: string; fields?: UtmFieldType[]; + sortField?: string; + formatValue?: (value: any) => string; static findFieldByNameInArray(fieldName: string, fields: UtmFieldType[]): UtmFieldType | null { for (const field of fields) { diff --git a/frontend/src/app/shared/util/query-params-to-filter.util.ts b/frontend/src/app/shared/util/query-params-to-filter.util.ts index e021d1085..9dff9d29a 100644 --- a/frontend/src/app/shared/util/query-params-to-filter.util.ts +++ b/frontend/src/app/shared/util/query-params-to-filter.util.ts @@ -167,18 +167,18 @@ export function extractQueryParamsForNavigation(url: string): { path: string, qu const queryParamsStart = url.indexOf('?'); if (queryParamsStart !== -1) { - const path = url.slice(0, queryParamsStart); // Obtรฉn la ruta base + const path = url.slice(0, queryParamsStart); const queryParamsString = url.slice(queryParamsStart + 1); const searchParams = new URLSearchParams(queryParamsString); const queryParams: Record = {}; searchParams.forEach((value, key) => { - queryParams[key] = value; // No decodifiques nada aquรญ + queryParams[key] = value; }); return { path, queryParams }; } - return { path: url, queryParams: {} }; // Si no hay parรกmetros, devuelve solo la ruta base + return { path: url, queryParams: {} }; } diff --git a/frontend/src/environments/environment.ts b/frontend/src/environments/environment.ts index d1fff92cc..c14489291 100644 --- a/frontend/src/environments/environment.ts +++ b/frontend/src/environments/environment.ts @@ -5,7 +5,7 @@ export const environment = { production: false, SERVER_API_URL: 'https://192.168.1.18/', - // SERVER_API_URL: 'http://localhost:8080/', + //SERVER_API_URL: 'http://localhost:8080/', SERVER_API_CONTEXT: '', SESSION_AUTH_TOKEN: window.location.host.split(':')[0].toLocaleUpperCase(), WEBSOCKET_URL: '//localhost:8080', diff --git a/installer/config/config.go b/installer/config/config.go index cec8a34ca..c3a1f0e7d 100644 --- a/installer/config/config.go +++ b/installer/config/config.go @@ -81,8 +81,7 @@ func GetConfig() *Config { config.InternalKey = utils.GenerateSecret(32) } - if config.Branch != "alpha" && - config.Branch != "beta" && + if config.Branch != "dev" && config.Branch != "rc" { config.Branch = DEFAULT_BRANCH } diff --git a/installer/config/const.go b/installer/config/const.go index 6ed360efe..739f014cf 100644 --- a/installer/config/const.go +++ b/installer/config/const.go @@ -6,18 +6,20 @@ import ( ) const ( - RegisterInstanceEndpoint = "/api/v1/instances/register" - GetInstanceDetailsEndpoint = "/api/v1/instances" - GetUpdatesInfoEndpoint = "/api/v1/updates" - SetUpdateSentEndpoint = "/api/v1/updates/sent" - GetLicenseEndpoint = "/api/v1/licenses" - HealthEndpoint = "/api/v1/health" - LogCollectorEndpoint = "/api/v1/logcollectors/upload" - GetLatestVersionEndpoint = "/api/v1/versions/latest" + RegisterInstanceEndpoint = "/api/v1/instances/register" + GetInstanceDetailsEndpoint = "/api/v1/instances" + UpdateInstanceDetailsEndpoint = "/api/v1/instances/details" + HeartbeatEndpoint = "/api/v1/instances/heartbeat" + GetUpdatesInfoEndpoint = "/api/v1/updates" + SetUpdateSentEndpoint = "/api/v1/updates/sent" + GetLicenseEndpoint = "/api/v1/licenses" + HealthEndpoint = "/api/v1/health" + LogCollectorEndpoint = "/api/v1/logcollectors/upload" GitHubReleasesURL = "https://github.com/utmstack/UTMStack/releases/download/%s/installer" - ImagesPath = "/utmstack/images" + ImagesPath = "/utmstack/images" + InstallerBinPath = "/usr/local/bin/utmstack_installer" RequiredMinCPUCores = 2 RequiredMinDiskSpace = 30 @@ -37,11 +39,12 @@ var ( ServiceLogPath = filepath.Join(GetConfig().UpdatesFolder, "logs", "utmstack-updater.log") VersionFilePath = filepath.Join(GetConfig().UpdatesFolder, "version.json") LicenseFilePath = filepath.Join(GetConfig().UpdatesFolder, "LICENSE") + PendingUpdatesPath = filepath.Join(GetConfig().UpdatesFolder, "pending-updates.json") + LastAdminEmailPath = filepath.Join(GetConfig().UpdatesFolder, "last-admin-email.txt") EventProcessorLogsPath = filepath.Join(GetConfig().DataDir, "events-engine-workdir", "logs") CheckUpdatesEvery = 5 * time.Minute SyncSystemLogsEvery = 5 * time.Minute ConnectedToInternet = false - Updating = false ) func GetCMServer() string { diff --git a/installer/docker/compose.go b/installer/docker/compose.go index df183b8cd..53d7e2e7f 100644 --- a/installer/docker/compose.go +++ b/installer/docker/compose.go @@ -317,6 +317,17 @@ func (c *Compose) Populate(conf *config.Config, stack *StackConfig) error { "GIN_MODE=release", "MODE=manager", "NODE_NAME=manager", + "INTERNAL_KEY=" + conf.InternalKey, + "ENCRYPTION_KEY=" + conf.InternalKey, + "BACKEND_URL=http://backend:8080", + "ENV=" + conf.Branch, + "OPENSEARCH_HOST=node1", + "OPENSEARCH_PORT=9200", + "DB_HOST=postgres", + "DB_PORT=5432", + "DB_USER=postgres", + "DB_PASS=" + conf.Password, + "DB_NAME=utmstack", }, Logging: &dLogging, Deploy: &Deploy{ diff --git a/installer/docker/plugins.go b/installer/docker/plugins.go index 4cfd9ebe1..39bad0e4b 100644 --- a/installer/docker/plugins.go +++ b/installer/docker/plugins.go @@ -39,7 +39,7 @@ func SetPluginsConfigs(conf *config.Config, stack *StackConfig) error { analysisPipeline := PluginsConfig{} analysisPipeline.Plugins = make(map[string]PluginConfig) analysisPipeline.Plugins["analysis"] = PluginConfig{ - Order: []string{"com.utmstack.events", "cel"}, + Order: []string{"com.utmstack.events", "cel", "feeds"}, } correlationPipeline := PluginsConfig{} @@ -48,15 +48,6 @@ func SetPluginsConfigs(conf *config.Config, stack *StackConfig) error { Order: []string{"com.utmstack.alerts", "com.utmstack.soc-ai"}, } - inputPipeline := PluginsConfig{} - inputPipeline.Plugins = make(map[string]PluginConfig) - inputPipeline.Plugins["http-input"] = PluginConfig{ - Port: 8082, - } - inputPipeline.Plugins["grpc-input"] = PluginConfig{ - Port: 8083, - } - notificationPipeline := PluginsConfig{} notificationPipeline.Plugins = make(map[string]PluginConfig) notificationPipeline.Plugins["notification"] = PluginConfig{ @@ -103,11 +94,6 @@ func SetPluginsConfigs(conf *config.Config, stack *StackConfig) error { return fmt.Errorf("error writing correlation pipeline config: %w", err) } - err = utils.WriteYAML(filepath.Join(pipelineDir, "system_plugins_input.yaml"), inputPipeline) - if err != nil { - return fmt.Errorf("error writing input pipeline config: %w", err) - } - err = utils.WriteYAML(filepath.Join(pipelineDir, "system_plugins_notification.yaml"), notificationPipeline) if err != nil { return fmt.Errorf("error writing notification pipeline config: %w", err) diff --git a/installer/go.mod b/installer/go.mod index 7adebb8c8..2db50bbd3 100644 --- a/installer/go.mod +++ b/installer/go.mod @@ -1,86 +1,90 @@ module github.com/utmstack/UTMStack/installer -go 1.24.2 +go 1.25.1 require ( - github.com/cloudfoundry/gosigar v1.3.94 - github.com/docker/docker v28.2.2+incompatible - github.com/kardianos/service v1.2.2 - github.com/levigross/grequests v0.0.0-20231203190023-9c307ef1f48d + github.com/cloudfoundry/gosigar v1.3.112 + github.com/docker/docker v28.5.2+incompatible + github.com/kardianos/service v1.2.4 + github.com/levigross/grequests v0.0.0-20250606031859-3f3c12e4e704 github.com/lib/pq v1.10.9 - github.com/robfig/cron/v3 v3.0.1 github.com/shirou/gopsutil/v3 v3.24.5 - github.com/threatwinds/logger v1.2.2 - github.com/utmstack/license-manager-sdk v0.0.1 + github.com/threatwinds/logger v1.2.3 + github.com/utmstack/license-manager-sdk v0.1.0 gopkg.in/yaml.v3 v3.0.1 ) require ( github.com/AtlasInsideCorp/AtlasInsideAES v1.0.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/bytedance/sonic v1.14.0 // indirect - github.com/bytedance/sonic/loader v0.3.0 // indirect - github.com/cloudwego/base64x v0.1.5 // indirect + github.com/bytedance/gopkg v0.1.3 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect github.com/containerd/errdefs v1.0.0 // indirect github.com/containerd/errdefs/pkg v0.3.0 // indirect github.com/containerd/log v0.1.0 // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/docker/go-connections v0.5.0 // indirect + github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect github.com/gin-contrib/sse v1.1.0 // indirect - github.com/gin-gonic/gin v1.10.1 // indirect + github.com/gin-gonic/gin v1.11.0 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.27.0 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect github.com/goccy/go-json v0.10.5 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/google/go-querystring v1.1.0 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect + github.com/google/go-querystring v1.2.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect - github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 // indirect + github.com/lufia/plan9stats v0.0.0-20251013123823-9fd1530e3ec3 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/sys/atomicwriter v0.1.0 // indirect github.com/moby/term v0.5.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/morikuni/aec v1.0.0 // indirect + github.com/morikuni/aec v1.1.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect - github.com/shoenig/go-m1cpu v0.1.6 // indirect - github.com/shoenig/test v1.8.0 // indirect - github.com/tklauser/go-sysconf v0.3.15 // indirect - github.com/tklauser/numcpus v0.10.0 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect + github.com/shoenig/go-m1cpu v0.1.7 // indirect + github.com/shoenig/test v1.12.2 // indirect + github.com/tklauser/go-sysconf v0.3.16 // indirect + github.com/tklauser/numcpus v0.11.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.3.0 // indirect + github.com/ugorji/go/codec v1.3.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect - go.opentelemetry.io/otel v1.36.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.35.0 // indirect - go.opentelemetry.io/otel/metric v1.36.0 // indirect - go.opentelemetry.io/otel/trace v1.36.0 // indirect - golang.org/x/arch v0.19.0 // indirect - golang.org/x/crypto v0.40.0 // indirect - golang.org/x/net v0.42.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/text v0.27.0 // indirect - golang.org/x/time v0.12.0 // indirect - golang.org/x/tools v0.35.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/grpc v1.74.2 // indirect - google.golang.org/protobuf v1.36.6 // indirect + go.opentelemetry.io/auto/sdk v1.2.1 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0 // indirect + go.opentelemetry.io/otel v1.39.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.39.0 // indirect + go.opentelemetry.io/otel/metric v1.39.0 // indirect + go.opentelemetry.io/otel/trace v1.39.0 // indirect + go.uber.org/mock v0.6.0 // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + golang.org/x/time v0.14.0 // indirect + golang.org/x/tools v0.41.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/grpc v1.78.0 // indirect + google.golang.org/protobuf v1.36.11 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gotest.tools/v3 v3.5.2 // indirect ) diff --git a/installer/go.sum b/installer/go.sum index 672dc8979..21fc9bf4b 100644 --- a/installer/go.sum +++ b/installer/go.sum @@ -2,20 +2,24 @@ github.com/AtlasInsideCorp/AtlasInsideAES v1.0.0 h1:TBiBl9KCa4i4epY0/q9WSC4ugavL github.com/AtlasInsideCorp/AtlasInsideAES v1.0.0/go.mod h1:cRhQ3TS/VEfu/z+qaciyuDZdtxgaXgaX8+G6Wa5NzBk= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= +github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= -github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= -github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= -github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= -github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cloudfoundry/gosigar v1.3.94 h1:jT9cluVqkqPIqohL5c+LL48t+gv1JtbEytKncz9F7p4= -github.com/cloudfoundry/gosigar v1.3.94/go.mod h1:+67J31661uUAzzH3Y1UEM8hyKMCfyWbDW1blbsc/KYQ= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= +github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= +github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= +github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= +github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cloudfoundry/gosigar v1.3.112 h1:cGGZ2sj1GKyiwSxzouIR7ATNbgAkC4zqwWDxYQ2ObPc= +github.com/cloudfoundry/gosigar v1.3.112/go.mod h1:Ldc+tVw3dfqPwasZ9om1LT2aRwpjC1eFfbWKfv2WbDI= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE= @@ -27,20 +31,20 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v28.2.2+incompatible h1:CjwRSksz8Yo4+RmQ339Dp/D2tGO5JxwYeqtMOEe0LDw= -github.com/docker/docker v28.2.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= -github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/docker v28.5.2+incompatible h1:DBX0Y0zAjZbSrm1uzOkdr1onVghKaftjlSWt4AFexzM= +github.com/docker/docker v28.5.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= +github.com/docker/go-connections v0.6.0/go.mod h1:AahvXYshr6JgfUJGdDCs2b5EZG/vmaMAntpSFH5BFKE= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= -github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= -github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -55,48 +59,44 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= -github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= -github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= +github.com/google/go-querystring v1.2.0 h1:yhqkPbu2/OH+V9BfpCVPZkNmUXhb2gBxJArfhIxNtP0= +github.com/google/go-querystring v1.2.0/go.mod h1:8IFJqpSRITyJ8QhQ13bmbeMBDfmeEJZD5A0egEOmkqU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20250607225305-033d6d78b36a h1://KbezygeMJZCSHH+HgUZiTeSoiuFspbMg1ge+eFj18= -github.com/google/pprof v0.0.0-20250607225305-033d6d78b36a/go.mod h1:5hDyRhoBCxViHszMt12TnOpEI4VVi+U8Gm9iphldiMA= +github.com/google/pprof v0.0.0-20250630185457-6e76a2b096b5 h1:xhMrHhTJ6zxu3gA4enFM9MLn9AY7613teCdFnlUVbSQ= +github.com/google/pprof v0.0.0-20250630185457-6e76a2b096b5/go.mod h1:5hDyRhoBCxViHszMt12TnOpEI4VVi+U8Gm9iphldiMA= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1 h1:e9Rjr40Z98/clHv5Yg79Is0NtosR5LXRvdr7o/6NwbA= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1/go.mod h1:tIxuGz/9mpox++sgp9fJjHO0+q1X9/UOWd798aAm22M= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 h1:NmZ1PKzSTQbuGHw9DGPFomqkkLWMC+vZCkfs+FHv1Vg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3/go.mod h1:zQrxl1YP88HQlA6i9c63DSVPFklWpGX4OWAc9bFuaH4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kardianos/service v1.2.2 h1:ZvePhAHfvo0A7Mftk/tEzqEZ7Q4lgnR8sGz4xu1YX60= -github.com/kardianos/service v1.2.2/go.mod h1:CIMRFEJVL+0DS1a3Nx06NaMn4Dz63Ng6O7dl0qH0zVM= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/kardianos/service v1.2.4 h1:XNlGtZOYNx2u91urOdg/Kfmc+gfmuIo1Dd3rEi2OgBk= +github.com/kardianos/service v1.2.4/go.mod h1:E4V9ufUuY82F7Ztlu1eN9VXWIQxg8NoLQlmFe0MtrXc= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= -github.com/levigross/grequests v0.0.0-20231203190023-9c307ef1f48d h1:8fVmm2qScPn4JAF/YdTtqrPP3n58FgZ4GbKTNfaPuRs= -github.com/levigross/grequests v0.0.0-20231203190023-9c307ef1f48d/go.mod h1:dFu6nuJHC3u9kCDcyGrEL7LwhK2m6Mt+alyiiIjDrRY= +github.com/levigross/grequests v0.0.0-20250606031859-3f3c12e4e704 h1:iH9CoV+Eoc3eeaCTt8qCU8/Qod7HdRKHlytTmOCIutw= +github.com/levigross/grequests v0.0.0-20250606031859-3f3c12e4e704/go.mod h1:qnB03x2PLQFGb5PZv0m87zJrVuvrHUuvZMlHTUuZVnM= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 h1:PpXWgLPs+Fqr325bN2FD2ISlRRztXibcX6e8f5FR5Dc= -github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35/go.mod h1:autxFIvghDt3jPTLoqZ9OZ7s9qTGNAWmYCjVFWPX/zg= +github.com/lufia/plan9stats v0.0.0-20251013123823-9fd1530e3ec3 h1:PwQumkgq4/acIiZhtifTV5OUqqiP82UAl0h87xj/l9k= +github.com/lufia/plan9stats v0.0.0-20251013123823-9fd1530e3ec3/go.mod h1:autxFIvghDt3jPTLoqZ9OZ7s9qTGNAWmYCjVFWPX/zg= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= @@ -112,12 +112,12 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus= -github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8= -github.com/onsi/gomega v1.36.3 h1:hID7cr8t3Wp26+cYnfcjR6HpJ00fdogN6dqZ1t6IylU= -github.com/onsi/gomega v1.36.3/go.mod h1:8D9+Txp43QWKhM24yyOBEdpkzN8FvJyAwecBgsU4KU0= +github.com/morikuni/aec v1.1.0 h1:vBBl0pUnvi/Je71dsRrhMBtreIqNMYErSAbEeb8jrXQ= +github.com/morikuni/aec v1.1.0/go.mod h1:xDRgiq/iw5l+zkao76YTKzKttOp2cwPEne25HDkJnBw= +github.com/onsi/ginkgo/v2 v2.27.2 h1:LzwLj0b89qtIy6SSASkzlNvX6WktqurSHwkk2ipF/Ns= +github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo= +github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A= +github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= @@ -130,118 +130,99 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= -github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk= -github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= -github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= -github.com/shoenig/test v1.8.0 h1:8f4lrmjkoSykT+EfiTtJuWbV4eaNEBWsYXcl1n6C6BY= -github.com/shoenig/test v1.8.0/go.mod h1:UxJ6u/x2v/TNs/LoLxBNJRV9DiwBBKYxXSyczsBHFoI= +github.com/shoenig/go-m1cpu v0.1.7 h1:C76Yd0ObKR82W4vhfjZiCp0HxcSZ8Nqd84v+HZ0qyI0= +github.com/shoenig/go-m1cpu v0.1.7/go.mod h1:KkDOw6m3ZJQAPHbrzkZki4hnx+pDRR1Lo+ldA56wD5w= +github.com/shoenig/test v1.12.2 h1:ZVT8NeIUwGWpZcKaepPmFMoNQ3sVpxvqUh/MAqwFiJI= +github.com/shoenig/test v1.12.2/go.mod h1:UxJ6u/x2v/TNs/LoLxBNJRV9DiwBBKYxXSyczsBHFoI= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/threatwinds/logger v1.2.2 h1:sVuT8yhbecPqP4tT8EwHfp1czNC6e1wdkE1ihNnuBdA= -github.com/threatwinds/logger v1.2.2/go.mod h1:Amq0QI1y7fkTpnBUgeGVu2Z/C4u4ys2pNLUOuj3UAAU= -github.com/tklauser/go-sysconf v0.3.15 h1:VE89k0criAymJ/Os65CSn1IXaol+1wrsFHEB8Ol49K4= -github.com/tklauser/go-sysconf v0.3.15/go.mod h1:Dmjwr6tYFIseJw7a3dRLJfsHAMXZ3nEnL/aZY+0IuI4= -github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfjso= -github.com/tklauser/numcpus v0.10.0/go.mod h1:BiTKazU708GQTYF4mB+cmlpT2Is1gLk7XVuEeem8LsQ= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/threatwinds/logger v1.2.3 h1:V2SVAXzbq+/huCvIWOfqzMTH+WBHJxankyBgVG2hy1Y= +github.com/threatwinds/logger v1.2.3/go.mod h1:N+bJKvF4FQNJZLfQpVYWpr6D8iEAFnAQfHYqH5iR1TI= +github.com/tklauser/go-sysconf v0.3.16 h1:frioLaCQSsF5Cy1jgRBrzr6t502KIIwQ0MArYICU0nA= +github.com/tklauser/go-sysconf v0.3.16/go.mod h1:/qNL9xxDhc7tx3HSRsLWNnuzbVfh3e7gh/BmM179nYI= +github.com/tklauser/numcpus v0.11.0 h1:nSTwhKH5e1dMNsCdVBukSZrURJRoHbSEQjdEbY+9RXw= +github.com/tklauser/numcpus v0.11.0/go.mod h1:z+LwcLq54uWZTX0u/bGobaV34u6V7KNlTZejzM6/3MQ= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= -github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= -github.com/utmstack/license-manager-sdk v0.0.1 h1:yyFg4cGIj4xUFG9ZwrFYNbGxL7WMIz8CiTo2+snk2G4= -github.com/utmstack/license-manager-sdk v0.0.1/go.mod h1:g72XwpPmq4w6YxkJz/nCAeR9EhSy2yRC+CIylsPWezI= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/utmstack/license-manager-sdk v0.1.0 h1:2oXaGvkuCsl3wYGnKRqd9lmF1+y26mfrFUprs3xSnYk= +github.com/utmstack/license-manager-sdk v0.1.0/go.mod h1:g72XwpPmq4w6YxkJz/nCAeR9EhSy2yRC+CIylsPWezI= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 h1:1fTNlAIJZGWLP5FVu0fikVry1IsiUnXjf7QFvoNN3Xw= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0/go.mod h1:zjPK58DtkqQFn+YUMbx0M2XV3QgKU0gS9LeGohREyK4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.35.0 h1:xJ2qHD0C1BeYVTLLR9sX12+Qb95kfeD/byKj6Ky1pXg= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.35.0/go.mod h1:u5BF1xyjstDowA1R5QAO9JHzqK+ublenEW/dyqTjBVk= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= -go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= -go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= -go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= -go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= -go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4= -go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= -go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= -golang.org/x/arch v0.19.0 h1:LmbDQUodHThXE+htjrnmVD73M//D9GTH6wFZjyDkjyU= -golang.org/x/arch v0.19.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0 h1:ssfIgGNANqpVFCndZvcuyKbl0g+UAVcbBcqGkG28H0Y= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0/go.mod h1:GQ/474YrbE4Jx8gZ4q5I4hrhUzM6UPzyrqJYV2AqPoQ= +go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48= +go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0 h1:f0cb2XPmrqn4XMy9PNliTgRKJgS5WcL/u0/WRYGz4t0= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0/go.mod h1:vnakAaFckOMiMtOIhFI2MNH4FYrZzXCYxmb1LlhoGz8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.39.0 h1:Ckwye2FpXkYgiHX7fyVrN1uA/UYd9ounqqTuSNAv0k4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.39.0/go.mod h1:teIFJh5pW2y+AN7riv6IBPX2DuesS3HgP39mwOspKwU= +go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0= +go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs= +go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18= +go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE= +go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8= +go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew= +go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI= +go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA= +go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A= +go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c= +golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= -golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= -golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0= -golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 h1:mVXdvnmR3S3BQOqHECm9NGMjYiRtEvDYcqAqedTXY6s= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 h1:qJW29YvkiJmXOYMu5Tf8lyrTp3dOS+K4z6IixtLaCf8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= +golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= +golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc= +golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -252,4 +233,3 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= diff --git a/installer/install.go b/installer/install.go index 0cd337b1a..a70cdb02e 100644 --- a/installer/install.go +++ b/installer/install.go @@ -6,21 +6,14 @@ import ( "github.com/utmstack/UTMStack/installer/config" "github.com/utmstack/UTMStack/installer/docker" - "github.com/utmstack/UTMStack/installer/network" - "github.com/utmstack/UTMStack/installer/services" - "github.com/utmstack/UTMStack/installer/system" + "github.com/utmstack/UTMStack/installer/setup" "github.com/utmstack/UTMStack/installer/updater" "github.com/utmstack/UTMStack/installer/utils" ) -func Install(specificVersion string) error { +func Install() error { fmt.Println("### Installing UTMStack ###") - if specificVersion != "" { - updater.SpecificVersion = specificVersion - fmt.Printf("Installing specific version: %s\n", specificVersion) - } - go updater.MonitorConnection(config.GetCMServer(), 30*time.Second, 3, &config.ConnectedToInternet) isInstalledAlready, err := utils.CheckIfServiceIsInstalled("UTMStackComponentsUpdater") @@ -36,299 +29,21 @@ func Install(specificVersion string) error { return nil } - cnf := config.GetConfig() - - fmt.Print("Checking system requirements") - distro, err := system.CheckDistro() - if err != nil { - return err - } - if err := system.CheckCPU(config.RequiredMinCPUCores); err != nil { - return err - } - if err := system.CheckDisk(config.RequiredMinDiskSpace); err != nil { - return err - } - fmt.Println(" [OK]") - - // Check verifying prerequisites for AirGap mode - if !config.ConnectedToInternet { - fmt.Println("AirGap mode detected - verifying prerequisites...") - if err := system.VerifyAirGapPrerequisites(); err != nil { - return fmt.Errorf("AirGap prerequisites check failed: %w", err) - } - fmt.Println(" [OK]") - } - - fmt.Println("Generating Stack configuration...") - stack := docker.GetStackConfig() - - if utils.GetLock(1, stack.LocksDir) { - fmt.Print("Generating certificates") - if err := utils.GenerateCerts(stack.Cert); err != nil { - return err - } - if err := utils.SetLock(1, stack.LocksDir); err != nil { - return err - } - fmt.Println(" [OK]") - } - - if utils.GetLock(2, stack.LocksDir) { - fmt.Print("Preparing system to run UTMStack") - if err := system.PrepareSystem(distro); err != nil { - return err - } - if err := utils.SetLock(2, stack.LocksDir); err != nil { - return err - } - fmt.Println(" [OK]") - } - - if utils.GetLock(202402081552, stack.LocksDir) { - fmt.Print("Preparing kernel to run UTMStack") - if err := system.PrepareKernel(); err != nil { - return err - } - if err := utils.SetLock(202402081552, stack.LocksDir); err != nil { - return err - } - fmt.Println(" [OK]") - } - - if utils.GetLock(202402081553, stack.LocksDir) { - fmt.Print("Configuring VLAN") - iface, err := utils.GetMainIface(cnf.MainServer) - if err != nil { - return err - } - // Check AirGap - if config.ConnectedToInternet { - if err := network.InstallVlan(distro); err != nil { - return err - } - } - - if err := network.ConfigureVLAN(iface, distro); err != nil { - return err - } - if err := utils.SetLock(202402081553, stack.LocksDir); err != nil { - return err - } - fmt.Println(" [OK]") - - } - - if utils.GetLock(3, stack.LocksDir) { - fmt.Print("Configuring Docker") - // Check AirGap - if !config.ConnectedToInternet { - fmt.Println(" [SKIPPED] (AirGap mode detected, skipping Docker installation)") - } else { - if err := docker.InstallDocker(distro); err != nil { - return err - } - } - if err := utils.SetLock(3, stack.LocksDir); err != nil { - return err - } - fmt.Println(" [OK]") - } - - if utils.GetLock(4, stack.LocksDir) { - fmt.Print("Initializing Swarm") - // Check AirGap - if !config.ConnectedToInternet { - mainIP, err := utils.GetMainIPInAirGapMode() - if err != nil { - return err - } - if err := docker.InitSwarm(mainIP); err != nil { - return err - } - - } else { - mainIP, err := utils.GetMainIP() - if err != nil { - return err - } - if err := docker.InitSwarm(mainIP); err != nil { - return err - } - } - - if err := utils.SetLock(4, stack.LocksDir); err != nil { - return err - } - fmt.Println(" [OK]") - } - - if !utils.GetLock(5, stack.LocksDir) && utils.GetLock(202407051241, stack.LocksDir) { - fmt.Print("Removing old services") - if err := docker.RemoveServices([]string{ - "utmstack_aws", - "utmstack_bitdefender", - "utmstack_correlation", - "utmstack_filebrowser", - "utmstack_log-auth-proxy", - "utmstack_logstash", - "utmstack_mutate", - "utmstack_office365", - "utmstack_sophos", - "utmstack_socai", - }); err != nil { - return err - } - if err := utils.SetLock(202407051241, stack.LocksDir); err != nil { - return err - } - fmt.Println(" [OK]") - } - - time.Sleep(10 * time.Second) - fmt.Print("Getting UTMStack Latest Version") version, err := updater.GetVersion() if err != nil { return err } - fmt.Println(" [OK]") - fmt.Printf("Installing UTMStack version %s-%s. This may take a while.\n", version.Version, version.Edition) - err = docker.StackUP(version.Version + "-" + version.Edition) + pass, err := setup.Apply(version.Version) if err != nil { - return err - } - - fmt.Print("Installing reverse proxy. This may take a while.") - if config.ConnectedToInternet { - if err := network.InstallNginx(distro); err != nil { - return err - } - } - - if err := network.ConfigureNginx(cnf, stack, distro); err != nil { - return err - } - - fmt.Println(" [OK]") - - if utils.GetLock(5, stack.LocksDir) { - fmt.Print("Installing Administration Tools") - // Check AirGap - if config.ConnectedToInternet { - if err := system.InstallTools(distro); err != nil { - return err - } - } - - if err := utils.SetLock(5, stack.LocksDir); err != nil { - return err - } - fmt.Println(" [OK]") - } - - if utils.GetLock(6, stack.LocksDir) { - fmt.Print("Initializing UTMStack and AgentManager databases") - for i := 0; i < 10; i++ { - if err := services.InitPgUtmstack(cnf); err != nil { - if i > 8 { - return err - } - time.Sleep(10 * time.Second) - } else { - break - } - } - - if err := utils.SetLock(6, stack.LocksDir); err != nil { - return err - } - - fmt.Println(" [OK]") - } - - if utils.GetLock(202311301747, stack.LocksDir) { - fmt.Print("Initializing User Auditor database") - for i := 0; i < 10; i++ { - if err := services.InitPgUserAuditor(cnf); err != nil { - if i > 8 { - return err - } - time.Sleep(10 * time.Second) - } else { - break - } - } - - if err := utils.SetLock(202311301747, stack.LocksDir); err != nil { - return err - } - - fmt.Println(" [OK]") - } - - if utils.GetLock(7, stack.LocksDir) { - fmt.Print("Initializing OpenSearch. This may take a while.") - if err := services.InitOpenSearch(); err != nil { - return err - } - - if err := utils.SetLock(7, stack.LocksDir); err != nil { - return err - } - fmt.Println(" [OK]") - } - - fmt.Print("Waiting for Backend to be ready. This may take a while.") - - if err := services.Backend(); err != nil { - return err - } - - fmt.Println(" [OK]") - - if utils.GetLock(8, stack.LocksDir) { - fmt.Print("Generating Connection Key") - if err := services.RegenerateKey(cnf.InternalKey); err != nil { - return err - } - - if err := utils.SetLock(8, stack.LocksDir); err != nil { - return err - } - fmt.Println(" [OK]") - } - - if utils.GetLock(9, stack.LocksDir) { - fmt.Print("Generating Base URL") - if err := services.SetBaseURL(cnf.Password, cnf.ServerName); err != nil { - return err - } - - if err := utils.SetLock(9, stack.LocksDir); err != nil { - return err - } - fmt.Println(" [OK]") + return fmt.Errorf("error applying setup: %v", err) } fmt.Print("Installing Updater Service") updater.InstallService() fmt.Println(" [OK]") - // if utils.GetLock(10, stack.LocksDir) { - // fmt.Print("Sending sample logs") - // if err := SendSampleData(); err != nil { - // fmt.Printf("error sending sample data: %v", err) - // } - - // if err := utils.SetLock(10, stack.LocksDir); err != nil { - // return err - // } - // fmt.Println(" [OK]") - // } - fmt.Println("Running post installation scripts. This may take a while.") - if err := docker.PostInstallation(); err != nil { return err } @@ -336,7 +51,7 @@ func Install(specificVersion string) error { fmt.Println("Installation fisnished successfully. We have generated a configuration file for you, please do not modify or remove it. You can find it at /root/utmstack.yml.") fmt.Println("You can also use it to re-install your stack in case of a disaster or changes in your hardware. Just run the installer again.") fmt.Println("You can access to your Web-GUI at https:// using admin as your username") - fmt.Printf("Web-GUI default password for admin: %s \n", cnf.Password) + fmt.Printf("Web-GUI default password for admin: %s \n", pass) fmt.Println("You can also access to your Web-based Administration Interface at https://:9090 using your Linux system credentials.") fmt.Println("Detailed installation logs can be found at /var/log/utmstack-installer.log") diff --git a/installer/main.go b/installer/main.go index 6a346514c..66ab6dff7 100644 --- a/installer/main.go +++ b/installer/main.go @@ -15,11 +15,7 @@ func main() { help() case "--install", "-i": - var specificVersion string - if len(os.Args) > 3 && (os.Args[2] == "--version" || os.Args[2] == "-V") { - specificVersion = os.Args[3] - } - err := Install(specificVersion) + err := Install() if err != nil { fmt.Printf("\nerror installing UTMStack: %v", err) os.Exit(1) @@ -34,12 +30,8 @@ func main() { fmt.Printf("\nerror getting UTMStack version: %v", err) os.Exit(1) } - if version.Version == "" || version.Edition == "" { - fmt.Println("UTMStack version not found") - os.Exit(1) - } - v := fmt.Sprintf("%s-%s", version.Version, version.Edition) - fmt.Println("UTMStack version:", v) + + fmt.Printf("UTMStack version: %s, edition: %s\n", version.Version, version.Edition) case "--uninstall", "-u": err := Uninstall() @@ -52,7 +44,7 @@ func main() { help() } } else { - err := Install("") + err := Install() if err != nil { fmt.Printf("\nerror installing UTMStack: %v", err) os.Exit(1) @@ -65,11 +57,7 @@ func help() { fmt.Println("Usage: installer ") fmt.Println("Arguments:") fmt.Println(" --help, -h Show this help") - fmt.Println(" --install, -i [--version|-V ] Install UTMStack (optionally specify version)") + fmt.Println(" --install, -i Install UTMStack") fmt.Println(" --uninstall, -u Uninstall UTMStack") fmt.Println(" --version, -v Show UTMStack version") - fmt.Println("") - fmt.Println("Examples:") - fmt.Println(" installer --install Install latest version") - fmt.Println(" installer --install --version v11.0.3 Install specific version v11.0.3") } diff --git a/installer/services/postgres.go b/installer/services/postgres.go index ce5ec5488..df16c6639 100644 --- a/installer/services/postgres.go +++ b/installer/services/postgres.go @@ -83,6 +83,38 @@ CONSTRAINT utm_client_pkey PRIMARY KEY (id) return nil } +func GetAdminEmail(c *config.Config) (string, error) { + psqlconn := fmt.Sprintf("host=localhost port=5432 user=postgres password=%s sslmode=disable database=utmstack", + c.Password) + db, err := sql.Open("postgres", psqlconn) + if err != nil { + return "", err + } + defer db.Close() + + err = db.Ping() + if err != nil { + return "", err + } + + var email string + err = db.QueryRow(` + SELECT email + FROM jhi_user + WHERE login = 'admin' AND created_by = 'system' AND email != 'admin@localhost' + LIMIT 1 + `).Scan(&email) + + if err != nil { + if err == sql.ErrNoRows { + return "", nil + } + return "", err + } + + return email, nil +} + func InitPgUserAuditor(c *config.Config) error { // Connecting to PostgreSQL psqlconn := fmt.Sprintf("host=localhost port=5432 user=postgres password=%s sslmode=disable", diff --git a/installer/services/search.go b/installer/services/search.go index 8c884bc6e..e1626a2fd 100644 --- a/installer/services/search.go +++ b/installer/services/search.go @@ -11,12 +11,14 @@ func InitOpenSearch() error { for intent := 0; intent <= 10; intent++ { time.Sleep(1 * time.Minute) - _, err := grequests.Get(baseURL+"_cluster/health", &grequests.RequestOptions{ - Params: map[string]string{ - "wait_for_status": "green", - "timeout": "50s", - }, - }) + _, err := grequests.Get(baseURL+"_cluster/health", + grequests.FromRequestOptions(&grequests.RequestOptions{ + Params: map[string]string{ + "wait_for_status": "green", + "timeout": "50s", + }, + }), + ) if err != nil { if intent >= 10 { @@ -27,21 +29,21 @@ func InitOpenSearch() error { } } - _, err := grequests.Put(baseURL+"_snapshot/.utm_geoip", &grequests.RequestOptions{ - JSON: map[string]any{ + _, err := grequests.Put(baseURL+"_snapshot/.utm_geoip", + grequests.JSON(map[string]any{ "type": "fs", "settings": map[string]interface{}{ "location": "/usr/share/opensearch/.utm_geoip/", "compress": true, }, - }, - }) + }), + ) if err != nil { return err } - _, err = grequests.Put(baseURL+"_index_template/utmstack_indexes", &grequests.RequestOptions{ - JSON: map[string]any{ + _, err = grequests.Put(baseURL+"_index_template/utmstack_indexes", + grequests.JSON(map[string]any{ "index_patterns": []string{"v11-alert-", "v11-log-", ".utm-", ".utmstack-"}, "template": map[string]any{ "settings": map[string]any{ @@ -50,18 +52,18 @@ func InitOpenSearch() error { "index.mapping.total_fields.limit": 50000, }, }, - }, - }) + }), + ) if err != nil { return err } - _, err = grequests.Post(baseURL+"_snapshot/.utm_geoip/.utm_geoip/_restore", &grequests.RequestOptions{ - JSON: map[string]interface{}{ + _, err = grequests.Post(baseURL+"_snapshot/.utm_geoip/.utm_geoip/_restore", + grequests.JSON(map[string]interface{}{ "indices": ".utm-geoip", "include_global_state": false, - }, - }) + }), + ) if err != nil { return err } diff --git a/installer/setup/apply.go b/installer/setup/apply.go new file mode 100644 index 000000000..0e0cecef2 --- /dev/null +++ b/installer/setup/apply.go @@ -0,0 +1,304 @@ +package setup + +import ( + "fmt" + "time" + + "github.com/utmstack/UTMStack/installer/config" + "github.com/utmstack/UTMStack/installer/docker" + "github.com/utmstack/UTMStack/installer/network" + "github.com/utmstack/UTMStack/installer/services" + "github.com/utmstack/UTMStack/installer/system" + "github.com/utmstack/UTMStack/installer/utils" +) + +func Apply(version string) (string, error) { + cnf := config.GetConfig() + + fmt.Println("Generating Stack configuration...") + stack := docker.GetStackConfig() + + // Check distro (always needed for later steps) + distro, err := system.CheckDistro() + if err != nil { + return "", err + } + + if utils.GetLock(202501131200, stack.LocksDir) { + fmt.Print("Checking system requirements") + if err := system.CheckCPU(config.RequiredMinCPUCores); err != nil { + return "", err + } + if err := system.CheckDisk(config.RequiredMinDiskSpace); err != nil { + return "", err + } + + // Check verifying prerequisites for AirGap mode + if !config.ConnectedToInternet { + fmt.Println(" [OK]") + fmt.Print("AirGap mode detected - verifying prerequisites...") + if err := system.VerifyAirGapPrerequisites(); err != nil { + return "", fmt.Errorf("AirGap prerequisites check failed: %w", err) + } + } + + if err := utils.SetLock(202501131200, stack.LocksDir); err != nil { + return "", err + } + fmt.Println(" [OK]") + } + + if utils.GetLock(1, stack.LocksDir) { + fmt.Print("Generating certificates") + if err := utils.GenerateCerts(stack.Cert); err != nil { + return "", err + } + if err := utils.SetLock(1, stack.LocksDir); err != nil { + return "", err + } + fmt.Println(" [OK]") + } + + if utils.GetLock(2, stack.LocksDir) { + fmt.Print("Preparing system to run UTMStack") + if err := system.PrepareSystem(distro); err != nil { + return "", err + } + if err := utils.SetLock(2, stack.LocksDir); err != nil { + return "", err + } + fmt.Println(" [OK]") + } + + if utils.GetLock(202402081552, stack.LocksDir) { + fmt.Print("Preparing kernel to run UTMStack") + if err := system.PrepareKernel(); err != nil { + return "", err + } + if err := utils.SetLock(202402081552, stack.LocksDir); err != nil { + return "", err + } + fmt.Println(" [OK]") + } + + if utils.GetLock(202402081553, stack.LocksDir) { + fmt.Print("Configuring VLAN") + iface, err := utils.GetMainIface(cnf.MainServer) + if err != nil { + return "", err + } + // Check AirGap + if config.ConnectedToInternet { + if err := network.InstallVlan(distro); err != nil { + return "", err + } + } + + if err := network.ConfigureVLAN(iface, distro); err != nil { + return "", err + } + if err := utils.SetLock(202402081553, stack.LocksDir); err != nil { + return "", err + } + fmt.Println(" [OK]") + } + + if utils.GetLock(3, stack.LocksDir) { + fmt.Print("Configuring Docker") + // Check AirGap + if !config.ConnectedToInternet { + fmt.Println(" [SKIPPED] (AirGap mode detected, skipping Docker installation)") + } else { + if err := docker.InstallDocker(distro); err != nil { + return "", err + } + } + if err := utils.SetLock(3, stack.LocksDir); err != nil { + return "", err + } + fmt.Println(" [OK]") + } + + if utils.GetLock(4, stack.LocksDir) { + fmt.Print("Initializing Swarm") + // Check AirGap + if !config.ConnectedToInternet { + mainIP, err := utils.GetMainIPInAirGapMode() + if err != nil { + return "", err + } + if err := docker.InitSwarm(mainIP); err != nil { + return "", err + } + + } else { + mainIP, err := utils.GetMainIP() + if err != nil { + return "", err + } + if err := docker.InitSwarm(mainIP); err != nil { + return "", err + } + } + + if err := utils.SetLock(4, stack.LocksDir); err != nil { + return "", err + } + fmt.Println(" [OK]") + } + + if !utils.GetLock(5, stack.LocksDir) && utils.GetLock(202407051241, stack.LocksDir) { + fmt.Print("Removing old services") + if err := docker.RemoveServices([]string{ + "utmstack_aws", + "utmstack_bitdefender", + "utmstack_correlation", + "utmstack_filebrowser", + "utmstack_log-auth-proxy", + "utmstack_logstash", + "utmstack_mutate", + "utmstack_office365", + "utmstack_sophos", + "utmstack_socai", + }); err != nil { + return "", err + } + if err := utils.SetLock(202407051241, stack.LocksDir); err != nil { + return "", err + } + fmt.Println(" [OK]") + } + + time.Sleep(10 * time.Second) + + err = docker.StackUP(version) + if err != nil { + return "", err + } + + fmt.Print("Installing reverse proxy. This may take a while.") + if config.ConnectedToInternet { + if err := network.InstallNginx(distro); err != nil { + return "", err + } + } + + if err := network.ConfigureNginx(cnf, stack, distro); err != nil { + return "", err + } + + fmt.Println(" [OK]") + + if utils.GetLock(5, stack.LocksDir) { + fmt.Print("Installing Administration Tools") + // Check AirGap + if config.ConnectedToInternet { + if err := system.InstallTools(distro); err != nil { + return "", err + } + } + + if err := utils.SetLock(5, stack.LocksDir); err != nil { + return "", err + } + fmt.Println(" [OK]") + } + + if utils.GetLock(6, stack.LocksDir) { + fmt.Print("Initializing UTMStack and AgentManager databases") + for i := 0; i < 10; i++ { + if err := services.InitPgUtmstack(cnf); err != nil { + if i > 8 { + return "", err + } + time.Sleep(10 * time.Second) + } else { + break + } + } + + if err := utils.SetLock(6, stack.LocksDir); err != nil { + return "", err + } + + fmt.Println(" [OK]") + } + + if utils.GetLock(202311301747, stack.LocksDir) { + fmt.Print("Initializing User Auditor database") + for i := 0; i < 10; i++ { + if err := services.InitPgUserAuditor(cnf); err != nil { + if i > 8 { + return "", err + } + time.Sleep(10 * time.Second) + } else { + break + } + } + + if err := utils.SetLock(202311301747, stack.LocksDir); err != nil { + return "", err + } + + fmt.Println(" [OK]") + } + + if utils.GetLock(7, stack.LocksDir) { + fmt.Print("Initializing OpenSearch. This may take a while.") + if err := services.InitOpenSearch(); err != nil { + return "", err + } + + if err := utils.SetLock(7, stack.LocksDir); err != nil { + return "", err + } + fmt.Println(" [OK]") + } + + fmt.Print("Waiting for Backend to be ready. This may take a while.") + + if err := services.Backend(); err != nil { + return "", err + } + + fmt.Println(" [OK]") + + if utils.GetLock(8, stack.LocksDir) { + fmt.Print("Generating Connection Key") + if err := services.RegenerateKey(cnf.InternalKey); err != nil { + return "", err + } + + if err := utils.SetLock(8, stack.LocksDir); err != nil { + return "", err + } + fmt.Println(" [OK]") + } + + if utils.GetLock(9, stack.LocksDir) { + fmt.Print("Generating Base URL") + if err := services.SetBaseURL(cnf.Password, cnf.ServerName); err != nil { + return "", err + } + + if err := utils.SetLock(9, stack.LocksDir); err != nil { + return "", err + } + fmt.Println(" [OK]") + } + + // if utils.GetLock(10, stack.LocksDir) { + // fmt.Print("Sending sample logs") + // if err := SendSampleData(); err != nil { + // fmt.Printf("error sending sample data: %v", err) + // } + + // if err := utils.SetLock(10, stack.LocksDir); err != nil { + // return err + // } + // fmt.Println(" [OK]") + // } + + return cnf.Password, nil +} diff --git a/installer/updater/client.go b/installer/updater/client.go index f329444ea..d14014cf7 100644 --- a/installer/updater/client.go +++ b/installer/updater/client.go @@ -5,8 +5,10 @@ import ( "context" "fmt" "io" + "mime/multipart" "net/http" "os" + "path/filepath" "strings" "sync" "time" @@ -53,6 +55,9 @@ func GetUpdaterClient() *UpdaterClient { utils.ReadYAML(config.InstanceConfigPath, &cnf) updaterClient.Config = cnf + go PollAndUpdateAdminEmail(cnf) + go StartHeartbeat(cnf) + licenseBytes, err := os.ReadFile(config.LicenseFilePath) if err != nil { config.Logger().ErrorF("error reading license file: %v", err) @@ -70,7 +75,9 @@ func (c *UpdaterClient) UpdateProcess() { defer ticker.Stop() for range ticker.C { - if !config.Updating && IsInMaintenanceWindow() { + inWindow := IsInMaintenanceWindow() + + if inWindow { err := c.CheckUpdate() if err != nil { config.Logger().ErrorF("error checking update: %v", err) @@ -80,9 +87,10 @@ func (c *UpdaterClient) UpdateProcess() { } func (c *UpdaterClient) CheckUpdate() error { - updates := make([]map[string]string, 0) + var update *PendingUpdate url := fmt.Sprintf("%s%s", c.Config.Server, config.GetUpdatesInfoEndpoint) + if config.ConnectedToInternet { resp, status, err := utils.DoReq[[]UpdateDTO]( url, @@ -94,97 +102,76 @@ func (c *UpdaterClient) CheckUpdate() error { if err != nil || status != http.StatusOK { return fmt.Errorf("error getting updates from %s: status: %d, error: %v", url, status, err) } - for _, update := range resp { - newUpdate := make(map[string]string) - newUpdate["version"] = update.Version.Version - newUpdate["edition"] = update.Instance.Edition - newUpdate["changelog"] = update.Version.Changelog - newUpdate["id"] = update.ID - updates = append(updates, newUpdate) + + if len(resp) > 0 { + // CM returns only one update at a time (the next one to apply) + u := resp[0] + update = &PendingUpdate{ + ID: u.ID, + Version: u.Version.Version, + Edition: u.Instance.Edition, + Changelog: u.Version.Changelog, + UpdateLocks: u.UpdateLocks, + } } } else { v, err := ExtractVersionFromFolder(config.ImagesPath) if err != nil { return fmt.Errorf("error extracting version from folder: %v", err) } - newUpdate := make(map[string]string) - newUpdate["version"] = v - newUpdate["edition"] = "enterprise" - newUpdate["changelog"] = "No changelog available for offline version" - newUpdate["id"] = "offline" - updates = append(updates, newUpdate) + update = &PendingUpdate{ + ID: "offline", + Version: v, + Edition: "enterprise", + Changelog: "No changelog available for offline version", + } } - sortedUpdates := SortVersions(updates) - - for _, update := range sortedUpdates { - // Apply all updates from the server regardless of current version - // This allows for rollbacks, pre-release type changes (alphaโ†’dev), and ensures all updates are applied in order - // The server is responsible for only sending pending updates (marked as sent after application) - err := c.UpdateToNewVersion(update["version"], update["edition"], update["changelog"]) - if err != nil { - return fmt.Errorf("error updating to new version: %v", err) - } - if update["id"] != "offline" { - err = c.MarkUpdateSent(update["id"]) - if err != nil { - return fmt.Errorf("error marking update as sent: %v", err) - } - } + if update == nil { + return nil } - return nil -} + config.Logger().Info("Update available: %s-%s", update.Version, update.Edition) -func (c *UpdaterClient) UpdateToNewVersion(version, edition, changelog string) error { - config.Logger().Info("Updating UTMStack to version %s-%s...", version, edition) - config.Updating = true + // Save pending update + if err := SavePendingUpdate(*update); err != nil { + return fmt.Errorf("error saving pending update: %v", err) + } - // Update installer binary first (only in prod branch) - cnf := config.GetConfig() - if cnf.Branch == "prod" || cnf.Branch == "" { - if err := c.UpdateInstaller(version); err != nil { - config.Logger().ErrorF("error updating installer: %v", err) + // Remove locks if provided + if update.UpdateLocks != "" { + stack := docker.GetStackConfig() + if err := utils.RemoveLocks(update.UpdateLocks, stack.LocksDir); err != nil { + config.Logger().ErrorF("error removing locks: %v", err) } + config.Logger().Info("Removed locks: %s", update.UpdateLocks) } - err := docker.StackUP(version + "-" + edition) - if err != nil { - return fmt.Errorf("error updating UTMStack: %v", err) + // Download the installer for this version + cnf := config.GetConfig() + if cnf.Branch == "prod" { + if err := c.UpdateInstaller(update.Version); err != nil { + return fmt.Errorf("error updating installer: %v", err) + } } - err = SaveVersion(version, edition, changelog) - if err != nil { + // Save the version + if err := SaveVersion(update.Version, update.Edition, update.Changelog); err != nil { return fmt.Errorf("error saving new version: %v", err) } - config.Logger().Info("UTMStack updated to version %s-%s", version, edition) - config.Updating = false - - time.Sleep(3 * time.Minute) + config.Logger().Info("Update prepared, restarting service to apply changes...") - err = utils.RunCmd("docker", "image", "prune", "-a", "-f") - if err != nil { - config.Logger().ErrorF("error cleaning up old Docker images after update: %v", err) - } - - // Restart service to load new installer binary - if cnf.Branch == "prod" || cnf.Branch == "" { - go func() { - time.Sleep(5 * time.Second) - utils.RestartService("UTMStackComponentsUpdater") - }() - } + // Restart service - Apply will run on startup and mark as sent after success + go func() { + time.Sleep(5 * time.Second) + utils.RestartService("UTMStackComponentsUpdater") + }() return nil } func (c *UpdaterClient) UpdateInstaller(version string) error { - execPath, err := os.Executable() - if err != nil { - return fmt.Errorf("error getting executable path: %v", err) - } - // Download new installer from GitHub url := fmt.Sprintf(config.GitHubReleasesURL, version) resp, err := http.Get(url) @@ -218,8 +205,8 @@ func (c *UpdaterClient) UpdateInstaller(version string) error { return fmt.Errorf("error making installer executable: %v", err) } - // Replace current binary - if err := os.Rename(tmpPath, execPath); err != nil { + // Replace binary at standard location + if err := os.Rename(tmpPath, config.InstallerBinPath); err != nil { os.Remove(tmpPath) return fmt.Errorf("error replacing installer binary: %v", err) } @@ -246,7 +233,7 @@ func (c *UpdaterClient) UploadLogs(ctx context.Context, path string) error { url := fmt.Sprintf("%s%s", c.Config.Server, config.LogCollectorEndpoint) buf := &bytes.Buffer{} - writer := io.MultiWriter(buf) + writer := multipart.NewWriter(buf) zipFile, err := os.Open(path) if err != nil { @@ -254,7 +241,16 @@ func (c *UpdaterClient) UploadLogs(ctx context.Context, path string) error { } defer zipFile.Close() - if _, err = io.Copy(writer, zipFile); err != nil { + part, err := writer.CreateFormFile("file", filepath.Base(path)) + if err != nil { + return err + } + + if _, err = io.Copy(part, zipFile); err != nil { + return err + } + + if err = writer.Close(); err != nil { return err } @@ -262,7 +258,7 @@ func (c *UpdaterClient) UploadLogs(ctx context.Context, path string) error { if err != nil { return err } - req.Header.Set("Content-Type", "application/zip") + req.Header.Set("Content-Type", writer.FormDataContentType()) req.Header.Set("id", c.Config.InstanceID) req.Header.Set("key", c.Config.InstanceKey) diff --git a/installer/updater/license.go b/installer/updater/license.go index 4f0525a1b..555d84b7a 100644 --- a/installer/updater/license.go +++ b/installer/updater/license.go @@ -1,7 +1,6 @@ package updater import ( - "encoding/base64" "encoding/json" "fmt" "net/http" @@ -19,7 +18,7 @@ func (c *UpdaterClient) LicenseProcess() { defer ticker.Stop() for range ticker.C { - if IsInMaintenanceWindow() && !config.Updating { + if IsInMaintenanceWindow() { err := c.CheckLicense() if err != nil { config.Logger().ErrorF("error checking license: %v", err) @@ -44,54 +43,17 @@ func (c *UpdaterClient) CheckLicense() error { return fmt.Errorf("error getting license from %s: status: %d, error: %v", url, status, err) } newLicense = resp - } else { - config.Logger().Info("Not connected to the internet, trying to get license from local instance config") - if !utils.CheckIfPathExist(config.InstanceConfigPath) { - auth, err := getInstanceAuth() - if err != nil { - return fmt.Errorf("error getting instance auth: %v", err) - } - - if auth == "" { - return fmt.Errorf("instance auth is empty, since you are not connected to the internet, please contact support to get your license") - } - - authB, err := base64.StdEncoding.DecodeString(auth) - if err != nil { - return fmt.Errorf("error decoding instance auth: %v", err) - } - - newAuth := Auth{} - err = json.Unmarshal(authB, &newAuth) - if err != nil { - return fmt.Errorf("error unmarshalling instance auth: %v", err) - } - - c.Config.InstanceID = newAuth.ID - c.Config.InstanceKey = newAuth.Key - c.Config.Server = config.GetCMServer() - err = utils.WriteYAML(config.InstanceConfigPath, c.Config) - if err != nil { - return fmt.Errorf("error writing instance config file: %v", err) - } - } - - license, err := getLicense() + } else if utils.CheckIfPathExist(config.LicenseFilePath) { + newLicenseBytes, err := os.ReadFile(config.LicenseFilePath) if err != nil { - return fmt.Errorf("error getting license from backend: %v", err) + return fmt.Errorf("error reading license file: %v", err) } - newLicense = license + + newLicense = string(newLicenseBytes) } if newLicense != "" && newLicense != c.License { - config.Logger().Info("Updating license from %s to %s", c.License, newLicense) - err := os.WriteFile(config.LicenseFilePath, []byte(newLicense), 0644) - if err != nil { - return fmt.Errorf("error writing new license: %v", err) - } - c.License = newLicense - - decryptedLicense, err := lm.DecryptAndVerifyFromBase64(c.License, []string{c.Config.InstanceID, config.REPLACE}, config.PUBLIC_KEY) + decryptedLicense, err := lm.DecryptAndVerifyFromBase64(newLicense, []string{c.Config.InstanceID, config.REPLACE}, config.PUBLIC_KEY) if err != nil { return fmt.Errorf("error decrypting and verifying license: %v", err) } @@ -102,67 +64,33 @@ func (c *UpdaterClient) CheckLicense() error { return fmt.Errorf("error unmarshalling decrypted license: %v", err) } - isCurrentlyEnterprise, err := IsEnterpriseImage("utmstack_event-processor-manager") - if err != nil { - return fmt.Errorf("error checking if image is enterprise: %v", err) - } - - v, err := GetVersion() - if err != nil { - return fmt.Errorf("error getting version: %v", err) - } - if time.Now().After(finalLicense.ExpiresAt) { config.Logger().ErrorF("license has expired on %s, please renew it", finalLicense.ExpiresAt.Format(time.RFC3339)) - // TODO: send notification to backend and email to user - if isCurrentlyEnterprise { - config.Logger().Info("downgrading to community edition after license expiration") - err := c.UpdateToNewVersion(v.Version, "community", v.Changelog) - if err != nil { - return fmt.Errorf("error updating to new version: %v", err) - } - } - } else if time.Now().After(finalLicense.ExpiresAt.Add(-72 * time.Hour)) { - config.Logger().Info("license will expire on %s, please renew it", finalLicense.ExpiresAt.Format(time.RFC3339)) - // TODO: send notification to backend and email to user - } + os.Remove(config.LicenseFilePath) + c.License = "" - if !isCurrentlyEnterprise { - config.Logger().Info("Upgrading to UTMStack to enterprise after license verification...") - err := c.UpdateToNewVersion(v.Version, "enterprise", v.Changelog) + err = SaveVersion("", "community", "") if err != nil { - return fmt.Errorf("error updating to new version: %v", err) + return fmt.Errorf("error saving version after license update: %v", err) } - } - config.Logger().Info("License updated successfully") - } + return nil + } - return nil -} + err = SaveVersion("", "enterprise", "") + if err != nil { + return fmt.Errorf("error saving version after license update: %v", err) + } -func getInstanceAuth() (string, error) { - auth := "" - backConf, err := getConfigFromBackend(6) - if err != nil { - return "", err - } + c.License = newLicense - for _, c := range backConf { - if c.ConfParamShort == "utmstack.instance.auth" { - auth = c.ConfParamValue - break + err = os.WriteFile(config.LicenseFilePath, []byte(newLicense), 0644) + if err != nil { + return fmt.Errorf("error writing new license: %v", err) } - } - - return auth, nil -} -func getLicense() (string, error) { - backConf, err := getConfigFromBackend(7) - if err != nil { - return "", err + config.Logger().Info("License updated successfully") } - return backConf[0].ConfParamValue, nil + return nil } diff --git a/installer/updater/logprocessor.go b/installer/updater/logprocessor.go index d1898c897..ba92e7870 100644 --- a/installer/updater/logprocessor.go +++ b/installer/updater/logprocessor.go @@ -40,7 +40,7 @@ func SyncSystemLogs() { } } - if !config.Updating && active { + if active { err := CollectAndShipSwarmLogs() if err != nil { config.Logger().ErrorF("Error collecting and shipping logs: %v", err) @@ -115,11 +115,13 @@ func CollectAndShipSwarmLogs() error { } if config.ConnectedToInternet { - if err := GetUpdaterClient().UploadLogs(ctx, archiveName); err != nil { + uploadCtx, uploadCancel := context.WithTimeout(context.Background(), 5*time.Minute) + err = GetUpdaterClient().UploadLogs(uploadCtx, archiveName) + uploadCancel() + _ = os.Remove(archiveName) + if err != nil { return fmt.Errorf("error uploading logs: %v", err) } - - _ = os.Remove(archiveName) } err = disableLogSender() @@ -151,6 +153,7 @@ func createZip( ShowStderr: true, Timestamps: true, Details: true, + Tail: "10000", }) if err != nil { config.Logger().ErrorF("Error getting logs for container %s: %v", c.ID, err) diff --git a/installer/updater/pending.go b/installer/updater/pending.go new file mode 100644 index 000000000..59430b053 --- /dev/null +++ b/installer/updater/pending.go @@ -0,0 +1,38 @@ +package updater + +import ( + "github.com/utmstack/UTMStack/installer/config" + "github.com/utmstack/UTMStack/installer/utils" +) + +type PendingUpdate struct { + ID string `json:"id"` + Version string `json:"version"` + Edition string `json:"edition"` + Changelog string `json:"changelog"` + UpdateLocks string `json:"update_locks"` +} + +func GetPendingUpdate() (*PendingUpdate, error) { + if !utils.CheckIfPathExist(config.PendingUpdatesPath) { + return nil, nil + } + + var update PendingUpdate + if err := utils.ReadJson(config.PendingUpdatesPath, &update); err != nil { + return nil, err + } + + return &update, nil +} + +func SavePendingUpdate(update PendingUpdate) error { + return utils.WriteJSON(config.PendingUpdatesPath, update) +} + +func ClearPendingUpdate() error { + if utils.CheckIfPathExist(config.PendingUpdatesPath) { + return utils.Remove(config.PendingUpdatesPath) + } + return nil +} diff --git a/installer/updater/register.go b/installer/updater/register.go index 2023fc0f9..9be6f23ef 100644 --- a/installer/updater/register.go +++ b/installer/updater/register.go @@ -1,13 +1,17 @@ package updater import ( - "encoding/base64" "encoding/json" "fmt" "net/http" + "os" + "path/filepath" + "strings" "time" "github.com/utmstack/UTMStack/installer/config" + "github.com/utmstack/UTMStack/installer/docker" + "github.com/utmstack/UTMStack/installer/services" "github.com/utmstack/UTMStack/installer/utils" ) @@ -18,33 +22,38 @@ type InstanceConfig struct { } func RegisterInstance() error { - instanceInfo := getInstanceInfo() - - v, err := GetVersion() - if err != nil { - return fmt.Errorf("error getting version: %v", err) - } - - instanceInfo.Version = v.Version - if config.ConnectedToInternet { + v, err := GetVersion() + if err != nil { + return fmt.Errorf("error getting version: %v", err) + } + instanceConf := InstanceConfig{ Server: config.GetCMServer(), } + serverConfig := config.GetConfig() + if serverConfig == nil { + return fmt.Errorf("error: server config is nil") + } + instanceRegisterReq := InstanceDTOInput{ - Name: instanceInfo.Name, - Country: instanceInfo.Country, - Email: instanceInfo.Email, + Name: serverConfig.ServerName, Edition: "community", - Version: instanceInfo.Version, + Version: v.Version, } - serverConfig := config.GetConfig() - if serverConfig != nil && (serverConfig.MappingName != nil && *serverConfig.MappingName != "") { + if serverConfig.MappingName != nil && *serverConfig.MappingName != "" { instanceRegisterReq.MappingName = *serverConfig.MappingName } + // Check if this is a SaaS instance + stack := docker.GetStackConfig() + saasLockPath := filepath.Join(stack.LocksDir, "saas.lock") + if utils.CheckIfPathExist(saasLockPath) { + instanceRegisterReq.Tags = "SAAS" + } + instanceJSON, err := json.Marshal(instanceRegisterReq) if err != nil { return fmt.Errorf("error marshalling instance register request: %v", err) @@ -55,7 +64,6 @@ func RegisterInstance() error { return fmt.Errorf("error registering instance: status code: %d, error %v", status, err) } - instanceInfo.InstanceID = resp.ID instanceConf.InstanceID = resp.ID instanceConf.InstanceKey = resp.Key @@ -63,58 +71,98 @@ func RegisterInstance() error { if err != nil { return fmt.Errorf("error writing instance config file: %v", err) } - } - err = updateInstanceInfo(instanceInfo) - if err != nil { - return fmt.Errorf("error updating instance info in backend: %v", err) + err = updateInstanceInfo(resp.ID) + if err != nil { + return fmt.Errorf("error updating instance info in backend: %v", err) + } } return nil } -func getInstanceInfo() InstanceInfo { - var instanceInfo InstanceInfo +// StartHeartbeat sends heartbeat to CM every minute +func StartHeartbeat(instanceConf InstanceConfig) { + for { + time.Sleep(1 * time.Minute) + + url := fmt.Sprintf("%s%s", instanceConf.Server, config.HeartbeatEndpoint) + _, status, err := utils.DoReq[any]( + url, + nil, + http.MethodPost, + map[string]string{"id": instanceConf.InstanceID, "key": instanceConf.InstanceKey}, + nil, + ) + + if err != nil || status != http.StatusOK { + config.Logger().ErrorF("error sending heartbeat: status: %d, error: %v", status, err) + } + } +} + +// PollAndUpdateAdminEmail polls for admin email and updates instance details +func PollAndUpdateAdminEmail(instanceConf InstanceConfig) { + serverConfig := config.GetConfig() + if serverConfig == nil { + config.Logger().ErrorF("error: server config is nil in PollAndUpdateAdminEmail") + return + } for { - time.Sleep(30 * time.Second) - backConf, err := getConfigFromBackend(6) + time.Sleep(5 * time.Minute) + + email, err := services.GetAdminEmail(serverConfig) if err != nil { - // Only log if it's not a maintenance/backend down error - if !IsBackendMaintenanceError(err) { - config.Logger().Info("instance info not ready yet, retrying after error: %v", err) - } + config.Logger().ErrorF("error getting admin email: %v", err) continue } - for _, c := range backConf { - switch c.ConfParamShort { - case "utmstack.instance.organization": - instanceInfo.Name = c.ConfParamValue - case "utmstack.instance.country": - instanceInfo.Country = c.ConfParamValue - case "utmstack.instance.contact_email": - instanceInfo.Email = c.ConfParamValue - } + if email == "" { + continue + } + + // Check if this email was already sent + lastEmail, _ := os.ReadFile(config.LastAdminEmailPath) + if strings.TrimSpace(string(lastEmail)) == email { + return + } + + // Email found, update instance details + updateReq := InstanceDTOInput{ + Name: serverConfig.ServerName, + Email: email, } - if instanceInfo.Name == "" || instanceInfo.Country == "" || instanceInfo.Email == "" { - config.Logger().Info("instance info not ready yet, retrying after incomplete data") + reqJSON, err := json.Marshal(updateReq) + if err != nil { + config.Logger().ErrorF("error marshalling update request: %v", err) continue } - break - } + url := fmt.Sprintf("%s%s", instanceConf.Server, config.UpdateInstanceDetailsEndpoint) + _, status, err := utils.DoReq[any]( + url, + reqJSON, + http.MethodPut, + map[string]string{"id": instanceConf.InstanceID, "key": instanceConf.InstanceKey}, + nil, + ) - return instanceInfo -} + if err != nil || status != http.StatusOK { + config.Logger().ErrorF("error updating instance details: status: %d, error: %v", status, err) + continue + } -func updateInstanceInfo(instanceInfo InstanceInfo) error { - jsonData, err := json.Marshal(instanceInfo) - if err != nil { - return fmt.Errorf("error marshalling instance info: %v", err) + // Save the email to avoid re-sending + _ = os.WriteFile(config.LastAdminEmailPath, []byte(email), 0644) + + config.Logger().Info("Successfully updated instance with admin email: %s", email) + return } - instanceInfoBase64 := base64.StdEncoding.EncodeToString(jsonData) +} + +func updateInstanceInfo(id string) error { backConf, err := getConfigFromBackend(6) if err != nil { @@ -127,7 +175,7 @@ func updateInstanceInfo(instanceInfo InstanceInfo) error { for i, c := range backConf { if c.ConfParamShort == "utmstack.instance.data" { - backConf[i].ConfParamValue = instanceInfoBase64 + backConf[i].ConfParamValue = id } } diff --git a/installer/updater/schemas.go b/installer/updater/schemas.go index 57bc224c8..056adfe91 100644 --- a/installer/updater/schemas.go +++ b/installer/updater/schemas.go @@ -21,6 +21,7 @@ type InstanceDTOInput struct { Edition string `json:"edition"` CurrentIp string `json:"current_ip"` MappingName string `json:"mapping_name,omitempty"` + Tags string `json:"tags"` } type InstanceInfo struct { @@ -32,13 +33,14 @@ type InstanceInfo struct { } type UpdateDTO struct { - ID string `json:"id"` - Instance InstanceDTOInput `json:"instance,omitempty"` - Version VersionDTO `json:"version"` - Edition string `json:"edition"` - Sent bool `json:"sent"` - Approved bool `json:"approved"` - ApproveAt time.Time `json:"aprove_at,omitempty"` + ID string `json:"id"` + Instance InstanceDTOInput `json:"instance,omitempty"` + Version VersionDTO `json:"version"` + Edition string `json:"edition"` + Sent bool `json:"sent"` + Approved bool `json:"approved"` + ApproveAt time.Time `json:"aprove_at,omitempty"` + UpdateLocks string `json:"update_locks,omitempty"` } type VersionDTO struct { diff --git a/installer/updater/service.go b/installer/updater/service.go index 08e4c3a61..926b04405 100644 --- a/installer/updater/service.go +++ b/installer/updater/service.go @@ -1,10 +1,14 @@ package updater import ( + "fmt" + "io" + "os" "time" "github.com/kardianos/service" "github.com/utmstack/UTMStack/installer/config" + "github.com/utmstack/UTMStack/installer/setup" "github.com/utmstack/UTMStack/installer/utils" ) @@ -13,6 +17,7 @@ func GetConfigServ() *service.Config { Name: "UTMStackComponentsUpdater", DisplayName: "UTMStack Components Updater", Description: "UTMStack Components Updater", + Executable: config.InstallerBinPath, Arguments: []string{"--run"}, } @@ -31,9 +36,44 @@ func (p *program) Stop(s service.Service) error { } func (p *program) run() { + // Migrate service to standard path if needed + if migrated := migrateServiceIfNeeded(); migrated { + return // Exit, new service will start from standard path + } + go MonitorConnection(config.GetCMServer(), 30*time.Second, 3, &config.ConnectedToInternet) time.Sleep(5 * time.Second) + // Check for pending update and apply it + pendingUpdate, err := GetPendingUpdate() + if err != nil { + config.Logger().ErrorF("error getting pending update: %v", err) + } + + if pendingUpdate != nil { + config.Logger().Info("Applying pending update: %s-%s", pendingUpdate.Version, pendingUpdate.Edition) + + // Apply setup with the pending version + if _, err := setup.Apply(pendingUpdate.Version); err != nil { + config.Logger().ErrorF("error applying setup for version %s: %v", pendingUpdate.Version, err) + } else { + config.Logger().Info("Successfully applied update %s", pendingUpdate.Version) + + // Mark as sent in CM after successful apply + if pendingUpdate.ID != "offline" { + client := GetUpdaterClient() + if err := client.MarkUpdateSent(pendingUpdate.ID); err != nil { + config.Logger().ErrorF("error marking update %s as sent: %v", pendingUpdate.ID, err) + } + } + } + + // Clear pending update + if err := ClearPendingUpdate(); err != nil { + config.Logger().ErrorF("error clearing pending update: %v", err) + } + } + client := GetUpdaterClient() go UpdateWindowConfig() go client.UpdateProcess() @@ -42,6 +82,11 @@ func (p *program) run() { } func InstallService() { + // Copy current binary to standard location + if err := copyInstallerToStandardPath(); err != nil { + config.Logger().Fatal("error copying installer to standard path: %v", err) + } + svcConfig := GetConfigServ() prg := new(program) newService, err := service.New(prg, svcConfig) @@ -59,6 +104,90 @@ func InstallService() { } } +func copyInstallerToStandardPath() error { + currentExec, err := os.Executable() + if err != nil { + return fmt.Errorf("error getting current executable path: %v", err) + } + + // If already at standard path, skip copy + if currentExec == config.InstallerBinPath { + return nil + } + + srcFile, err := os.Open(currentExec) + if err != nil { + return fmt.Errorf("error opening source binary: %v", err) + } + defer srcFile.Close() + + dstFile, err := os.Create(config.InstallerBinPath) + if err != nil { + return fmt.Errorf("error creating destination binary: %v", err) + } + defer dstFile.Close() + + if _, err = io.Copy(dstFile, srcFile); err != nil { + return fmt.Errorf("error copying binary: %v", err) + } + + if err = os.Chmod(config.InstallerBinPath, 0755); err != nil { + return fmt.Errorf("error setting permissions on binary: %v", err) + } + + return nil +} + +func migrateServiceIfNeeded() bool { + currentExec, err := os.Executable() + if err != nil { + config.Logger().ErrorF("error getting current executable path: %v", err) + return false + } + + // Already running from standard path, no migration needed + if currentExec == config.InstallerBinPath { + return false + } + + config.Logger().Info("Migrating service to standard path: %s", config.InstallerBinPath) + + // Copy current binary to standard location + if err := copyInstallerToStandardPath(); err != nil { + config.Logger().ErrorF("error copying installer during migration: %v", err) + return false + } + + // Uninstall old service + serviceName := GetConfigServ().Name + if err := utils.UninstallService(serviceName); err != nil { + config.Logger().ErrorF("error uninstalling old service during migration: %v", err) + return false + } + + // Install new service pointing to standard path + svcConfig := GetConfigServ() + prg := new(program) + newService, err := service.New(prg, svcConfig) + if err != nil { + config.Logger().ErrorF("error creating new service during migration: %v", err) + return false + } + + if err := newService.Install(); err != nil { + config.Logger().ErrorF("error installing new service during migration: %v", err) + return false + } + + if err := newService.Start(); err != nil { + config.Logger().ErrorF("error starting new service during migration: %v", err) + return false + } + + config.Logger().Info("Service migrated successfully to %s", config.InstallerBinPath) + return true +} + func RunService() { svcConfig := GetConfigServ() prg := new(program) diff --git a/installer/updater/versions.go b/installer/updater/versions.go index 45948c29d..ca5e804a8 100644 --- a/installer/updater/versions.go +++ b/installer/updater/versions.go @@ -1,11 +1,8 @@ package updater import ( - "bytes" "fmt" - "net/http" "os" - "os/exec" "regexp" "strconv" "strings" @@ -16,41 +13,17 @@ import ( ) var ( - version = VersionFile{} - versionOnce sync.Once - SpecificVersion string // Version specified via command line flag + version = VersionFile{} + versionOnce sync.Once ) func GetVersion() (VersionFile, error) { var err error versionOnce.Do(func() { if !utils.CheckIfPathExist(config.VersionFilePath) { - // Check if a specific version was requested via command line - if SpecificVersion != "" { - version.Version = SpecificVersion - version.Changelog = "" - version.Edition = "community" - } else if config.ConnectedToInternet { - latestVersion, errFetch := fetchLatestVersionFromCM() - if errFetch != nil { - config.Logger().Info("Could not fetch latest version from CM, using installer version: %v", errFetch) - version.Version = config.INSTALLER_VERSION - version.Changelog = "" - } else { - version.Version = latestVersion.Version - version.Changelog = latestVersion.Changelog - } - version.Edition = "community" - } else { - versionFromTar, errB := ExtractVersionFromFolder(config.ImagesPath) - if errB == nil { - version.Version = versionFromTar - version.Edition = "enterprise" - } else { - err = fmt.Errorf("error extracting version from folder: %v", err) - return - } - } + version.Version = config.INSTALLER_VERSION + version.Changelog = "" + version.Edition = "community" errB := utils.WriteJSON(config.VersionFilePath, &version) if errB != nil { @@ -70,9 +43,17 @@ func GetVersion() (VersionFile, error) { } func SaveVersion(vers, edition, changelog string) error { - version.Changelog = changelog - version.Edition = edition - version.Version = vers + if vers != "" { + version.Version = vers + } + + if edition != "" { + version.Edition = edition + } + + if changelog != "" { + version.Changelog = changelog + } return utils.WriteJSON(config.VersionFilePath, &version) } @@ -84,7 +65,7 @@ func ExtractVersionFromFolder(folder string) (string, error) { } // Regex pattern to find versions like 11_0_0 - versionRegex := regexp.MustCompile(`-(\d+_\d+_\d+)-enterprise\.tar$`) + versionRegex := regexp.MustCompile(`-(\d+_\d+_\d+)\.tar$`) for _, entry := range entries { if entry.IsDir() { @@ -92,7 +73,7 @@ func ExtractVersionFromFolder(folder string) (string, error) { } name := entry.Name() - if strings.HasPrefix(name, "utmstack-") && strings.HasSuffix(name, "-enterprise.tar") { + if strings.HasPrefix(name, "utmstack-") && strings.HasSuffix(name, ".tar") { matches := versionRegex.FindStringSubmatch(name) if len(matches) >= 2 { version := strings.ReplaceAll(matches[1], "_", ".") @@ -104,24 +85,6 @@ func ExtractVersionFromFolder(folder string) (string, error) { return "", fmt.Errorf("valid version not found in folder") } -func IsEnterpriseImage(serviceName string) (bool, error) { - var outBuf bytes.Buffer - var errBuf bytes.Buffer - - cmd := exec.Command("docker", "service", "inspect", serviceName, "--format", "{{.Spec.TaskTemplate.ContainerSpec.Image}}") - cmd.Env = os.Environ() - cmd.Stdout = &outBuf - cmd.Stderr = &errBuf - - err := cmd.Run() - if err != nil { - return false, fmt.Errorf("error running docker inspect: %v - %s", err, errBuf.String()) - } - - image := strings.TrimSpace(outBuf.String()) - return strings.Contains(image, "-enterprise"), nil -} - // Version sorting functions type Version struct { Major int @@ -219,25 +182,3 @@ func SortVersions(versions []map[string]string) []map[string]string { return versions } - -func fetchLatestVersionFromCM() (*VersionDTO, error) { - url := fmt.Sprintf("%s%s", config.GetCMServer(), config.GetLatestVersionEndpoint) - - resp, status, err := utils.DoReq[VersionDTO]( - url, - nil, - http.MethodGet, - nil, - nil, - ) - - if err != nil { - return nil, fmt.Errorf("error fetching latest version: %v", err) - } - - if status != http.StatusOK { - return nil, fmt.Errorf("unexpected status code: %d", status) - } - - return &resp, nil -} diff --git a/installer/utils/locks.go b/installer/utils/locks.go index e0b5ca039..b4a9b794d 100644 --- a/installer/utils/locks.go +++ b/installer/utils/locks.go @@ -4,6 +4,7 @@ import ( "fmt" "os" "strconv" + "strings" ) func GetLock(v int, locksDir string) bool { @@ -40,3 +41,22 @@ func GetStep() int { return vi } + +func RemoveLocks(locks string, locksDir string) error { + if locks == "" { + return nil + } + + locksList := strings.Split(locks, ",") + for _, lock := range locksList { + lock = strings.TrimSpace(lock) + if lock == "" { + continue + } + lockPath := fmt.Sprintf("%s/%s.lock", locksDir, lock) + if err := os.Remove(lockPath); err != nil && !os.IsNotExist(err) { + return fmt.Errorf("error removing lock %s: %v", lock, err) + } + } + return nil +} diff --git a/plugins/alerts/go.mod b/plugins/alerts/go.mod index afd24746c..62d5b19e3 100644 --- a/plugins/alerts/go.mod +++ b/plugins/alerts/go.mod @@ -1,52 +1,56 @@ module github.com/utmstack/UTMStack/plugins/alerts -go 1.24.2 +go 1.25.5 require ( - github.com/threatwinds/go-sdk v1.0.43 + github.com/google/uuid v1.6.0 + github.com/threatwinds/go-sdk v1.1.7 github.com/tidwall/gjson v1.18.0 - google.golang.org/grpc v1.74.2 - google.golang.org/protobuf v1.36.6 + google.golang.org/protobuf v1.36.11 ) require ( - cel.dev/expr v0.24.0 // indirect + cel.dev/expr v0.25.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/bytedance/sonic v1.14.0 // indirect - github.com/bytedance/sonic/loader v0.3.0 // indirect - github.com/cloudwego/base64x v0.1.5 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/bytedance/gopkg v0.1.3 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect github.com/gin-contrib/sse v1.1.0 // indirect - github.com/gin-gonic/gin v1.10.1 // indirect + github.com/gin-gonic/gin v1.11.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.27.0 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect github.com/goccy/go-json v0.10.5 // indirect - github.com/google/cel-go v0.26.0 // indirect - github.com/google/uuid v1.6.0 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect + github.com/google/cel-go v0.26.1 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect - github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/opensearch-project/opensearch-go/v2 v2.3.0 // indirect + github.com/opensearch-project/opensearch-go/v4 v4.6.0 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect github.com/stoewer/go-strcase v1.3.1 // indirect - github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.3.0 // indirect - go.yaml.in/yaml/v2 v2.4.2 // indirect - golang.org/x/arch v0.19.0 // indirect - golang.org/x/crypto v0.40.0 // indirect - golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 // indirect - golang.org/x/net v0.42.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/text v0.27.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 // indirect + github.com/ugorji/go/codec v1.3.1 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/grpc v1.78.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - sigs.k8s.io/yaml v1.5.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/plugins/alerts/go.sum b/plugins/alerts/go.sum index 76d128924..605fc201b 100644 --- a/plugins/alerts/go.sum +++ b/plugins/alerts/go.sum @@ -1,38 +1,25 @@ -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/aws/aws-sdk-go v1.44.263/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= -github.com/aws/aws-sdk-go-v2/config v1.18.25/go.mod h1:dZnYpD5wTW/dQF0rRNLVypB396zWCcPiBIvdvSWHEg4= -github.com/aws/aws-sdk-go-v2/credentials v1.13.24/go.mod h1:jYPYi99wUOPIFi0rhiOvXeSEReVOzBqFNOX5bXYoG2o= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34/go.mod h1:Etz2dj6UHYuw+Xw830KfzCfWGMzqvUTCjUj5b76GVDc= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw= -github.com/aws/aws-sdk-go-v2/service/sso v1.12.10/go.mod h1:ouy2P4z6sJN70fR3ka3wD3Ro3KezSxU6eKGQI2+2fjI= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk= -github.com/aws/aws-sdk-go-v2/service/sts v1.19.0/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8= -github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= -github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= -github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= +github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= -github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= -github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -43,28 +30,27 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= -github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -78,116 +64,97 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/opensearch-project/opensearch-go/v2 v2.3.0 h1:nQIEMr+A92CkhHrZgUhcfsrZjibvB3APXf2a1VwCmMQ= -github.com/opensearch-project/opensearch-go/v2 v2.3.0/go.mod h1:8LDr9FCgUTVoT+5ESjc2+iaZuldqE+23Iq0r1XeNue8= +github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc= +github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/threatwinds/go-sdk v1.0.43 h1:q2Pl0DvmFpeBCs5sZRcsG1oDn2zIoIB5vHwcJ/VDgD8= -github.com/threatwinds/go-sdk v1.0.43/go.mod h1:S0R7kQj2BsTgaYnX6eZ3keEFRy9yt4f9SCEKYMJzD6g= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo= +github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= +github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= -github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= -go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= -go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= -go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= -go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= -go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= -go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= -go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= -golang.org/x/arch v0.19.0 h1:LmbDQUodHThXE+htjrnmVD73M//D9GTH6wFZjyDkjyU= -golang.org/x/arch v0.19.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 h1:R9PFI6EUdfVKgwKjZef7QIwGcBKu86OEFpJ9nUEP2l4= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ= +github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 h1:mVXdvnmR3S3BQOqHECm9NGMjYiRtEvDYcqAqedTXY6s= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 h1:qJW29YvkiJmXOYMu5Tf8lyrTp3dOS+K4z6IixtLaCf8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ= -sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/plugins/alerts/integration_test.go b/plugins/alerts/integration_test.go new file mode 100644 index 000000000..308ff1d5a --- /dev/null +++ b/plugins/alerts/integration_test.go @@ -0,0 +1,414 @@ +package main + +import ( + "context" + "fmt" + "os" + "strings" + "testing" + "time" + + "github.com/google/uuid" + sdkos "github.com/threatwinds/go-sdk/os" + "github.com/threatwinds/go-sdk/plugins" + "google.golang.org/protobuf/types/known/structpb" +) + +func TestAlertsIntegration(t *testing.T) { + // 1. Setup OpenSearch connection + nodesEnv := os.Getenv("NODES") + if nodesEnv == "" { + t.Skip("NODES env var not set, skipping integration test") + } + + // Fix for http vs https mismatch in test environment + if strings.HasPrefix(nodesEnv, "https://") { + nodesEnv = strings.Replace(nodesEnv, "https://", "http://", 1) + } + if !strings.HasPrefix(nodesEnv, "http://") && !strings.HasPrefix(nodesEnv, "https://") { + nodesEnv = "http://" + nodesEnv + } + + err := sdkos.Connect([]string{nodesEnv}, os.Getenv("USER"), os.Getenv("PASSWORD")) + if err != nil { + t.Fatalf("Failed to connect to OpenSearch: %v", err) + } + + // Helper to create a test alert + createAlert := func(name, user string, dedup []string) *plugins.Alert { + return &plugins.Alert{ + Id: uuid.NewString(), + Name: name, + Description: "Integration Test Alert", + Timestamp: time.Now().UTC().Format(time.RFC3339Nano), + Severity: "low", + Events: []*plugins.Event{ + { + Log: map[string]*structpb.Value{ + "user": structpb.NewStringValue(user), + }, + }, + }, + DeduplicateBy: dedup, + GroupBy: dedup, // Default to using same fields for GroupBy in legacy tests + } + } + + // Helper to clean up + alertIndex := sdkos.BuildIndexPattern("v11", "alert") + runID := uuid.NewString() + + t.Run("Deduplication_Basic", func(t *testing.T) { + alertName := "DedupTest-" + runID + dedupFields := []string{"name"} + + // 1. Send First Alert + alert1 := createAlert(alertName, "user1", dedupFields) + _, err := correlate(context.Background(), alert1) + if err != nil { + t.Fatalf("First correlate failed: %v", err) + } + + // Allow OS to index + time.Sleep(1 * time.Second) + sdkos.RefreshIndex(context.Background(), alertIndex) + + // 2. Send Second Alert (DIFFERENT user so it's not a duplicate, but SAME name so it's grouped) + alert2 := createAlert(alertName, "user2", dedupFields) + alert2.DeduplicateBy = []string{"name", "events.0.log.user"} + alert2.GroupBy = []string{"name"} + + _, err = correlate(context.Background(), alert2) + if err != nil { + t.Fatalf("Second correlate failed: %v", err) + } + + time.Sleep(1 * time.Second) + sdkos.RefreshIndex(context.Background(), alertIndex) + + // Fetch alert2 + a2Doc, err := getAlertFromOS(alert2.Id) + if err != nil { + t.Fatalf("Failed to fetch alert 2: %v", err) + } + + if a2Doc.ParentID == nil { + t.Errorf("Expected Alert 2 to have ParentID, got nil") + } else if *a2Doc.ParentID != alert1.Id { + t.Errorf("Expected Alert 2 ParentID to be %s, got %s", alert1.Id, *a2Doc.ParentID) + } + }) + + t.Run("Deduplication_GroupBy_Fields", func(t *testing.T) { + alertName := "GroupByTest-" + runID + groupBy := []string{"name"} + dedupFields := []string{"name", "events.0.log.user"} + + // 1. User A - First Alert + alertA1 := createAlert(alertName, "userA", dedupFields) + alertA1.GroupBy = groupBy + + _, err := correlate(context.Background(), alertA1) + if err != nil { + t.Fatal(err) + } + + time.Sleep(1 * time.Second) + sdkos.RefreshIndex(context.Background(), alertIndex) + + // 2. User A - Second Alert -> DUPLICATE -> Should be dropped + alertA2_dup := createAlert(alertName, "userA", dedupFields) + alertA2_dup.GroupBy = groupBy + _, err = correlate(context.Background(), alertA2_dup) + if err != nil { + t.Fatal(err) + } + + // 3. User B - First Alert -> DIFFERENT for Dedup, SAME for GroupBy -> Should be linked + alertB1 := createAlert(alertName, "userB", dedupFields) + alertB1.GroupBy = groupBy + _, err = correlate(context.Background(), alertB1) + if err != nil { + t.Fatal(err) + } + + time.Sleep(1 * time.Second) + sdkos.RefreshIndex(context.Background(), alertIndex) + + // Verify A2_dup is NOT in OS + _, err = getAlertFromOS(alertA2_dup.Id) + if err == nil { + t.Errorf("Expected A2_dup to be dropped") + } + + // Verify B1 has parent A1 + docB1, err := getAlertFromOS(alertB1.Id) + if err != nil { + t.Fatalf("Failed to get B1: %v", err) + } + if docB1.ParentID == nil || *docB1.ParentID != alertA1.Id { + t.Errorf("Expected B1 parent to be A1. Got: %v", docB1.ParentID) + } + }) + + // Helper to get hit from OS + getHit := func(id string) (*sdkos.Hit, error) { + query := sdkos.SearchRequest{ + Query: &sdkos.Query{ + Term: map[string]map[string]interface{}{ + "id.keyword": { + "value": id, + }, + }, + }, + Size: 1, + } + hits, err := query.WideSearchIn(context.Background(), []string{sdkos.BuildIndexPattern("v11", "alert")}) + if err != nil { + return nil, err + } + if hits.Hits.Total.Value == 0 { + return nil, fmt.Errorf("not found") + } + return &hits.Hits.Hits[0], nil + } + + t.Run("Deduplication_Reopen_Closed", func(t *testing.T) { + alertName := "ReopenTest-" + runID + dedupFields := []string{"name"} + + // 1. Create Parent Alert + alertParent := createAlert(alertName, "user1", dedupFields) + _, err := correlate(context.Background(), alertParent) + if err != nil { + t.Fatal(err) + } + + time.Sleep(1 * time.Second) + sdkos.RefreshIndex(context.Background(), alertIndex) + + // 2. Manually Close the Parent Alert + hit, err := getHit(alertParent.Id) + if err != nil { + t.Fatal(err) + } + + var a AlertFields + hit.Source.ParseSource(&a) + a.Status = 5 + hit.Source.SetSource(a) + + err = hit.Save(context.Background()) + if err != nil { + t.Fatal("Failed to save closed alert:", err) + } + + time.Sleep(1 * time.Second) + sdkos.RefreshIndex(context.Background(), alertIndex) + + // 3. Create Child Alert (DIFFERENT user so it's not a duplicate, but SAME name so it's grouped) + alertChild := createAlert(alertName, "user2", dedupFields) + alertChild.DeduplicateBy = []string{"name", "events.0.log.user"} + alertChild.GroupBy = []string{"name"} + _, err = correlate(context.Background(), alertChild) + if err != nil { + t.Fatal(err) + } + + time.Sleep(1 * time.Second) + sdkos.RefreshIndex(context.Background(), alertIndex) + + // 4. Verify Parent is Re-opened (Status 2) + docParentReopened, err := getAlertFromOS(alertParent.Id) + if err != nil { + t.Fatal(err) + } + + if docParentReopened.Status != 2 { + t.Errorf("Expected Parent Alert to be re-opened (Status 2), but got %d", docParentReopened.Status) + } + + // Verify Grouping + docChild, _ := getAlertFromOS(alertChild.Id) + if docChild.ParentID == nil || *docChild.ParentID != alertParent.Id { + t.Errorf("Expected Child to group with Parent %s, got %v", alertParent.Id, docChild.ParentID) + } + }) + + t.Run("Deduplication_Missing_Field", func(t *testing.T) { + alertName := "MissingFieldTest-" + runID + dedupFields := []string{"name", "events.0.log.user"} + + alertNoUser := &plugins.Alert{ + Id: uuid.NewString(), + Name: alertName, + Timestamp: time.Now().UTC().Format(time.RFC3339Nano), + Severity: "low", + Events: []*plugins.Event{{Log: map[string]*structpb.Value{}}}, + DeduplicateBy: dedupFields, + GroupBy: dedupFields, + } + + alertWithUser := createAlert(alertName, "bob", dedupFields) + + _, err := correlate(context.Background(), alertNoUser) + if err != nil { + t.Fatal(err) + } + + time.Sleep(1 * time.Second) + sdkos.RefreshIndex(context.Background(), alertIndex) + + _, err = correlate(context.Background(), alertWithUser) + if err != nil { + t.Fatal(err) + } + + time.Sleep(1 * time.Second) + sdkos.RefreshIndex(context.Background(), alertIndex) + + docWithUser, _ := getAlertFromOS(alertWithUser.Id) + if docWithUser.ParentID != nil && *docWithUser.ParentID == alertNoUser.Id { + t.Errorf("Alert with User='bob' incorrectly deduped with Alert (User=Missing)") + } + + alertNoUser2 := &plugins.Alert{ + Id: uuid.NewString(), + Name: alertName, + Timestamp: time.Now().UTC().Format(time.RFC3339Nano), + Severity: "low", + Events: []*plugins.Event{{Log: map[string]*structpb.Value{"diff": structpb.NewStringValue("yes")}}}, + DeduplicateBy: dedupFields, + GroupBy: []string{"name"}, + } + + _, err = correlate(context.Background(), alertNoUser2) + if err != nil { + t.Fatal(err) + } + + time.Sleep(1 * time.Second) + sdkos.RefreshIndex(context.Background(), alertIndex) + + docNoUser2, err := getAlertFromOS(alertNoUser2.Id) + if err != nil { + t.Logf("Alert(NoUser2) correctly dropped or not found yet: %v", err) + } else if docNoUser2.ParentID == nil { + t.Errorf("Expected Alert(NoUser2) to find a parent") + } + }) + + t.Run("Deduplication_Empty_List", func(t *testing.T) { + alertName := "EmptyDedup-" + runID + alert1 := createAlert(alertName, "user1", []string{}) + _, err := correlate(context.Background(), alert1) + if err != nil { + t.Fatal(err) + } + alert2 := createAlert(alertName, "user1", []string{}) + _, err = correlate(context.Background(), alert2) + if err != nil { + t.Fatal(err) + } + time.Sleep(1 * time.Second) + sdkos.RefreshIndex(context.Background(), alertIndex) + doc1, _ := getAlertFromOS(alert1.Id) + doc2, _ := getAlertFromOS(alert2.Id) + if doc1 != nil && doc1.ParentID != nil { + t.Errorf("Alert 1 should be parent") + } + if doc2 != nil && doc2.ParentID != nil { + t.Errorf("Alert 2 should be separate parent") + } + }) + + t.Run("Deduplication_vs_GroupBy", func(t *testing.T) { + alertName := "DedupVsGroup-" + runID + groupBy := []string{"name"} + dedupBy := []string{"name", "events.0.log.user"} + + alert1 := &plugins.Alert{ + Id: uuid.NewString(), + Name: alertName, + Timestamp: time.Now().UTC().Format(time.RFC3339Nano), + Events: []*plugins.Event{{Log: map[string]*structpb.Value{"user": structpb.NewStringValue("userA")}}}, + DeduplicateBy: dedupBy, + GroupBy: groupBy, + } + _, err := correlate(context.Background(), alert1) + if err != nil { + t.Fatal(err) + } + time.Sleep(1 * time.Second) + sdkos.RefreshIndex(context.Background(), alertIndex) + + alert2 := &plugins.Alert{ + Id: uuid.NewString(), + Name: alertName, + Timestamp: time.Now().UTC().Format(time.RFC3339Nano), + Events: []*plugins.Event{{Log: map[string]*structpb.Value{"user": structpb.NewStringValue("userA")}}}, + DeduplicateBy: dedupBy, + GroupBy: groupBy, + } + _, err = correlate(context.Background(), alert2) + if err != nil { + t.Fatal(err) + } + time.Sleep(1 * time.Second) + sdkos.RefreshIndex(context.Background(), alertIndex) + + _, err = getAlertFromOS(alert2.Id) + if err == nil { + t.Errorf("Alert 2 (Duplicate) should not have been indexed") + } + + alert3 := &plugins.Alert{ + Id: uuid.NewString(), + Name: alertName, + Timestamp: time.Now().UTC().Format(time.RFC3339Nano), + Events: []*plugins.Event{{Log: map[string]*structpb.Value{"user": structpb.NewStringValue("userB")}}}, + DeduplicateBy: dedupBy, + GroupBy: groupBy, + } + _, err = correlate(context.Background(), alert3) + if err != nil { + t.Fatal(err) + } + time.Sleep(1 * time.Second) + sdkos.RefreshIndex(context.Background(), alertIndex) + doc3, err := getAlertFromOS(alert3.Id) + if err != nil { + t.Fatalf("Failed to get Alert 3: %v", err) + } + if doc3.ParentID == nil || *doc3.ParentID != alert1.Id { + t.Errorf("Alert 3 should have been grouped with Alert 1. Got: %v", doc3.ParentID) + } + }) +} + +func getAlertFromOS(id string) (*AlertFields, error) { + query := sdkos.SearchRequest{ + Query: &sdkos.Query{ + Term: map[string]map[string]interface{}{ + "id.keyword": { + "value": id, + }, + }, + }, + Size: 1, + } + ctx := context.Background() + hits, err := query.WideSearchIn(ctx, []string{sdkos.BuildIndexPattern("v11", "alert")}) + if err != nil { + return nil, err + } + if hits.Hits.Total.Value == 0 { + return nil, fmt.Errorf("alert not found") + } + var a AlertFields + err = hits.Hits.Hits[0].Source.ParseSource(&a) + if err != nil { + return nil, err + } + return &a, nil +} diff --git a/plugins/alerts/main.go b/plugins/alerts/main.go index 81015ae84..cd3611107 100644 --- a/plugins/alerts/main.go +++ b/plugins/alerts/main.go @@ -3,25 +3,20 @@ package main import ( "context" "fmt" - "net" "os" + "regexp" "strings" "time" "github.com/threatwinds/go-sdk/catcher" - "github.com/threatwinds/go-sdk/opensearch" + sdkos "github.com/threatwinds/go-sdk/os" "github.com/threatwinds/go-sdk/plugins" "github.com/threatwinds/go-sdk/utils" "github.com/tidwall/gjson" - "google.golang.org/grpc" "google.golang.org/protobuf/types/known/emptypb" ) -type correlationServer struct { - plugins.UnimplementedCorrelationServer -} - type IncidentDetail struct { CreatedBy string `json:"createdBy"` Observation string `json:"observation"` @@ -58,99 +53,135 @@ type AlertFields struct { Notes string `json:"notes"` TagRulesApplied []int `json:"tagRulesApplied"` DeduplicatedBy []string `json:"deduplicatedBy"` + GroupedBy []string `json:"groupedBy"` } func main() { - // Recover from panics to ensure the main function doesn't terminate + openSearchUrl := plugins.PluginCfg("org.opensearch", false).Get("opensearch").String() + err := sdkos.Connect([]string{openSearchUrl}, "", "") + if err != nil { + _ = catcher.Error("cannot connect to OpenSearch", err, map[string]any{"process": "plugin_com.utmstack.alerts"}) + os.Exit(1) + } + + err = plugins.InitCorrelationPlugin("com.utmstack.alerts", correlate) + if err != nil { + _ = catcher.Error("com.utmstack.alerts", err, map[string]any{ + "process": "plugin_com.utmstack.alerts", + }) + os.Exit(1) + } +} + +func correlate(ctx context.Context, + alert *plugins.Alert) (*emptypb.Empty, error) { + // Recover from panics to ensure the method doesn't terminate defer func() { if r := recover(); r != nil { - _ = catcher.Error("recovered from panic in alerts main function", nil, map[string]any{ - "panic": r, + _ = catcher.Error("recovered from panic in Correlate method", nil, map[string]any{ + "panic": r, + "alert": alert.Name, + "process": "plugin_com.utmstack.alerts", }) - // Restart the main function after a brief delay - time.Sleep(5 * time.Second) - go main() } }() - // Initialize with retry logic instead of exiting - var socketsFolder utils.Folder - var err error - var socketFile string - var unixAddress *net.UnixAddr - var listener *net.UnixListener + parentId := getPreviousAlertId(alert) - // Retry loop for initialization - for { - socketsFolder, err = utils.MkdirJoin(plugins.WorkDir, "sockets") - if err != nil { - _ = catcher.Error("cannot create socket directory", err, nil) - time.Sleep(5 * time.Second) - continue + if parentId != nil { + if isDuplicate(alert) { + return nil, nil } + return nil, newAlert(alert, parentId) + } - socketFile = socketsFolder.FileJoin("com.utmstack.alerts_correlation.sock") - _ = os.Remove(socketFile) - - unixAddress, err = net.ResolveUnixAddr("unix", socketFile) - if err != nil { - _ = catcher.Error("cannot resolve unix address", err, nil) - time.Sleep(5 * time.Second) - continue + if len(alert.DeduplicateBy) > 0 { + if isDuplicate(alert) { + return nil, nil } + } - listener, err = net.ListenUnix("unix", unixAddress) - if err != nil { - _ = catcher.Error("cannot listen to unix socket", err, nil) - time.Sleep(5 * time.Second) - continue + return nil, newAlert(alert, nil) +} + +func isDuplicate(alert *plugins.Alert) bool { + // Recover from panics to ensure the function doesn't terminate + defer func() { + if r := recover(); r != nil { + _ = catcher.Error("recovered from panic in isDuplicate", nil, map[string]any{ + "panic": r, + "alert": alert.Name, + "process": "plugin_com.utmstack.alerts", + }) } + }() - // If we got here, initialization was successful - break + alertString, err := utils.ProtoMessageToString(alert) + if err != nil { + _ = catcher.Error("cannot convert alert to string", err, map[string]any{"alert": alert.Name, "process": "plugin_com.utmstack.alerts"}) + return false } - grpcServer := grpc.NewServer() - plugins.RegisterCorrelationServer(grpcServer, &correlationServer{}) + ctx := context.Background() + indices := []string{sdkos.BuildIndexPattern("v11", "alert")} - // Connect to OpenSearch with retry logic - for { - osUrl := plugins.PluginCfg("com.utmstack", false).Get("opensearch").String() - err = opensearch.Connect([]string{osUrl}) - if err != nil { - _ = catcher.Error("cannot connect to OpenSearch", err, nil) - time.Sleep(5 * time.Second) + // Create BoolBuilder + bb := sdkos.NewBoolBuilder(ctx, indices, "plugin_com.utmstack.alerts") + + // 1. Filter by Name (always) + bb.FilterTerm("name.keyword", alert.Name) + + // Compile regex for array index stripping + reArrayIndex := regexp.MustCompile(`\.[0-9]+(\.|$)`) + + for _, d := range alert.DeduplicateBy { + d = strings.TrimSuffix(d, ".keyword") + + value := gjson.Get(*alertString, d) + if value.Type == gjson.Null { continue } - // If we got here, connection was successful - break - } - // Serve with error handling - if err := grpcServer.Serve(listener); err != nil { - _ = catcher.Error("cannot serve grpc", err, nil) - // Instead of exiting, restart the main function - time.Sleep(5 * time.Second) - go main() - return - } -} + // Calculate OpenSearch field name by removing array indices + searchField := reArrayIndex.ReplaceAllStringFunc(d, func(s string) string { + if strings.HasSuffix(s, ".") { + return "." + } + return "" + }) -func (p *correlationServer) Correlate(_ context.Context, - alert *plugins.Alert) (*emptypb.Empty, error) { - // Recover from panics to ensure the method doesn't terminate - defer func() { - if r := recover(); r != nil { - _ = catcher.Error("recovered from panic in Correlate method", nil, map[string]any{ - "panic": r, - "alert": alert.Name, - }) + if value.Type == gjson.String { + bb.FilterTerm(fmt.Sprintf("%s.keyword", searchField), value.String()) + } else if value.Type == gjson.Number { + bb.FilterTerm(searchField, value.Float()) + } else if value.IsBool() { + bb.FilterTerm(searchField, value.Bool()) } - }() + } - parentId := getPreviousAlertId(alert) + // Create QueryBuilder and inject the Bool query + qb := sdkos.NewQueryBuilder(ctx, indices, "plugin_com.utmstack.alerts") + qb.Size(1) + qb.From(0) + qb.IncludeSource("id") + + qb.Filter(bb.Build()) + + ctxTimeout, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + searchRequest := qb.Build() + + // Ensure latest data is visible + _ = sdkos.RefreshIndex(ctxTimeout, indices[0]) - return nil, newAlert(alert, parentId) + hits, err := searchRequest.WideSearchIn(ctxTimeout, indices) + + if err == nil && hits.Hits.Total.Value != 0 { + return true + } + + return false } func getPreviousAlertId(alert *plugins.Alert) *string { @@ -158,40 +189,45 @@ func getPreviousAlertId(alert *plugins.Alert) *string { defer func() { if r := recover(); r != nil { _ = catcher.Error("recovered from panic in getPreviousAlertId", nil, map[string]any{ - "panic": r, - "alert": alert.Name, + "panic": r, + "alert": alert.Name, + "process": "plugin_com.utmstack.alerts", }) } }() - if len(alert.DeduplicateBy) == 0 { + searchFields := alert.GroupBy + if len(searchFields) == 0 { + searchFields = alert.DeduplicateBy + } + + if len(searchFields) == 0 { return nil } - alertString, err := utils.ToString(alert) + alertString, err := utils.ProtoMessageToString(alert) if err != nil { - _ = catcher.Error("cannot convert alert to string", err, map[string]any{"alert": alert.Name}) + _ = catcher.Error("cannot convert alert to string", err, map[string]any{"alert": alert.Name, "process": "plugin_com.utmstack.alerts"}) return nil } - var filters []opensearch.Query - var mustNot []opensearch.Query + ctx := context.Background() + indices := []string{sdkos.BuildIndexPattern("v11", "alert")} - filters = append(filters, opensearch.Query{ - Term: map[string]map[string]interface{}{ - "name.keyword": { - "value": alert.Name, - }, - }, - }) + // Create BoolBuilder + bb := sdkos.NewBoolBuilder(ctx, indices, "plugin_com.utmstack.alerts") - mustNot = append(mustNot, opensearch.Query{ - Exists: map[string]string{ - "field": "parentId", - }, - }) + // 1. Filter by Name (always) + bb.FilterTerm("name.keyword", alert.Name) - for _, d := range alert.DeduplicateBy { + // 2. Must NOT match existing ParentId (we want strictly the parent, or another orphan, not a child) + // Original logic: MustNot exists field "parentId" + bb.MustNotExists("parentId") + + // Compile regex for array index stripping + reArrayIndex := regexp.MustCompile(`\.[0-9]+(\.|$)`) + + for _, d := range searchFields { d = strings.TrimSuffix(d, ".keyword") value := gjson.Get(*alertString, d) @@ -199,65 +235,53 @@ func getPreviousAlertId(alert *plugins.Alert) *string { continue } - if value.Type == gjson.String { - filters = append(filters, opensearch.Query{ - Term: map[string]map[string]interface{}{ - fmt.Sprintf("%s.keyword", d): { - "value": value.String(), - }, - }, - }) - } - - if value.Type == gjson.Number { - filters = append(filters, opensearch.Query{ - Term: map[string]map[string]interface{}{ - d: { - "value": value.Float(), - }, - }, - }) - } + // Calculate OpenSearch field name by removing array indices + searchField := reArrayIndex.ReplaceAllStringFunc(d, func(s string) string { + if strings.HasSuffix(s, ".") { + return "." + } + return "" + }) - if value.IsBool() { - filters = append(filters, opensearch.Query{ - Term: map[string]map[string]interface{}{ - d: { - "value": value.Bool(), - }, - }, - }) + if value.Type == gjson.String { + bb.FilterTerm(fmt.Sprintf("%s.keyword", searchField), value.String()) + } else if value.Type == gjson.Number { + bb.FilterTerm(searchField, value.Float()) + } else if value.IsBool() { + bb.FilterTerm(searchField, value.Bool()) } } - searchQuery := opensearch.SearchRequest{ - Size: 1, - From: 0, - Version: true, - Query: &opensearch.Query{ - Bool: &opensearch.Bool{ - Filter: filters, - MustNot: mustNot, - }, - }, - StoredFields: []string{"*"}, - Source: &opensearch.Source{Excludes: []string{}}, - } + // Create QueryBuilder and inject the Bool query + qb := sdkos.NewQueryBuilder(ctx, indices, "plugin_com.utmstack.alerts") + qb.Size(1) + qb.From(0) + qb.Version(true) + qb.IncludeSource("*") // Previously StoredFields("*") + + // We use Filter(...) method of QueryBuilder which takes varargs of Query. + // bb.Build() returns a Query struct that wraps the Bool query. + // Since we built a full Bool query with Filter/MustNot clauses inside bb, + // we just need to add this whole Bool query to the QueryBuilder. + // qb wraps everything in its own top-level Bool query. + // So we can add our 'bb' as a Must or Filter clause of the top-level query. + // Since 'bb' contains the logic "Match THIS AND THAT AND NOT THIS", it should be a Must/Filter clause. + qb.Filter(bb.Build()) // Retry logic for search operation maxRetries := 3 retryDelay := 2 * time.Second for retry := 0; retry < maxRetries; retry++ { - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) - defer cancel() + ctxTimeout, cancel := context.WithTimeout(context.Background(), 10*time.Second) + + searchRequest := qb.Build() + hits, err := searchRequest.WideSearchIn(ctxTimeout, indices) + cancel() - hits, err := searchQuery.SearchIn(ctx, []string{opensearch.BuildIndexPattern("v11", "alert")}) if err == nil { if hits.Hits.Total.Value != 0 { - go updateParentAlertToOpen(hits.Hits.Hits[0]) - return utils.PointerOf(hits.Hits.Hits[0].ID) } return nil @@ -267,18 +291,19 @@ func getPreviousAlertId(alert *plugins.Alert) *string { "alert": alert.Name, "retry": retry + 1, "maxRetries": maxRetries, + "process": "plugin_com.utmstack.alerts", }) if retry < maxRetries-1 { time.Sleep(retryDelay) - // Increase delay for next retry retryDelay *= 2 } } // If we get here, all retries failed _ = catcher.Error("all retries failed when searching for previous alerts", nil, map[string]any{ - "alert": alert.Name, + "alert": alert.Name, + "process": "plugin_com.utmstack.alerts", }) return nil } @@ -288,8 +313,9 @@ func newAlert(alert *plugins.Alert, parentId *string) error { defer func() { if r := recover(); r != nil { _ = catcher.Error("recovered from panic in newAlert", nil, map[string]any{ - "panic": r, - "alert": alert.Name, + "panic": r, + "alert": alert.Name, + "process": "plugin_com.utmstack.alerts", }) } }() @@ -339,6 +365,7 @@ func newAlert(alert *plugins.Alert, parentId *string) error { Impact: alert.Impact, ImpactScore: alert.ImpactScore, DeduplicatedBy: alert.DeduplicateBy, + GroupedBy: alert.GroupBy, } // Retry logic for indexing operation @@ -348,7 +375,7 @@ func newAlert(alert *plugins.Alert, parentId *string) error { for retry := 0; retry < maxRetries; retry++ { cancelableContext, cancel := context.WithTimeout(context.Background(), 10*time.Second) - err := opensearch.IndexDoc(cancelableContext, a, opensearch.BuildCurrentIndex("v11", "alert"), alert.Id) + err := sdkos.IndexDoc(cancelableContext, a, sdkos.BuildCurrentIndex("v11", "alert"), alert.Id) if err == nil { cancel() return nil @@ -359,6 +386,7 @@ func newAlert(alert *plugins.Alert, parentId *string) error { "alert": alert.Name, "retry": retry + 1, "maxRetries": maxRetries, + "process": "plugin_com.utmstack.alerts", }) if retry < maxRetries-1 { @@ -368,7 +396,8 @@ func newAlert(alert *plugins.Alert, parentId *string) error { } else { // If all retries failed, return the error return catcher.Error("all retries failed when indexing document", err, map[string]any{ - "alert": alert.Name, + "alert": alert.Name, + "process": "plugin_com.utmstack.alerts", }) } } @@ -377,12 +406,13 @@ func newAlert(alert *plugins.Alert, parentId *string) error { return nil } -func updateParentAlertToOpen(parentHit opensearch.Hit) { +func updateParentAlertToOpen(parentHit sdkos.Hit) { defer func() { if r := recover(); r != nil { _ = catcher.Error("recovered from panic in updateParentAlertToOpen", nil, map[string]any{ "panic": r, "parentId": parentHit.ID, + "process": "plugin_com.utmstack.alerts", }) } }() @@ -392,6 +422,7 @@ func updateParentAlertToOpen(parentHit opensearch.Hit) { if err != nil { _ = catcher.Error("cannot parse parent alert source", err, map[string]any{ "parentId": parentHit.ID, + "process": "plugin_com.utmstack.alerts", }) return } @@ -405,6 +436,7 @@ func updateParentAlertToOpen(parentHit opensearch.Hit) { if err != nil { _ = catcher.Error("cannot set updated parent alert source", err, map[string]any{ "parentId": parentHit.ID, + "process": "plugin_com.utmstack.alerts", }) return } @@ -423,6 +455,7 @@ func updateParentAlertToOpen(parentHit opensearch.Hit) { "parentId": parentHit.ID, "retry": retry + 1, "maxRetries": maxRetries, + "process": "alerts-plugin", }) if retry < maxRetries-1 { @@ -437,6 +470,7 @@ func updateParentAlertToOpen(parentHit opensearch.Hit) { _ = catcher.Error("all retries failed when updating parent alert to Open", nil, map[string]any{ "parentId": parentHit.ID, + "process": "alerts-plugin", }) } } diff --git a/plugins/aws/config/config.go b/plugins/aws/config/config.go index b1aadf066..3c314d88c 100644 --- a/plugins/aws/config/config.go +++ b/plugins/aws/config/config.go @@ -43,7 +43,7 @@ func StartConfigurationSystem() { for { pluginConfig := plugins.PluginCfg("com.utmstack", false) if !pluginConfig.Exists() { - _ = catcher.Error("plugin configuration not found", nil, nil) + _ = catcher.Error("plugin configuration not found", nil, map[string]any{"process": "plugin_com.utmstack.aws"}) time.Sleep(reconnectDelay) continue } @@ -69,7 +69,7 @@ func StartConfigurationSystem() { ) if err != nil { - catcher.Error("Failed to connect to server", err, nil) + catcher.Error("Failed to connect to server", err, map[string]any{"process": "plugin_com.utmstack.aws"}) cancel() time.Sleep(reconnectDelay) continue @@ -77,7 +77,7 @@ func StartConfigurationSystem() { state := conn.GetState() if state == connectivity.Shutdown || state == connectivity.TransientFailure { - catcher.Error("Connection is in shutdown or transient failure state", nil, nil) + catcher.Error("Connection is in shutdown or transient failure state", nil, map[string]any{"process": "plugin_com.utmstack.aws"}) cancel() time.Sleep(reconnectDelay) continue @@ -86,7 +86,7 @@ func StartConfigurationSystem() { client := NewConfigServiceClient(conn) stream, err := client.StreamConfig(ctx) if err != nil { - catcher.Error("Failed to create stream", err, nil) + catcher.Error("Failed to create stream", err, map[string]any{"process": "plugin_com.utmstack.aws"}) conn.Close() cancel() time.Sleep(reconnectDelay) @@ -99,7 +99,7 @@ func StartConfigurationSystem() { }, }) if err != nil { - catcher.Error("Failed to send PluginInit", err, nil) + catcher.Error("Failed to send PluginInit", err, map[string]any{"process": "plugin_com.utmstack.aws"}) conn.Close() cancel() time.Sleep(reconnectDelay) @@ -110,7 +110,7 @@ func StartConfigurationSystem() { in, err := stream.Recv() if err != nil { if strings.Contains(err.Error(), "EOF") { - catcher.Info("Stream closed by server, reconnecting...", nil) + catcher.Info("Stream closed by server, reconnecting...", map[string]any{"process": "plugin_com.utmstack.aws"}) conn.Close() cancel() time.Sleep(reconnectDelay) @@ -118,13 +118,13 @@ func StartConfigurationSystem() { } st, ok := status.FromError(err) if ok && (st.Code() == codes.Unavailable || st.Code() == codes.Canceled) { - catcher.Error("Stream error: "+st.Message(), err, nil) + catcher.Error("Stream error: "+st.Message(), err, map[string]any{"process": "plugin_com.utmstack.aws"}) conn.Close() cancel() time.Sleep(reconnectDelay) break } else { - catcher.Error("Stream receive error", err, nil) + catcher.Error("Stream receive error", err, map[string]any{"process": "plugin_com.utmstack.aws"}) time.Sleep(reconnectDelay) continue } @@ -135,6 +135,7 @@ func StartConfigurationSystem() { catcher.Info("Received configuration update", map[string]any{ "moduleActive": message.Config.ModuleActive, "groupCount": len(message.Config.ModuleGroups), + "process": "plugin_com.utmstack.aws", }) cnf = message.Config } diff --git a/plugins/aws/go.mod b/plugins/aws/go.mod index 36c9b4c5a..da024f4ab 100644 --- a/plugins/aws/go.mod +++ b/plugins/aws/go.mod @@ -1,46 +1,54 @@ module github.com/utmstack/UTMStack/plugins/aws -go 1.24.2 +go 1.25.5 require ( - github.com/aws/aws-sdk-go-v2 v1.36.4 - github.com/aws/aws-sdk-go-v2/config v1.29.16 - github.com/aws/aws-sdk-go-v2/credentials v1.17.69 + github.com/aws/aws-sdk-go-v2 v1.41.1 + github.com/aws/aws-sdk-go-v2/config v1.32.7 + github.com/aws/aws-sdk-go-v2/credentials v1.19.7 github.com/google/uuid v1.6.0 - github.com/threatwinds/go-sdk v1.0.43 + github.com/threatwinds/go-sdk v1.1.7 ) -require go.yaml.in/yaml/v2 v2.4.2 // indirect +require ( + github.com/aws/aws-sdk-go-v2/service/signin v1.0.5 // indirect + github.com/bytedance/gopkg v0.1.3 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect + github.com/opensearch-project/opensearch-go/v4 v4.6.0 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect +) require ( - cel.dev/expr v0.24.0 // indirect + cel.dev/expr v0.25.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.31 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.35 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.35 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect - github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.50.2 - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.16 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.25.4 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.33.21 // indirect - github.com/aws/smithy-go v1.22.3 // indirect - github.com/bytedance/sonic v1.14.0 // indirect - github.com/bytedance/sonic/loader v0.3.0 // indirect - github.com/cloudwego/base64x v0.1.5 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.4 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.17 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.17 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.17 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 // indirect + github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.63.1 + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.17 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.30.9 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.13 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.41.6 // indirect + github.com/aws/smithy-go v1.24.0 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect github.com/gin-contrib/sse v1.1.0 // indirect - github.com/gin-gonic/gin v1.10.1 // indirect + github.com/gin-gonic/gin v1.11.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.27.0 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect github.com/goccy/go-json v0.10.5 // indirect - github.com/google/cel-go v0.26.0 // indirect + github.com/google/cel-go v0.26.1 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect - github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -48,20 +56,20 @@ require ( github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/stoewer/go-strcase v1.3.1 // indirect github.com/tidwall/gjson v1.18.0 // indirect - github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.3.0 // indirect - golang.org/x/arch v0.19.0 // indirect - golang.org/x/crypto v0.40.0 // indirect - golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 // indirect - golang.org/x/net v0.42.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/text v0.27.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/grpc v1.74.2 - google.golang.org/protobuf v1.36.6 + github.com/ugorji/go/codec v1.3.1 // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/grpc v1.78.0 + google.golang.org/protobuf v1.36.11 gopkg.in/yaml.v3 v3.0.1 // indirect - sigs.k8s.io/yaml v1.5.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/plugins/aws/go.sum b/plugins/aws/go.sum index 36c71a761..3c68a8e3b 100644 --- a/plugins/aws/go.sum +++ b/plugins/aws/go.sum @@ -1,55 +1,57 @@ -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/aws/aws-sdk-go-v2 v1.36.4 h1:GySzjhVvx0ERP6eyfAbAuAXLtAda5TEy19E5q5W8I9E= -github.com/aws/aws-sdk-go-v2 v1.36.4/go.mod h1:LLXuLpgzEbD766Z5ECcRmi8AzSwfZItDtmABVkRLGzg= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 h1:zAybnyUQXIZ5mok5Jqwlf58/TFE7uvd3IAsa1aF9cXs= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10/go.mod h1:qqvMj6gHLR/EXWZw4ZbqlPbQUyenf4h82UQUlKc+l14= -github.com/aws/aws-sdk-go-v2/config v1.29.16 h1:XkruGnXX1nEZ+Nyo9v84TzsX+nj86icbFAeust6uo8A= -github.com/aws/aws-sdk-go-v2/config v1.29.16/go.mod h1:uCW7PNjGwZ5cOGZ5jr8vCWrYkGIhPoTNV23Q/tpHKzg= -github.com/aws/aws-sdk-go-v2/credentials v1.17.69 h1:8B8ZQboRc3uaIKjshve/XlvJ570R7BKNy3gftSbS178= -github.com/aws/aws-sdk-go-v2/credentials v1.17.69/go.mod h1:gPME6I8grR1jCqBFEGthULiolzf/Sexq/Wy42ibKK9c= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.31 h1:oQWSGexYasNpYp4epLGZxxjsDo8BMBh6iNWkTXQvkwk= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.31/go.mod h1:nc332eGUU+djP3vrMI6blS0woaCfHTe3KiSQUVTMRq0= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.35 h1:o1v1VFfPcDVlK3ll1L5xHsaQAFdNtZ5GXnNR7SwueC4= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.35/go.mod h1:rZUQNYMNG+8uZxz9FOerQJ+FceCiodXvixpeRtdESrU= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.35 h1:R5b82ubO2NntENm3SAm0ADME+H630HomNJdgv+yZ3xw= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.35/go.mod h1:FuA+nmgMRfkzVKYDNEqQadvEMxtxl9+RLT9ribCwEMs= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= -github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.50.2 h1:3/bbtfzzGkbhzMUBCwX4BcfBx7YDDjENC2sZvIySKa0= -github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.50.2/go.mod h1:Wd99awP91azT7t59fylEjtBYazJvNAneRveTthS7g/0= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 h1:eAh2A4b5IzM/lum78bZ590jy36+d/aFLgKF/4Vd1xPE= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3/go.mod h1:0yKJC/kb8sAnmlYa6Zs3QVYqaC8ug2AbnNChv5Ox3uA= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.16 h1:/ldKrPPXTC421bTNWrUIpq3CxwHwRI/kpc+jPUTJocM= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.16/go.mod h1:5vkf/Ws0/wgIMJDQbjI4p2op86hNW6Hie5QtebrDgT8= -github.com/aws/aws-sdk-go-v2/service/sso v1.25.4 h1:EU58LP8ozQDVroOEyAfcq0cGc5R/FTZjVoYJ6tvby3w= -github.com/aws/aws-sdk-go-v2/service/sso v1.25.4/go.mod h1:CrtOgCcysxMvrCoHnvNAD7PHWclmoFG78Q2xLK0KKcs= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.2 h1:XB4z0hbQtpmBnb1FQYvKaCM7UsS6Y/u8jVBwIUGeCTk= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.2/go.mod h1:hwRpqkRxnQ58J9blRDrB4IanlXCpcKmsC83EhG77upg= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.21 h1:nyLjs8sYJShFYj6aiyjCBI3EcLn1udWrQTjEF+SOXB0= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.21/go.mod h1:EhdxtZ+g84MSGrSrHzZiUm9PYiZkrADNja15wtRJSJo= -github.com/aws/smithy-go v1.22.3 h1:Z//5NuZCSW6R4PhQ93hShNbyBbn8BWCmCVCt+Q8Io5k= -github.com/aws/smithy-go v1.22.3/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= -github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= -github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= -github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/aws/aws-sdk-go-v2 v1.41.1 h1:ABlyEARCDLN034NhxlRUSZr4l71mh+T5KAeGh6cerhU= +github.com/aws/aws-sdk-go-v2 v1.41.1/go.mod h1:MayyLB8y+buD9hZqkCW3kX1AKq07Y5pXxtgB+rRFhz0= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.4 h1:489krEF9xIGkOaaX3CE/Be2uWjiXrkCH6gUX+bZA/BU= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.4/go.mod h1:IOAPF6oT9KCsceNTvvYMNHy0+kMF8akOjeDvPENWxp4= +github.com/aws/aws-sdk-go-v2/config v1.32.7 h1:vxUyWGUwmkQ2g19n7JY/9YL8MfAIl7bTesIUykECXmY= +github.com/aws/aws-sdk-go-v2/config v1.32.7/go.mod h1:2/Qm5vKUU/r7Y+zUk/Ptt2MDAEKAfUtKc1+3U1Mo3oY= +github.com/aws/aws-sdk-go-v2/credentials v1.19.7 h1:tHK47VqqtJxOymRrNtUXN5SP/zUTvZKeLx4tH6PGQc8= +github.com/aws/aws-sdk-go-v2/credentials v1.19.7/go.mod h1:qOZk8sPDrxhf+4Wf4oT2urYJrYt3RejHSzgAquYeppw= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.17 h1:I0GyV8wiYrP8XpA70g1HBcQO1JlQxCMTW9npl5UbDHY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.17/go.mod h1:tyw7BOl5bBe/oqvoIeECFJjMdzXoa/dfVz3QQ5lgHGA= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.17 h1:xOLELNKGp2vsiteLsvLPwxC+mYmO6OZ8PYgiuPJzF8U= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.17/go.mod h1:5M5CI3D12dNOtH3/mk6minaRwI2/37ifCURZISxA/IQ= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.17 h1:WWLqlh79iO48yLkj1v3ISRNiv+3KdQoZ6JWyfcsyQik= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.17/go.mod h1:EhG22vHRrvF8oXSTYStZhJc1aUgKtnJe+aOiFEV90cM= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 h1:WKuaxf++XKWlHWu9ECbMlha8WOEGm0OUEZqm4K/Gcfk= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4/go.mod h1:ZWy7j6v1vWGmPReu0iSGvRiise4YI5SkR3OHKTZ6Wuc= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.63.1 h1:l65dmgr7tO26EcHe6WMdseRnFLoJ2nqdkPz1nJdXfaw= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.63.1/go.mod h1:wvnXh1w1pGS2UpEvPTKSjXYuxiXhuvob/IMaK2AWvek= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.4 h1:0ryTNEdJbzUCEWkVXEXoqlXV72J5keC1GvILMOuD00E= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.4/go.mod h1:HQ4qwNZh32C3CBeO6iJLQlgtMzqeG17ziAA/3KDJFow= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.17 h1:RuNSMoozM8oXlgLG/n6WLaFGoea7/CddrCfIiSA+xdY= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.17/go.mod h1:F2xxQ9TZz5gDWsclCtPQscGpP0VUOc8RqgFM3vDENmU= +github.com/aws/aws-sdk-go-v2/service/signin v1.0.5 h1:VrhDvQib/i0lxvr3zqlUwLwJP4fpmpyD9wYG1vfSu+Y= +github.com/aws/aws-sdk-go-v2/service/signin v1.0.5/go.mod h1:k029+U8SY30/3/ras4G/Fnv/b88N4mAfliNn08Dem4M= +github.com/aws/aws-sdk-go-v2/service/sso v1.30.9 h1:v6EiMvhEYBoHABfbGB4alOYmCIrcgyPPiBE1wZAEbqk= +github.com/aws/aws-sdk-go-v2/service/sso v1.30.9/go.mod h1:yifAsgBxgJWn3ggx70A3urX2AN49Y5sJTD1UQFlfqBw= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.13 h1:gd84Omyu9JLriJVCbGApcLzVR3XtmC4ZDPcAI6Ftvds= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.13/go.mod h1:sTGThjphYE4Ohw8vJiRStAcu3rbjtXRsdNB0TvZ5wwo= +github.com/aws/aws-sdk-go-v2/service/sts v1.41.6 h1:5fFjR/ToSOzB2OQ/XqWpZBmNvmP/pJ1jOWYlFDJTjRQ= +github.com/aws/aws-sdk-go-v2/service/sts v1.41.6/go.mod h1:qgFDZQSD/Kys7nJnVqYlWKnh0SSdMjAi0uSwON4wgYQ= +github.com/aws/smithy-go v1.24.0 h1:LpilSUItNPFr1eY85RYgTIg5eIEPtvFbskaFcmmIUnk= +github.com/aws/smithy-go v1.24.0/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0= +github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= +github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= -github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= -github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -60,25 +62,27 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= -github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -92,80 +96,97 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc= +github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/threatwinds/go-sdk v1.0.43 h1:q2Pl0DvmFpeBCs5sZRcsG1oDn2zIoIB5vHwcJ/VDgD8= -github.com/threatwinds/go-sdk v1.0.43/go.mod h1:S0R7kQj2BsTgaYnX6eZ3keEFRy9yt4f9SCEKYMJzD6g= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo= +github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= +github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= -github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= -go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= -go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= -go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= -go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= -go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= -go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= -go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= -golang.org/x/arch v0.19.0 h1:LmbDQUodHThXE+htjrnmVD73M//D9GTH6wFZjyDkjyU= -golang.org/x/arch v0.19.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 h1:R9PFI6EUdfVKgwKjZef7QIwGcBKu86OEFpJ9nUEP2l4= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ= +github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 h1:mVXdvnmR3S3BQOqHECm9NGMjYiRtEvDYcqAqedTXY6s= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 h1:qJW29YvkiJmXOYMu5Tf8lyrTp3dOS+K4z6IixtLaCf8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ= -sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/plugins/aws/main.go b/plugins/aws/main.go index dcf5e9921..25e534ed4 100644 --- a/plugins/aws/main.go +++ b/plugins/aws/main.go @@ -38,7 +38,7 @@ var ( ) func main() { - mode := plugins.GetCfg().Env.Mode + mode := plugins.GetCfg("plugin_com.utmstack.aws").Env.Mode if mode != "manager" { return } @@ -47,13 +47,13 @@ func main() { for t := 0; t < 2*runtime.NumCPU(); t++ { go func() { - plugins.SendLogsFromChannel() + plugins.SendLogsFromChannel("com.utmstack.aws") }() } for { if err := connectionChecker(urlCheckConnection); err != nil { - _ = catcher.Error("External connection failure detected: %v", err, nil) + _ = catcher.Error("failed to connect with external service", err, map[string]any{"process": "plugin_com.utmstack.aws"}) continue } break @@ -86,7 +86,8 @@ func watchConfigChanges() { startGroupStream(groupID, group) } else if existing.config != currentConfig { catcher.Info("Configuration changed for group, restarting", map[string]any{ - "group": group.GroupName, + "group": group.GroupName, + "process": "plugin_com.utmstack.aws", }) existing.cancel() delete(activeStreams, groupID) @@ -98,6 +99,7 @@ func watchConfigChanges() { if !currentGroupIDs[groupID] { catcher.Info("Group removed, stopping stream", map[string]any{ "groupId": groupID, + "process": "plugin_com.utmstack.aws", }) stream.cancel() delete(activeStreams, groupID) @@ -117,7 +119,8 @@ func startGroupStream(groupID int32, group *config.ModuleGroup) { } catcher.Info("Starting stream for group", map[string]any{ - "group": group.GroupName, + "group": group.GroupName, + "process": "plugin_com.utmstack.aws", }) go streamLogs(ctx, group) @@ -129,7 +132,8 @@ func stopAllStreams() { } catcher.Info("Stopping all active streams", map[string]any{ - "count": len(activeStreams), + "count": len(activeStreams), + "process": "plugin_com.utmstack.aws", }) for groupID, stream := range activeStreams { @@ -152,7 +156,7 @@ func streamLogs(ctx context.Context, group *config.ModuleGroup) { awsConfig, err := agent.createAWSSession() if err != nil { - _ = catcher.Error("cannot create AWS session", err, nil) + _ = catcher.Error("cannot create AWS session", err, map[string]any{"process": "plugin_com.utmstack.aws"}) return } @@ -164,6 +168,7 @@ func streamLogs(ctx context.Context, group *config.ModuleGroup) { "group": group.GroupName, "logGroup": agent.LogGroup, "startTime": startTime.Format(time.RFC3339), + "process": "plugin_com.utmstack.aws", }) currentStreams := make(map[string]context.CancelFunc) @@ -178,6 +183,7 @@ func streamLogs(ctx context.Context, group *config.ModuleGroup) { if err != nil { _ = catcher.Error("cannot get log streams", err, map[string]any{ "logGroup": agent.LogGroup, + "process": "plugin_com.utmstack.aws", }) if !sleepWithCancel(ctx, 30*time.Second) { return @@ -206,6 +212,7 @@ func streamLogs(ctx context.Context, group *config.ModuleGroup) { catcher.Info("Log stream expired, stopping", map[string]any{ "logGroup": agent.LogGroup, "logStream": streamName, + "process": "plugin_com.utmstack.aws", }) cancel() delete(currentStreams, streamName) @@ -214,7 +221,8 @@ func streamLogs(ctx context.Context, group *config.ModuleGroup) { if !sleepWithCancel(ctx, 5*time.Minute) { catcher.Info("Stream cancelled for group", map[string]any{ - "group": group.GroupName, + "group": group.GroupName, + "process": "plugin_com.utmstack.aws", }) return } @@ -248,7 +256,7 @@ func getAWSProcessor(group *config.ModuleGroup) AWSProcessor { func (p *AWSProcessor) createAWSSession() (aws.Config, error) { if p.RegionName == "" { return aws.Config{}, catcher.Error("cannot create AWS session", - errors.New("region name is empty"), nil) + errors.New("region name is empty"), map[string]any{"process": "plugin_com.utmstack.aws"}) } ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute) @@ -271,7 +279,7 @@ func (p *AWSProcessor) createAWSSession() (aws.Config, error) { }), ) if err != nil { - return aws.Config{}, catcher.Error("cannot create AWS session", err, nil) + return aws.Config{}, catcher.Error("cannot create AWS session", err, map[string]any{"process": "plugin_com.utmstack.aws"}) } return cfg, nil @@ -291,7 +299,7 @@ func describeLogStreams(ctx context.Context, cwl *cloudwatchlogs.Client, logGrou page, err := paginator.NextPage(requestCtx) if err != nil { cancel() - return nil, catcher.Error("cannot get log streams", err, nil) + return nil, catcher.Error("cannot get log streams", err, map[string]any{"process": "plugin_com.utmstack.aws"}) } for _, stream := range page.LogStreams { logStreams = append(logStreams, *stream.LogStreamName) @@ -313,6 +321,7 @@ func streamLogStream(ctx context.Context, cwl *cloudwatchlogs.Client, logGroup, catcher.Info("Log stream cancelled", map[string]any{ "stream": streamName, "totalCount": processedCount, + "process": "plugin_com.utmstack.aws", }) return default: @@ -335,6 +344,7 @@ func streamLogStream(ctx context.Context, cwl *cloudwatchlogs.Client, logGroup, _ = catcher.Error("cannot get log events", err, map[string]any{ "logGroup": logGroup, "stream": streamName, + "process": "plugin_com.utmstack.aws", }) if !sleepWithCancel(ctx, 10*time.Second) { return @@ -351,7 +361,7 @@ func streamLogStream(ctx context.Context, cwl *cloudwatchlogs.Client, logGroup, DataSource: dataSource, Timestamp: time.Now().UTC().Format(time.RFC3339Nano), Raw: *event.Message, - }) + }, "com.utmstack.aws") processedCount++ eventsInBatch++ } @@ -362,6 +372,7 @@ func streamLogStream(ctx context.Context, cwl *cloudwatchlogs.Client, logGroup, "batchCount": eventsInBatch, "totalCount": processedCount, "dataSource": dataSource, + "process": "plugin_com.utmstack.aws", }) } @@ -407,7 +418,7 @@ func checkConnection(url string) error { defer func() { err := resp.Body.Close() if err != nil { - _ = catcher.Error("error closing response body: %v", err, nil) + _ = catcher.Error("error closing response body: %v", err, map[string]any{"process": "plugin_com.utmstack.aws"}) } }() @@ -421,7 +432,7 @@ func infiniteRetryIfXError(f func() error, exception string) error { err := f() if err != nil && is(err, exception) { if !xErrorWasLogged { - _ = catcher.Error("An error occurred (%s), will keep retrying indefinitely...", err, nil) + _ = catcher.Error("An error occurred (%s), will keep retrying indefinitely...", err, map[string]any{"process": "aws-plugin"}) xErrorWasLogged = true } time.Sleep(wait) diff --git a/plugins/azure/config/config.go b/plugins/azure/config/config.go index 810020a59..220103675 100644 --- a/plugins/azure/config/config.go +++ b/plugins/azure/config/config.go @@ -43,7 +43,7 @@ func StartConfigurationSystem() { for { pluginConfig := plugins.PluginCfg("com.utmstack", false) if !pluginConfig.Exists() { - _ = catcher.Error("plugin configuration not found", nil, nil) + _ = catcher.Error("plugin configuration not found", nil, map[string]any{"process": "plugin_com.utmstack.azure"}) time.Sleep(reconnectDelay) continue } @@ -77,7 +77,7 @@ func StartConfigurationSystem() { state := conn.GetState() if state == connectivity.Shutdown || state == connectivity.TransientFailure { - catcher.Error("Connection is in shutdown or transient failure state", nil, nil) + _ = catcher.Error("Connection is in shutdown or transient failure state", nil, map[string]any{"process": "plugin_com.utmstack.azure"}) cancel() time.Sleep(reconnectDelay) continue @@ -86,8 +86,8 @@ func StartConfigurationSystem() { client := NewConfigServiceClient(conn) stream, err := client.StreamConfig(ctx) if err != nil { - catcher.Error("Failed to create stream", err, nil) - conn.Close() + _ = catcher.Error("Failed to create stream", err, map[string]any{"process": "plugin_com.utmstack.azure"}) + _ = conn.Close() cancel() time.Sleep(reconnectDelay) continue @@ -99,8 +99,8 @@ func StartConfigurationSystem() { }, }) if err != nil { - catcher.Error("Failed to send PluginInit", err, nil) - conn.Close() + _ = catcher.Error("Failed to send PluginInit", err, map[string]any{"process": "plugin_com.utmstack.azure"}) + _ = conn.Close() cancel() time.Sleep(reconnectDelay) continue @@ -110,21 +110,21 @@ func StartConfigurationSystem() { in, err := stream.Recv() if err != nil { if strings.Contains(err.Error(), "EOF") { - catcher.Info("Stream closed by server, reconnecting...", nil) - conn.Close() + catcher.Info("Stream closed by server, reconnecting...", map[string]any{"process": "plugin_com.utmstack.azure"}) + _ = conn.Close() cancel() time.Sleep(reconnectDelay) break } st, ok := status.FromError(err) if ok && (st.Code() == codes.Unavailable || st.Code() == codes.Canceled) { - catcher.Error("Stream error: "+st.Message(), err, nil) - conn.Close() + _ = catcher.Error("Stream error: "+st.Message(), err, map[string]any{"process": "plugin_com.utmstack.azure"}) + _ = conn.Close() cancel() time.Sleep(reconnectDelay) break } else { - catcher.Error("Stream receive error", err, nil) + _ = catcher.Error("Stream receive error", err, map[string]any{"process": "plugin_com.utmstack.azure"}) time.Sleep(reconnectDelay) continue } @@ -132,7 +132,7 @@ func StartConfigurationSystem() { switch message := in.Payload.(type) { case *BiDirectionalMessage_Config: - catcher.Info("Received configuration update", map[string]any{"config": message.Config}) + catcher.Info("Received configuration update", map[string]any{"config": message.Config, "process": "plugin_com.utmstack.azure"}) cnf = message.Config } } diff --git a/plugins/azure/go.mod b/plugins/azure/go.mod index fd2076c6c..7124fc8bb 100644 --- a/plugins/azure/go.mod +++ b/plugins/azure/go.mod @@ -1,56 +1,61 @@ module github.com/utmstack/UTMStack/plugins/azure -go 1.24.2 +go 1.25.5 require ( - github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/v2 v2.0.0 - github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.1 + github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/v2 v2.0.1 + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.4 github.com/google/uuid v1.6.0 - github.com/threatwinds/go-sdk v1.0.43 - github.com/utmstack/config-client-go v1.2.7 + github.com/threatwinds/go-sdk v1.1.7 + google.golang.org/grpc v1.78.0 + google.golang.org/protobuf v1.36.11 ) require ( - cel.dev/expr v0.24.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect - github.com/Azure/go-amqp v1.4.0 // indirect + cel.dev/expr v0.25.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect + github.com/Azure/go-amqp v1.5.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/bytedance/sonic v1.14.0 // indirect - github.com/bytedance/sonic/loader v0.3.0 // indirect - github.com/cloudwego/base64x v0.1.5 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/bytedance/gopkg v0.1.3 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect github.com/gin-contrib/sse v1.1.0 // indirect - github.com/gin-gonic/gin v1.10.1 // indirect + github.com/gin-gonic/gin v1.11.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.27.0 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect github.com/goccy/go-json v0.10.5 // indirect - github.com/google/cel-go v0.26.0 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect + github.com/google/cel-go v0.26.1 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/opensearch-project/opensearch-go/v4 v4.6.0 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect github.com/stoewer/go-strcase v1.3.1 // indirect github.com/tidwall/gjson v1.18.0 // indirect - github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.3.0 // indirect - go.yaml.in/yaml/v2 v2.4.2 // indirect - golang.org/x/arch v0.19.0 // indirect - golang.org/x/crypto v0.40.0 // indirect - golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 // indirect - golang.org/x/net v0.42.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/text v0.27.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/grpc v1.74.2 // indirect - google.golang.org/protobuf v1.36.6 // indirect + github.com/ugorji/go/codec v1.3.1 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - sigs.k8s.io/yaml v1.5.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/plugins/azure/go.sum b/plugins/azure/go.sum index 1da3e365a..9a5e029bb 100644 --- a/plugins/azure/go.sum +++ b/plugins/azure/go.sum @@ -1,46 +1,47 @@ -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0 h1:Gt0j3wceWMwPmiazCa8MzMA0MfhmPIz0Qp0FJ6qcM0U= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0/go.mod h1:Ot/6aikWnKWi4l9QB7qVSwa8iMphQNqkWALMoNT3rzM= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.9.0 h1:OVoM452qUFBrX+URdH3VpR299ma4kfom0yB0URYky9g= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.9.0/go.mod h1:kUjrAo8bgEwLeZ/CmHqNl3Z/kPm7y6FKfxxK0izYUg4= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 h1:FPKJS1T+clwv+OLGt13a8UjqeRuh0O4SJ3lUriThc+4= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1/go.mod h1:j2chePtV91HrC22tGoRX3sGY42uF13WzmmV80/OdVAA= -github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/v2 v2.0.0 h1:h7gH6+/PUP+flGgkDUmIzXfsCnZXlv/g9SjlbWovQ04= -github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/v2 v2.0.0/go.mod h1:EEyRbPfkzkEmV8AJrYTZ/5of9l5aoarWGm5200n3/oY= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.0 h1:fou+2+WFTib47nS+nz/ozhEBnvU96bKHy6LjRsY4E28= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.0/go.mod h1:t76Ruy8AHvUAC8GfMWJMa0ElSbuIcO03NLpynfbgsPA= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1 h1:Hk5QBxZQC1jb2Fwj6mpzme37xbCDdNTxU7O9eb5+LB4= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1/go.mod h1:IYus9qsFobWIc2YVwe/WPjcnyCkPKtnHAqUYeebc8z0= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 h1:9iefClla7iYpfYWdzPCRDozdmndjTm8DXdpCzPajMgA= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2/go.mod h1:XtLgD3ZD34DAaVIIAyG3objl5DynM3CQ/vMcbBNJZGI= +github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/v2 v2.0.1 h1:0jZwGhuG42Gm/yv/sSxO0L6uh7JfJBflK8Eh8SAi3QE= +github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/v2 v2.0.1/go.mod h1:mWrFe78uRBS76gOOmm6+/nR0INwQeGZfhankYx6ShQA= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub v1.3.0 h1:4hGvxD72TluuFIXVr8f4XkKZfqAa7Pj61t0jmQ7+kes= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub v1.3.0/go.mod h1:TSH7DcFItwAufy0Lz+Ft2cyopExCpxbOxI5SkH4dRNo= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.0 h1:LR0kAX9ykz8G4YgLCaRDVJ3+n43R8MneB5dTy2konZo= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.0/go.mod h1:DWAciXemNf++PQJLeXUB4HHH5OpsAh12HZnu2wXE1jA= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.1 h1:lhZdRq7TIx0GJQvSyX2Si406vrYsov2FXGp/RnSEtcs= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.1/go.mod h1:8cl44BDmi+effbARHMQjgOKA2AYvcohNm7KEt42mSV8= -github.com/Azure/go-amqp v1.4.0 h1:Xj3caqi4comOF/L1Uc5iuBxR/pB6KumejC01YQOqOR4= -github.com/Azure/go-amqp v1.4.0/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE= -github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2 h1:oygO0locgZJe7PpYPXT5A29ZkwJaPqcva7BVeemZOZs= -github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.1 h1:/Zt+cDPnpC3OVDm/JKLOs7M2DKmLRIIp3XIx9pHHiig= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.1/go.mod h1:Ng3urmn6dYe8gnbCMoHHVl5APYz2txho3koEkV2o2HA= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.4 h1:jWQK1GI+LeGGUKBADtcH2rRqPxYB1Ljwms5gFA2LqrM= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.4/go.mod h1:8mwH4klAm9DUgR2EEHyEEAQlRDvLPyg5fQry3y+cDew= +github.com/Azure/go-amqp v1.5.1 h1:WyiPTz2C3zVvDL7RLAqwWdeoYhMtX62MZzQoP09fzsU= +github.com/Azure/go-amqp v1.5.1/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE= +github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 h1:XRzhVemXdgvJqCH0sFfrBUTnUJSBrBf7++ypk+twtRs= +github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0/go.mod h1:HKpQxkWaGLJ+D/5H8QRpyQXA1eKjxkFlOMwck5+33Jk= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= -github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= -github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= +github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= +github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/coder/websocket v1.8.13 h1:f3QZdXy7uGVz+4uCJy2nTZyM0yTBj8yANEHhqlXZ9FE= github.com/coder/websocket v1.8.13/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= -github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= -github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -51,31 +52,33 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= -github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8= -github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= +github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo= +github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= -github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -91,84 +94,99 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc= +github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/threatwinds/go-sdk v1.0.43 h1:q2Pl0DvmFpeBCs5sZRcsG1oDn2zIoIB5vHwcJ/VDgD8= -github.com/threatwinds/go-sdk v1.0.43/go.mod h1:S0R7kQj2BsTgaYnX6eZ3keEFRy9yt4f9SCEKYMJzD6g= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo= +github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= +github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= -github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= -github.com/utmstack/config-client-go v1.2.7 h1:JeRdI5JjH1liNzMW3LmyevjuPd67J/yt9MAO3+oJAuM= -github.com/utmstack/config-client-go v1.2.7/go.mod h1:kM0KoUizM9ZlcQp0qKviGTWn/+anT5Rfjx3zfZk79nM= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= -go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= -go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= -go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= -go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= -go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= -go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= -go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= -golang.org/x/arch v0.19.0 h1:LmbDQUodHThXE+htjrnmVD73M//D9GTH6wFZjyDkjyU= -golang.org/x/arch v0.19.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 h1:R9PFI6EUdfVKgwKjZef7QIwGcBKu86OEFpJ9nUEP2l4= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ= +github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 h1:mVXdvnmR3S3BQOqHECm9NGMjYiRtEvDYcqAqedTXY6s= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 h1:qJW29YvkiJmXOYMu5Tf8lyrTp3dOS+K4z6IixtLaCf8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ= -sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/plugins/azure/main.go b/plugins/azure/main.go index 01c910224..f7473d7f3 100644 --- a/plugins/azure/main.go +++ b/plugins/azure/main.go @@ -65,7 +65,7 @@ var SupportedClouds = []CloudEndpoints{ } func main() { - mode := plugins.GetCfg().Env.Mode + mode := plugins.GetCfg("plugin_com.utmstack.azure").Env.Mode if mode != "worker" { return } @@ -74,7 +74,7 @@ func main() { for t := 0; t < 2*runtime.NumCPU(); t++ { go func() { - plugins.SendLogsFromChannel() + plugins.SendLogsFromChannel("com.utmstack.azure") }() } @@ -91,6 +91,7 @@ func main() { catcher.Info("Airgap or limited connectivity detected", map[string]any{ "cloud": cloudName, "loginAuthority": loginAuthority, + "process": "plugin_com.utmstack.azure", }) } } @@ -159,7 +160,8 @@ func pull(group *config.ModuleGroup) { if agent.EventHubConnection == "" || agent.ConsumerGroup == "" || agent.StorageContainer == "" || agent.StorageConnection == "" { _ = catcher.Error("missing required configuration for Event Hub", nil, map[string]any{ - "group": agent.GroupName, + "group": agent.GroupName, + "process": "plugin_com.utmstack.azure", }) return } @@ -167,7 +169,8 @@ func pull(group *config.ModuleGroup) { eventHubParts := strings.Split(agent.EventHubConnection, ";EntityPath=") if len(eventHubParts) != 2 { _ = catcher.Error("invalid Event Hub connection string format", nil, map[string]any{ - "group": agent.GroupName, + "group": agent.GroupName, + "process": "plugin_com.utmstack.azure", }) return } @@ -178,7 +181,8 @@ func pull(group *config.ModuleGroup) { blobClient, err := azblob.NewClientFromConnectionString(agent.StorageConnection, nil) if err != nil { _ = catcher.Error("cannot create blob client", err, map[string]any{ - "group": agent.GroupName, + "group": agent.GroupName, + "process": "plugin_com.utmstack.azure", }) return } @@ -187,7 +191,8 @@ func pull(group *config.ModuleGroup) { blobClient.ServiceClient().NewContainerClient(agent.StorageContainer), nil) if err != nil { _ = catcher.Error("cannot create checkpoint store", err, map[string]any{ - "group": agent.GroupName, + "group": agent.GroupName, + "process": "plugin_com.utmstack.azure", }) return } @@ -207,6 +212,7 @@ func pull(group *config.ModuleGroup) { "group": agent.GroupName, "retry": retry + 1, "maxRetries": maxRetries, + "process": "plugin_com.utmstack.azure", }) if retry < maxRetries-1 { @@ -218,7 +224,8 @@ func pull(group *config.ModuleGroup) { if err != nil { _ = catcher.Error("all retries failed when creating Event Hub consumer client", err, map[string]any{ - "group": agent.GroupName, + "group": agent.GroupName, + "process": "plugin_com.utmstack.azure", }) return } @@ -227,7 +234,8 @@ func pull(group *config.ModuleGroup) { processor, err := azeventhubs.NewProcessor(client, checkpointStore, nil) if err != nil { _ = catcher.Error("cannot create Event Hub processor", err, map[string]any{ - "group": agent.GroupName, + "group": agent.GroupName, + "process": "plugin_com.utmstack.azure", }) return } @@ -247,7 +255,8 @@ func pull(group *config.ModuleGroup) { if err := processor.Run(ctx); err != nil && !errors.Is(err, context.Canceled) { _ = catcher.Error("error running Event Hub processor", err, map[string]any{ - "group": agent.GroupName, + "group": agent.GroupName, + "process": "plugin_com.utmstack.azure", }) } } @@ -264,6 +273,7 @@ func processPartition(pc *azeventhubs.ProcessorPartitionClient, groupName string _ = catcher.Error("error receiving events", err, map[string]any{ "group": groupName, "partitionID": pc.PartitionID(), + "process": "plugin_com.utmstack.azure", }) return } @@ -278,6 +288,7 @@ func processPartition(pc *azeventhubs.ProcessorPartitionClient, groupName string _ = catcher.Error("cannot parse event body", err, map[string]any{ "group": groupName, "partitionID": pc.PartitionID(), + "process": "plugin_com.utmstack.azure", }) continue } @@ -289,6 +300,7 @@ func processPartition(pc *azeventhubs.ProcessorPartitionClient, groupName string _ = catcher.Error("invalid record format in records array", nil, map[string]any{ "group": groupName, "partitionID": pc.PartitionID(), + "process": "plugin_com.utmstack.azure", }) continue } @@ -298,6 +310,7 @@ func processPartition(pc *azeventhubs.ProcessorPartitionClient, groupName string _ = catcher.Error("cannot encode record to JSON", err, map[string]any{ "group": groupName, "partitionID": pc.PartitionID(), + "process": "plugin_com.utmstack.azure", }) continue } @@ -309,7 +322,7 @@ func processPartition(pc *azeventhubs.ProcessorPartitionClient, groupName string DataSource: groupName, Timestamp: time.Now().UTC().Format(time.RFC3339Nano), Raw: string(jsonLog), - }) + }, "com.utmstack.azure") } } else { jsonLog, err := json.Marshal(logData) @@ -317,6 +330,7 @@ func processPartition(pc *azeventhubs.ProcessorPartitionClient, groupName string _ = catcher.Error("cannot encode log to JSON", err, map[string]any{ "group": groupName, "partitionID": pc.PartitionID(), + "process": "plugin_com.utmstack.azure", }) continue } @@ -328,7 +342,7 @@ func processPartition(pc *azeventhubs.ProcessorPartitionClient, groupName string DataSource: groupName, Timestamp: time.Now().UTC().Format(time.RFC3339Nano), Raw: string(jsonLog), - }) + }, "com.utmstack.azure") } } @@ -336,6 +350,7 @@ func processPartition(pc *azeventhubs.ProcessorPartitionClient, groupName string _ = catcher.Error("checkpoint error", err, map[string]any{ "group": groupName, "partitionID": pc.PartitionID(), + "process": "plugin_com.utmstack.azure", }) } } @@ -399,7 +414,7 @@ func checkConnection(url string) error { defer func() { err := resp.Body.Close() if err != nil { - _ = catcher.Error("cannot close response body", err, nil) + _ = catcher.Error("cannot close response body", err, map[string]any{"process": "plugin_com.utmstack.azure"}) } }() @@ -413,7 +428,7 @@ func infiniteRetryIfXError(f func() error, exception string) error { err := f() if err != nil && is(err, exception) { if !xErrorWasLogged { - _ = catcher.Error("An error occurred (%s), will keep retrying indefinitely...", err, nil) + _ = catcher.Error("An error occurred (%s), will keep retrying indefinitely...", err, map[string]any{"process": "azure-plugin"}) xErrorWasLogged = true } time.Sleep(wait) diff --git a/plugins/bitdefender/config/config.go b/plugins/bitdefender/config/config.go index e16017c81..d089c5744 100644 --- a/plugins/bitdefender/config/config.go +++ b/plugins/bitdefender/config/config.go @@ -52,11 +52,11 @@ func GetConfig() *ConfigurationSection { func StartConfigurationSystem() { for { if err := utils.ConnectionChecker(UrlCheckConnection); err != nil { - _ = catcher.Error("External connection failure detected: %v", err, nil) + _ = catcher.Error("External connection failure detected: %v", err, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) } pluginConfig := plugins.PluginCfg("com.utmstack", false) if !pluginConfig.Exists() { - _ = catcher.Error("plugin configuration not found", nil, nil) + _ = catcher.Error("plugin configuration not found", nil, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) time.Sleep(reconnectDelay) continue } @@ -82,7 +82,7 @@ func StartConfigurationSystem() { ) if err != nil { - catcher.Error("Failed to connect to server", err, nil) + _ = catcher.Error("Failed to connect to server", err, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) cancel() time.Sleep(reconnectDelay) continue @@ -90,7 +90,7 @@ func StartConfigurationSystem() { state := conn.GetState() if state == connectivity.Shutdown || state == connectivity.TransientFailure { - catcher.Error("Connection is in shutdown or transient failure state", nil, nil) + _ = catcher.Error("Connection is in shutdown or transient failure state", nil, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) cancel() time.Sleep(reconnectDelay) continue @@ -99,8 +99,8 @@ func StartConfigurationSystem() { client := NewConfigServiceClient(conn) stream, err := client.StreamConfig(ctx) if err != nil { - catcher.Error("Failed to create stream", err, nil) - conn.Close() + _ = catcher.Error("Failed to create stream", err, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) + _ = conn.Close() cancel() time.Sleep(reconnectDelay) continue @@ -112,8 +112,8 @@ func StartConfigurationSystem() { }, }) if err != nil { - catcher.Error("Failed to send PluginInit", err, nil) - conn.Close() + _ = catcher.Error("Failed to send PluginInit", err, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) + _ = conn.Close() cancel() time.Sleep(reconnectDelay) continue @@ -123,21 +123,21 @@ func StartConfigurationSystem() { in, err := stream.Recv() if err != nil { if strings.Contains(err.Error(), "EOF") { - catcher.Info("Stream closed by server, reconnecting...", nil) - conn.Close() + catcher.Info("Stream closed by server, reconnecting...", map[string]any{"process": "plugin_com.utmstack.bitdefender"}) + _ = conn.Close() cancel() time.Sleep(reconnectDelay) break } st, ok := status.FromError(err) if ok && (st.Code() == codes.Unavailable || st.Code() == codes.Canceled) { - catcher.Error("Stream error: "+st.Message(), err, nil) - conn.Close() + _ = catcher.Error("Stream error: "+st.Message(), err, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) + _ = conn.Close() cancel() time.Sleep(reconnectDelay) break } else { - catcher.Error("Stream receive error", err, nil) + _ = catcher.Error("Stream receive error", err, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) time.Sleep(reconnectDelay) continue } @@ -145,7 +145,7 @@ func StartConfigurationSystem() { switch message := in.Payload.(type) { case *BiDirectionalMessage_Config: - catcher.Info("Received configuration update", map[string]any{"config": message.Config}) + catcher.Info("Received configuration update", map[string]any{"config": message.Config, "process": "plugin_com.utmstack.bitdefender"}) cnf = message.Config go processConfigurations(cnf) } @@ -159,7 +159,8 @@ func processConfigurations(config *ConfigurationSection) { if isNeededUpdate(configsSent, newConfig, group.GroupName) { if newConfig.ConnectionKey == "" || newConfig.AccessUrl == "" || newConfig.MasterIp == "" || len(newConfig.CompaniesIDs) == 0 { _ = catcher.Error("Invalid configuration for group", nil, map[string]any{ - "group": group.GroupName, + "group": group.GroupName, + "process": "plugin_com.utmstack.bitdefender", }) continue } @@ -168,28 +169,32 @@ func processConfigurations(config *ConfigurationSection) { defer func() { if r := recover(); r != nil { _ = catcher.Error("recovered from panic in API operations", nil, map[string]any{ - "panic": r, - "group": group.GroupName, + "panic": r, + "group": group.GroupName, + "process": "plugin_com.utmstack.bitdefender", }) } }() if err := apiPush(newConfig, "sendConf"); err != nil { _ = catcher.Error("error sending configuration", err, map[string]any{ - "group": group.GroupName, + "group": group.GroupName, + "process": "plugin_com.utmstack.bitdefender", }) return } time.Sleep(15 * time.Second) if err := apiPush(newConfig, "getConf"); err != nil { _ = catcher.Error("error getting configuration", err, map[string]any{ - "group": group.GroupName, + "group": group.GroupName, + "process": "plugin_com.utmstack.bitdefender", }) return } if err := apiPush(newConfig, "sendTest"); err != nil { _ = catcher.Error("error sending test event", err, map[string]any{ - "group": group.GroupName, + "group": group.GroupName, + "process": "plugin_com.utmstack.bitdefender", }) return } @@ -209,13 +214,13 @@ func apiPush(config BDGZModuleConfig, operation string) error { fn, ok := operationFunc[operation] if !ok { - return catcher.Error("wrong operation", nil, nil) + return catcher.Error("wrong operation", nil, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) } for i := 0; i < 5; i++ { response, err := fn(config) if err != nil { - _ = catcher.Error(fmt.Sprintf("%v", err), err, nil) + _ = catcher.Error(fmt.Sprintf("%v", err), err, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) time.Sleep(1 * time.Minute) continue } @@ -225,14 +230,14 @@ func apiPush(config BDGZModuleConfig, operation string) error { return nil } - return catcher.Error("error sending configuration after 5 retries", nil, nil) + return catcher.Error("error sending configuration after 5 retries", nil, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) } func sendPushEventSettings(config BDGZModuleConfig) (*http.Response, error) { byteTemplate := getTemplateSetPush(config) body, err := json.Marshal(byteTemplate) if err != nil { - return nil, catcher.Error("error when marshaling the request body to send the configuration", err, nil) + return nil, catcher.Error("error when marshaling the request body to send the configuration", err, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) } return sendRequest(body, config) } @@ -241,7 +246,7 @@ func getPushEventSettings(config BDGZModuleConfig) (*http.Response, error) { byteTemplate := getTemplateGet() body, err := json.Marshal(byteTemplate) if err != nil { - return nil, catcher.Error("error when marshaling the request body to get the configuration", err, nil) + return nil, catcher.Error("error when marshaling the request body to get the configuration", err, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) } return sendRequest(body, config) } @@ -250,7 +255,7 @@ func sendTestPushEvent(config BDGZModuleConfig) (*http.Response, error) { byteTemplate := getTemplateTest() body, err := json.Marshal(byteTemplate) if err != nil { - return nil, catcher.Error("error when marshaling the request body to send the test event", err, nil) + return nil, catcher.Error("error when marshaling the request body to send the test event", err, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) } return sendRequest(body, config) } diff --git a/plugins/bitdefender/go.mod b/plugins/bitdefender/go.mod index f06d71b41..993411042 100644 --- a/plugins/bitdefender/go.mod +++ b/plugins/bitdefender/go.mod @@ -1,52 +1,57 @@ module github.com/utmstack/UTMStack/plugins/bitdefender -go 1.24.4 +go 1.25.5 require ( github.com/google/uuid v1.6.0 github.com/gorilla/mux v1.8.1 - github.com/threatwinds/go-sdk v1.0.43 - google.golang.org/grpc v1.74.2 - google.golang.org/protobuf v1.36.6 + github.com/threatwinds/go-sdk v1.1.7 + google.golang.org/grpc v1.78.0 + google.golang.org/protobuf v1.36.11 ) require ( - cel.dev/expr v0.24.0 // indirect + cel.dev/expr v0.25.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/bytedance/sonic v1.14.0 // indirect - github.com/bytedance/sonic/loader v0.3.0 // indirect - github.com/cloudwego/base64x v0.1.5 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/bytedance/gopkg v0.1.3 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect github.com/gin-contrib/sse v1.1.0 // indirect - github.com/gin-gonic/gin v1.10.1 // indirect + github.com/gin-gonic/gin v1.11.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.27.0 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect github.com/goccy/go-json v0.10.5 // indirect - github.com/google/cel-go v0.26.0 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect + github.com/google/cel-go v0.26.1 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect - github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/opensearch-project/opensearch-go/v4 v4.6.0 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect github.com/stoewer/go-strcase v1.3.1 // indirect github.com/tidwall/gjson v1.18.0 // indirect - github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.3.0 // indirect - go.yaml.in/yaml/v2 v2.4.2 // indirect - golang.org/x/arch v0.19.0 // indirect - golang.org/x/crypto v0.40.0 // indirect - golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 // indirect - golang.org/x/net v0.42.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/text v0.27.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 // indirect + github.com/ugorji/go/codec v1.3.1 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - sigs.k8s.io/yaml v1.5.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/plugins/bitdefender/go.sum b/plugins/bitdefender/go.sum index fa3c27d86..99d9fbde9 100644 --- a/plugins/bitdefender/go.sum +++ b/plugins/bitdefender/go.sum @@ -1,25 +1,25 @@ -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= -github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= -github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= +github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= -github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= -github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -30,14 +30,16 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= -github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -45,12 +47,12 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -64,80 +66,97 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc= +github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/threatwinds/go-sdk v1.0.43 h1:q2Pl0DvmFpeBCs5sZRcsG1oDn2zIoIB5vHwcJ/VDgD8= -github.com/threatwinds/go-sdk v1.0.43/go.mod h1:S0R7kQj2BsTgaYnX6eZ3keEFRy9yt4f9SCEKYMJzD6g= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo= +github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= +github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= -github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= -go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= -go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= -go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= -go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= -go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= -go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= -go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= -golang.org/x/arch v0.19.0 h1:LmbDQUodHThXE+htjrnmVD73M//D9GTH6wFZjyDkjyU= -golang.org/x/arch v0.19.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 h1:R9PFI6EUdfVKgwKjZef7QIwGcBKu86OEFpJ9nUEP2l4= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ= +github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 h1:mVXdvnmR3S3BQOqHECm9NGMjYiRtEvDYcqAqedTXY6s= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 h1:qJW29YvkiJmXOYMu5Tf8lyrTp3dOS+K4z6IixtLaCf8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ= -sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/plugins/bitdefender/main.go b/plugins/bitdefender/main.go index bc70c0744..11f819ec8 100644 --- a/plugins/bitdefender/main.go +++ b/plugins/bitdefender/main.go @@ -10,7 +10,7 @@ import ( ) func main() { - mode := plugins.GetCfg().Env.Mode + mode := plugins.GetCfg("plugin_com.utmstack.bitdefender").Env.Mode if mode != "manager" { return } @@ -19,7 +19,7 @@ func main() { for t := 0; t < 2*runtime.NumCPU(); t++ { go func() { - plugins.SendLogsFromChannel() + plugins.SendLogsFromChannel("com.utmstack.bitdefender") }() } diff --git a/plugins/bitdefender/server/message.go b/plugins/bitdefender/server/message.go index 5ebdf5da8..386862f4f 100644 --- a/plugins/bitdefender/server/message.go +++ b/plugins/bitdefender/server/message.go @@ -28,14 +28,14 @@ func CreateMessage(cnf *config.ConfigurationSection, events []string) { continue } - plugins.EnqueueLog(&plugins.Log{ + _ = plugins.EnqueueLog(&plugins.Log{ Id: uuid.New().String(), TenantId: config.DefaultTenant, DataType: "antivirus-bitdefender-gz", DataSource: cnf.GroupName, Timestamp: time.Now().UTC().Format(time.RFC3339Nano), Raw: syslogMessage, - }) + }, "com.utmstack.bitdefender") break } diff --git a/plugins/bitdefender/server/server.go b/plugins/bitdefender/server/server.go index 54024b7b4..4206999ea 100644 --- a/plugins/bitdefender/server/server.go +++ b/plugins/bitdefender/server/server.go @@ -18,7 +18,7 @@ func GetLogs() http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { conf := config.GetConfig() if conf == nil { - _ = catcher.Error("configuration not found", nil, nil) + _ = catcher.Error("configuration not found", nil, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) http.Error(w, "Configuration not found", http.StatusInternalServerError) return } @@ -26,12 +26,12 @@ func GetLogs() http.HandlerFunc { if conf.ModuleActive { if r.Header.Get("authorization") == "" { message := "401 Missing Authorization Header" - _ = catcher.Error("missing authorization header", nil, nil) + _ = catcher.Error("missing authorization header", nil, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) j, _ := json.Marshal(message) w.WriteHeader(http.StatusUnauthorized) _, err := w.Write(j) if err != nil { - _ = catcher.Error("cannot write response", err, nil) + _ = catcher.Error("cannot write response", err, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) } return } @@ -45,12 +45,12 @@ func GetLogs() http.HandlerFunc { } if !isAuth { message := "401 Invalid Authentication Credentials" - _ = catcher.Error("invalid authentication credentials", nil, nil) + _ = catcher.Error("invalid authentication credentials", nil, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) j, _ := json.Marshal(message) w.WriteHeader(http.StatusUnauthorized) _, err := w.Write(j) if err != nil { - _ = catcher.Error("cannot write response", err, nil) + _ = catcher.Error("cannot write response", err, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) } return } @@ -58,7 +58,7 @@ func GetLogs() http.HandlerFunc { var newBody schema.BodyEvents err := json.NewDecoder(r.Body).Decode(&newBody) if err != nil { - _ = catcher.Error("error decoding body", err, nil) + _ = catcher.Error("error decoding body", err, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) return } @@ -69,10 +69,10 @@ func GetLogs() http.HandlerFunc { w.WriteHeader(http.StatusOK) _, err = w.Write(j) if err != nil { - _ = catcher.Error("cannot write response", err, nil) + _ = catcher.Error("cannot write response", err, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) } } else { - _ = catcher.Error("bitdefender module disabled", nil, nil) + _ = catcher.Error("bitdefender module disabled", nil, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) } } } @@ -87,7 +87,7 @@ func StartServer() { loadedCerts, err := loadCerts() if err != nil { - _ = catcher.Error("error loading certificates", err, nil) + _ = catcher.Error("error loading certificates", err, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) return } @@ -99,8 +99,6 @@ func StartServer() { tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, }, - - PreferServerCipherSuites: true, } server := &http.Server{ @@ -114,6 +112,6 @@ func StartServer() { err = server.ListenAndServeTLS("", "") if err != nil { - _ = catcher.Error("server stopped unexpectedly", err, nil) + _ = catcher.Error("server stopped unexpectedly", err, map[string]any{"process": "plugin_com.utmstack.bitdefender"}) } } diff --git a/plugins/config/go.mod b/plugins/config/go.mod index fcda9120e..2ef560d86 100644 --- a/plugins/config/go.mod +++ b/plugins/config/go.mod @@ -1,52 +1,57 @@ module github.com/utmstack/UTMStack/plugins/config -go 1.24.2 +go 1.25.5 require ( github.com/lib/pq v1.10.9 - github.com/threatwinds/go-sdk v1.0.43 + github.com/threatwinds/go-sdk v1.1.7 gopkg.in/yaml.v3 v3.0.1 - sigs.k8s.io/yaml v1.5.0 + sigs.k8s.io/yaml v1.6.0 ) require ( - cel.dev/expr v0.24.0 // indirect + cel.dev/expr v0.25.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/bytedance/sonic v1.14.0 // indirect - github.com/bytedance/sonic/loader v0.3.0 // indirect - github.com/cloudwego/base64x v0.1.5 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/bytedance/gopkg v0.1.3 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect github.com/gin-contrib/sse v1.1.0 // indirect - github.com/gin-gonic/gin v1.10.1 // indirect + github.com/gin-gonic/gin v1.11.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.27.0 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect github.com/goccy/go-json v0.10.5 // indirect - github.com/google/cel-go v0.26.0 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect + github.com/google/cel-go v0.26.1 // indirect github.com/google/uuid v1.6.0 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect - github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/opensearch-project/opensearch-go/v4 v4.6.0 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect github.com/stoewer/go-strcase v1.3.1 // indirect github.com/tidwall/gjson v1.18.0 // indirect - github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.3.0 // indirect - go.yaml.in/yaml/v2 v2.4.2 // indirect - golang.org/x/arch v0.19.0 // indirect - golang.org/x/crypto v0.40.0 // indirect - golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 // indirect - golang.org/x/net v0.42.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/text v0.27.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/grpc v1.74.2 // indirect - google.golang.org/protobuf v1.36.6 // indirect + github.com/ugorji/go/codec v1.3.1 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/grpc v1.78.0 // indirect + google.golang.org/protobuf v1.36.11 // indirect ) diff --git a/plugins/config/go.sum b/plugins/config/go.sum index ce4c148d4..4c198af7c 100644 --- a/plugins/config/go.sum +++ b/plugins/config/go.sum @@ -1,25 +1,25 @@ -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= -github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= -github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= +github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= -github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= -github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -30,25 +30,27 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= -github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -64,80 +66,97 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc= +github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/threatwinds/go-sdk v1.0.43 h1:q2Pl0DvmFpeBCs5sZRcsG1oDn2zIoIB5vHwcJ/VDgD8= -github.com/threatwinds/go-sdk v1.0.43/go.mod h1:S0R7kQj2BsTgaYnX6eZ3keEFRy9yt4f9SCEKYMJzD6g= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo= +github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= +github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= -github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= -go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= -go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= -go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= -go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= -go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= -go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= -go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= -golang.org/x/arch v0.19.0 h1:LmbDQUodHThXE+htjrnmVD73M//D9GTH6wFZjyDkjyU= -golang.org/x/arch v0.19.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 h1:R9PFI6EUdfVKgwKjZef7QIwGcBKu86OEFpJ9nUEP2l4= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ= +github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 h1:mVXdvnmR3S3BQOqHECm9NGMjYiRtEvDYcqAqedTXY6s= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 h1:qJW29YvkiJmXOYMu5Tf8lyrTp3dOS+K4z6IixtLaCf8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ= -sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/plugins/config/main.go b/plugins/config/main.go index f87f95f8f..798bf8d50 100644 --- a/plugins/config/main.go +++ b/plugins/config/main.go @@ -40,7 +40,9 @@ type Rule struct { Description string `yaml:"description"` Where string `yaml:"where"` AfterEvents []SearchRequest `yaml:"afterEvents,omitempty"` + Correlation []SearchRequest `yaml:"correlation,omitempty"` DeduplicateBy []string `yaml:"deduplicateBy,omitempty"` + GroupBy []string `yaml:"groupBy,omitempty"` } type SearchRequest struct { @@ -101,7 +103,7 @@ func (b *SearchRequestBackend) ToSearchRequest() SearchRequest { } } -func (t *Tenant) FromVar(disabledRules []uint64, assets []Asset) { +func (t *Tenant) FromVar(disabledRules []uint64, assets []Asset) error { t.Id = "ce66672c-e36d-4761-a8c8-90058fee1a24" t.Name = "Default" t.DisabledRules = disabledRules @@ -111,17 +113,18 @@ func (t *Tenant) FromVar(disabledRules []uint64, assets []Asset) { sdkAsset := plugins.Asset(asset) t.Assets = append(t.Assets, &sdkAsset) } + + return nil } -func (a *Asset) FromVar(name any, hostnames any, ipAddresses any, confidentiality, integrity, availability any) { +func (a *Asset) FromVar(name any, hostnames any, ipAddresses any, confidentiality, integrity, availability any) error { var hostnamesList []string if hostnames != nil { hostnamesStr := utils.CastString(hostnames) err := json.Unmarshal([]byte(hostnamesStr), &hostnamesList) if err != nil { - _ = catcher.Error("failed to unmarshal hostnames list", err, nil) - return + return catcher.Error("failed to unmarshal hostnames list", err, map[string]any{"process": "plugin_com.utmstack.config"}) } } @@ -131,8 +134,7 @@ func (a *Asset) FromVar(name any, hostnames any, ipAddresses any, confidentialit ipAddressesStr := utils.CastString(ipAddresses) err := json.Unmarshal([]byte(ipAddressesStr), &ipAddressesList) if err != nil { - _ = catcher.Error("failed to unmarshal ip addresses list", err, nil) - return + return catcher.Error("failed to unmarshal ip addresses list", err, map[string]any{"process": "plugin_com.utmstack.config"}) } } @@ -142,6 +144,8 @@ func (a *Asset) FromVar(name any, hostnames any, ipAddresses any, confidentialit a.Availability = castUint32(availability) a.Hostnames = hostnamesList a.Ips = ipAddressesList + + return nil } func castUint32(value interface{}) uint32 { @@ -157,7 +161,7 @@ func castUint32(value interface{}) uint32 { case string: val, err := strconv.ParseUint(v, 10, 32) if err != nil { - _ = catcher.Error("failed to cast string to int64", err, map[string]any{"value": v}) + _ = catcher.Error("failed to cast string to uint32", err, map[string]any{"value": v, "process": "plugin_com.utmstack.config"}) return 0 } return uint32(val) @@ -168,7 +172,7 @@ func castUint32(value interface{}) uint32 { func (r *Rule) FromVar(id int64, dataTypes []string, ruleName any, confidentiality any, integrity any, availability any, category any, technique any, description any, - references any, where any, adversary any, deduplicate any, after any) { + references any, where any, adversary any, deduplicateBy any, after any, groupBy any) error { var referencesList []string @@ -176,19 +180,27 @@ func (r *Rule) FromVar(id int64, dataTypes []string, ruleName any, confidentiali referencesStr := utils.CastString(references) err := json.Unmarshal([]byte(referencesStr), &referencesList) if err != nil { - _ = catcher.Error("failed to unmarshal references list", err, nil) - return + return catcher.Error("failed to unmarshal references list", err, map[string]any{"process": "plugin_com.utmstack.config"}) } } - var deduplicateList []string + var deduplicateByList []string - if deduplicate != nil { - deduplicateStr := utils.CastString(deduplicate) - err := json.Unmarshal([]byte(deduplicateStr), &deduplicateList) + if deduplicateBy != nil { + deduplicateStr := utils.CastString(deduplicateBy) + err := json.Unmarshal([]byte(deduplicateStr), &deduplicateByList) if err != nil { - _ = catcher.Error("failed to unmarshal deduplicate list", err, nil) - return + return catcher.Error("failed to unmarshal deduplicate list", err, map[string]any{"process": "plugin_com.utmstack.config"}) + } + } + + var groupByList []string + + if groupBy != nil { + groupByStr := utils.CastString(groupBy) + err := json.Unmarshal([]byte(groupByStr), &groupByList) + if err != nil { + return catcher.Error("failed to unmarshal groupBy list", err, map[string]any{"process": "plugin_com.utmstack.config"}) } } @@ -199,8 +211,7 @@ func (r *Rule) FromVar(id int64, dataTypes []string, ruleName any, confidentiali afterStr := utils.CastString(after) err := json.Unmarshal([]byte(afterStr), &afterBackendObj) if err != nil { - _ = catcher.Error("failed to unmarshal after list", err, nil) - return + return catcher.Error("failed to unmarshal after list", err, map[string]any{"process": "plugin_com.utmstack.config"}) } // Convert each SearchRequestBackend to SearchRequest @@ -221,33 +232,48 @@ func (r *Rule) FromVar(id int64, dataTypes []string, ruleName any, confidentiali r.References = make([]string, len(referencesList)) r.Description = utils.CastString(description) r.Adversary = utils.CastString(adversary) - r.DeduplicateBy = deduplicateList + r.DeduplicateBy = deduplicateByList + r.GroupBy = groupByList r.AfterEvents = afterObj r.References = referencesList r.Where = utils.CastString(where) + + return nil } -func (f *Filter) FromVar(id int, name any, filter any) { +func (f *Filter) FromVar(id int, name any, filter any) error { f.Id = id f.Name = utils.CastString(name) f.Filter = utils.CastString(filter) + + return nil } func main() { + if plugins.GetCfg("plugin_com.utmstack.config").Env.Mode == "playground" { + return + } + for { func() { db, err := connect() if err != nil { - _ = catcher.Error("failed to connect to database", err, nil) + _ = catcher.Error("failed to connect to database", err, map[string]any{"process": "plugin_com.utmstack.config"}) // Don't exit, just sleep and retry time.Sleep(30 * time.Second) return } - defer func() { _ = db.Close() }() + + defer func() { + err := db.Close() + if err != nil { + _ = catcher.Error("failed to close database connection", err, map[string]any{"process": "plugin_com.utmstack.config"}) + } + }() filters, err := getFilters(db) if err != nil { - _ = catcher.Error("failed to get filters", err, nil) + _ = catcher.Error("failed to get filters", err, map[string]any{"process": "plugin_com.utmstack.config"}) // Don't exit, just sleep and retry time.Sleep(30 * time.Second) return @@ -255,7 +281,7 @@ func main() { assets, err := getAssets(db) if err != nil { - _ = catcher.Error("failed to get assets", err, nil) + _ = catcher.Error("failed to get assets", err, map[string]any{"process": "plugin_com.utmstack.config"}) // Don't exit, just sleep and retry time.Sleep(30 * time.Second) return @@ -263,7 +289,7 @@ func main() { rules, err := getRules(db) if err != nil { - _ = catcher.Error("failed to get rules", err, nil) + _ = catcher.Error("failed to get rules", err, map[string]any{"process": "plugin_com.utmstack.config"}) // Don't exit, just sleep and retry time.Sleep(30 * time.Second) return @@ -271,31 +297,36 @@ func main() { patterns, err := getPatterns(db) if err != nil { - _ = catcher.Error("failed to get patterns", err, nil) + _ = catcher.Error("failed to get patterns", err, map[string]any{"process": "plugin_com.utmstack.config"}) // Don't exit, just sleep and retry time.Sleep(30 * time.Second) return } tenant := Tenant{} - tenant.FromVar([]uint64{}, assets) + err = tenant.FromVar([]uint64{}, assets) + if err != nil { + _ = catcher.Error("failed to create tenant from variables", err, map[string]any{"process": "plugin_com.utmstack.config"}) + time.Sleep(30 * time.Second) + return + } // Try to acquire the lock before modifying configuration files maxRetries := 5 for i := 0; i < maxRetries; i++ { - acquired, err := plugins.AcquireLock() + acquired, err := plugins.AcquireLock("plugin_com.utmstack.config") if acquired { break } - // Lock not acquired, wait and retry + // Lock wasn't acquired, wait and retry if i < maxRetries-1 { - _ = catcher.Error("failed to acquire lock", err, map[string]interface{}{"retry": i + 1, "maxRetries": maxRetries}) + _ = catcher.Error("failed to acquire lock", err, map[string]interface{}{"retry": i + 1, "maxRetries": maxRetries, "process": "plugin_com.utmstack.config"}) time.Sleep(plugins.RandomDuration(10, 60)) } else { - _ = catcher.Error("failed to acquire lock after multiple retries", nil, nil) + _ = catcher.Error("failed to acquire lock after multiple retries", nil, map[string]any{"process": "plugin_com.utmstack.config"}) return } } @@ -303,13 +334,13 @@ func main() { // Make sure to release the lock when done defer func() { if err := plugins.ReleaseLock(); err != nil { - _ = catcher.Error("failed to release lock", err, nil) + _ = catcher.Error("failed to release lock", err, map[string]any{"process": "plugin_com.utmstack.config"}) } }() err = cleanUpFilters(filters) if err != nil { - _ = catcher.Error("failed to clean up filters", err, nil) + _ = catcher.Error("failed to clean up filters", err, map[string]any{"process": "plugin_com.utmstack.config"}) // Don't exit, just sleep and retry time.Sleep(30 * time.Second) return @@ -317,7 +348,7 @@ func main() { err = writeFilters(filters) if err != nil { - _ = catcher.Error("failed to write filters", err, nil) + _ = catcher.Error("failed to write filters", err, map[string]any{"process": "plugin_com.utmstack.config"}) // Don't exit, just sleep and retry time.Sleep(30 * time.Second) return @@ -325,7 +356,7 @@ func main() { err = cleanUpRules(rules) if err != nil { - _ = catcher.Error("failed to clean up rules", err, nil) + _ = catcher.Error("failed to clean up rules", err, map[string]any{"process": "plugin_com.utmstack.config"}) // Don't exit, just sleep and retry time.Sleep(30 * time.Second) return @@ -333,7 +364,7 @@ func main() { err = writeRules(rules) if err != nil { - _ = catcher.Error("failed to write rules", err, nil) + _ = catcher.Error("failed to write rules", err, map[string]any{"process": "plugin_com.utmstack.config"}) // Don't exit, just sleep and retry time.Sleep(30 * time.Second) return @@ -341,7 +372,7 @@ func main() { err = writeTenant(tenant) if err != nil { - _ = catcher.Error("failed to write tenant", err, nil) + _ = catcher.Error("failed to write tenant", err, map[string]any{"process": "plugin_com.utmstack.config"}) // Don't exit, just sleep and retry time.Sleep(30 * time.Second) return @@ -349,7 +380,7 @@ func main() { err = writePatterns(patterns) if err != nil { - _ = catcher.Error("failed to write patterns", err, nil) + _ = catcher.Error("failed to write patterns", err, map[string]any{"process": "plugin_com.utmstack.config"}) // Don't exit, just sleep and retry time.Sleep(30 * time.Second) return @@ -372,6 +403,7 @@ func connect() (*sql.DB, error) { connStr := fmt.Sprintf("user=%s password=%s dbname=%s host=%s port=%d sslmode=disable", user, password, database, server, port) + //goland:noinspection GoResourceLeak db, err := sql.Open("postgres", connStr) if err != nil { return nil, catcher.Error("failed to open database connection", err, map[string]any{"connStr": connStr}) @@ -401,7 +433,7 @@ func getPatterns(db *sql.DB) (map[string]string, error) { err = rows.Scan(&name, &pattern) if err != nil { - return nil, fmt.Errorf("failed to scan row: %v", err) + return nil, catcher.Error("failed to scan row", err, map[string]any{"process": "plugin_com.utmstack.config"}) } patterns[name] = pattern @@ -413,7 +445,7 @@ func getPatterns(db *sql.DB) (map[string]string, error) { func getFilters(db *sql.DB) ([]Filter, error) { rows, err := db.Query("SELECT id, filter_name, logstash_filter FROM utm_logstash_filter WHERE is_active = true") if err != nil { - return nil, fmt.Errorf("failed to get filters: %v", err) + return nil, catcher.Error("failed to get filters", err, map[string]any{"process": "plugin_com.utmstack.config"}) } defer func() { _ = rows.Close() }() @@ -429,15 +461,15 @@ func getFilters(db *sql.DB) ([]Filter, error) { err = rows.Scan(&id, &name, &body) if err != nil { - return nil, fmt.Errorf("failed to scan row: %v", err) + return nil, catcher.Error("failed to scan row", err, map[string]any{"process": "plugin_com.utmstack.config"}) } filter := Filter{} - filter.FromVar( - id, - name, - body, - ) + + if err := filter.FromVar(id, name, body); err != nil { + continue + } + filters = append(filters, filter) } @@ -447,7 +479,7 @@ func getFilters(db *sql.DB) ([]Filter, error) { func getAssets(db *sql.DB) ([]Asset, error) { rows, err := db.Query("SELECT id,asset_name,asset_hostname_list_def,asset_ip_list_def,asset_confidentiality,asset_integrity,asset_availability,last_update FROM utm_tenant_config") if err != nil { - return nil, fmt.Errorf("failed to get assets: %v", err) + return nil, catcher.Error("failed to get assets", err, map[string]any{"process": "plugin_com.utmstack.config"}) } defer func() { _ = rows.Close() }() @@ -469,12 +501,14 @@ func getAssets(db *sql.DB) ([]Asset, error) { err = rows.Scan(&id, &name, &hostnames, &ips, &confidentiality, &integrity, &availability, &lastUpdate) if err != nil { - return nil, fmt.Errorf("failed to scan row: %v", err) + return nil, catcher.Error("failed to scan row", err, map[string]any{"process": "plugin_com.utmstack.config"}) } asset := Asset{} - asset.FromVar(name, hostnames, ips, confidentiality, integrity, availability) + if err := asset.FromVar(name, hostnames, ips, confidentiality, integrity, availability); err != nil { + continue + } assets = append(assets, asset) } @@ -483,9 +517,9 @@ func getAssets(db *sql.DB) ([]Asset, error) { } func getRules(db *sql.DB) ([]Rule, error) { - rows, err := db.Query("SELECT id,rule_name,rule_confidentiality,rule_integrity,rule_availability,rule_category,rule_technique,rule_description,rule_references_def,rule_definition_def,rule_adversary,rule_deduplicate_by_def,rule_after_events_def FROM utm_correlation_rules WHERE rule_active = true") + rows, err := db.Query("SELECT id,rule_name,rule_confidentiality,rule_integrity,rule_availability,rule_category,rule_technique,rule_description,rule_references_def,rule_definition_def,rule_adversary,rule_deduplicate_by_def,rule_after_events_def,rule_group_by_def FROM utm_correlation_rules WHERE rule_active = true") if err != nil { - return nil, fmt.Errorf("failed to get rules: %v", err) + return nil, catcher.Error("failed to get rules", err, map[string]any{"process": "plugin_com.utmstack.config"}) } defer func() { _ = rows.Close() }() @@ -505,24 +539,27 @@ func getRules(db *sql.DB) ([]Rule, error) { references any where any adversary any - deduplicate any + deduplicateBy any after any + groupBy any ) err = rows.Scan(&id, &ruleName, &confidentiality, &integrity, &availability, - &category, &technique, &description, &references, &where, &adversary, &deduplicate, &after) + &category, &technique, &description, &references, &where, &adversary, &deduplicateBy, &after, &groupBy) if err != nil { - return nil, fmt.Errorf("failed to scan row: %v", err) + return nil, catcher.Error("failed to scan row", err, map[string]any{"process": "plugin_com.utmstack.config"}) } rule := Rule{} dataTypes, err := getRuleDataTypes(db, id) if err != nil { - return nil, err + continue } - rule.FromVar(id, dataTypes, ruleName, confidentiality, integrity, availability, category, technique, description, references, where, adversary, deduplicate, after) + if err := rule.FromVar(id, dataTypes, ruleName, confidentiality, integrity, availability, category, technique, description, references, where, adversary, deduplicateBy, after, groupBy); err != nil { + continue + } rules = append(rules, rule) } @@ -533,7 +570,7 @@ func getRules(db *sql.DB) ([]Rule, error) { func getRuleDataTypes(db *sql.DB, ruleId int64) ([]string, error) { rows, err := db.Query("SELECT data_type_id FROM utm_group_rules_data_type WHERE rule_id = $1", ruleId) if err != nil { - return nil, fmt.Errorf("failed to get data types: %v", err) + return nil, catcher.Error("failed to get data types", err, map[string]any{"process": "plugin_com.utmstack.config"}) } defer func() { _ = rows.Close() }() @@ -548,14 +585,14 @@ func getRuleDataTypes(db *sql.DB, ruleId int64) ([]string, error) { err = rows.Scan(&dataTypeId) if err != nil { - return nil, fmt.Errorf("failed to scan row: %v", err) + return nil, catcher.Error("failed to scan row", err, map[string]any{"process": "plugin_com.utmstack.config"}) } row := db.QueryRow("SELECT data_type FROM utm_data_types WHERE id = $1", dataTypeId) err := row.Scan(&dataType) if err != nil { - return nil, fmt.Errorf("failed to scan row: %v", err) + return nil, catcher.Error("failed to scan row", err, map[string]any{"process": "plugin_com.utmstack.config"}) } dataTypes = append(dataTypes, utils.CastString(dataType)) @@ -580,7 +617,7 @@ func listFiles(folder string) ([]string, error) { }) if err != nil { - return nil, fmt.Errorf("failed to list files: %v", err) + return nil, catcher.Error("failed to list files", err, map[string]any{"process": "plugin_com.utmstack.config"}) } return files, nil @@ -610,7 +647,7 @@ func cleanUpFilters(filters []Filter) error { if !keep { err := os.Remove(file) if err != nil { - return fmt.Errorf("failed to remove file: %v", err) + return catcher.Error("failed to remove file", err, map[string]any{"process": "plugin_com.utmstack.config"}) } } } @@ -652,24 +689,34 @@ func cleanUpRules(rules []Rule) error { func writeFilters(filters []Filter) error { for _, filter := range filters { - filtersFolder, err := utils.MkdirJoin(plugins.WorkDir, "pipeline", "filters") - if err != nil { - return catcher.Error("cannot create filters directory", err, nil) - } + err := func() error { + filtersFolder, err := utils.MkdirJoin(plugins.WorkDir, "pipeline", "filters") + if err != nil { + return catcher.Error("cannot create filters directory", err, nil) + } - file, err := os.Create(filtersFolder.FileJoin(fmt.Sprintf("%d.yaml", filter.Id))) - if err != nil { - return fmt.Errorf("failed to create file: %v", err) - } + file, err := os.Create(filtersFolder.FileJoin(fmt.Sprintf("%d.yaml", filter.Id))) + if err != nil { + return catcher.Error("failed to create file", err, map[string]any{"process": "plugin_com.utmstack.config"}) + } - _, err = file.WriteString(filter.Filter) - if err != nil { - return fmt.Errorf("failed to write to file: %v", err) - } + defer func() { + err := file.Close() + if err != nil { + _ = catcher.Error("failed to close file", err, map[string]any{"process": "plugin_com.utmstack.config"}) + } + }() + + _, err = file.WriteString(filter.Filter) + if err != nil { + return catcher.Error("failed to write to file", err, map[string]any{"process": "plugin_com.utmstack.config"}) + } + + return nil + }() - err = file.Close() if err != nil { - return fmt.Errorf("failed to close file: %v", err) + return err } } @@ -684,9 +731,16 @@ func writeTenant(tenant Tenant) error { file, err := os.Create(pipelineFolder.FileJoin("tenants.yaml")) if err != nil { - return fmt.Errorf("failed to create file: %v", err) + return catcher.Error("failed to create file", err, map[string]any{"process": "plugin_com.utmstack.config"}) } + defer func() { + err := file.Close() + if err != nil { + _ = catcher.Error("failed to close file", err, map[string]any{"process": "plugin_com.utmstack.config"}) + } + }() + sdkTenant := plugins.Tenant(tenant) tenants := plugins.Config{ @@ -695,17 +749,12 @@ func writeTenant(tenant Tenant) error { bTenants, err := k8syaml.Marshal(tenants) if err != nil { - return fmt.Errorf("failed to marshal tenant: %v", err) + return catcher.Error("failed to marshal tenant", err, map[string]any{"process": "plugin_com.utmstack.config"}) } _, err = file.Write(bTenants) if err != nil { - return fmt.Errorf("failed to write to file: %v", err) - } - - err = file.Close() - if err != nil { - return fmt.Errorf("failed to close file: %v", err) + return catcher.Error("failed to write to file", err, map[string]any{"process": "plugin_com.utmstack.config"}) } return nil @@ -713,29 +762,44 @@ func writeTenant(tenant Tenant) error { func writeRules(rules []Rule) error { for _, rule := range rules { - filePath, err := utils.MkdirJoin(plugins.WorkDir, "rules", "utmstack") - if err != nil { - return catcher.Error("cannot create rules directory", err, nil) - } + err := func() error { + filePath, err := utils.MkdirJoin(plugins.WorkDir, "rules", "utmstack") + if err != nil { + return catcher.Error("cannot create rules directory", err, nil) + } - file, err := os.Create(filePath.FileJoin(fmt.Sprintf("%d.yaml", rule.Id))) - if err != nil { - return fmt.Errorf("failed to create file: %v", err) - } + file, err := os.Create(filePath.FileJoin(fmt.Sprintf("%d.yaml", rule.Id))) + if err != nil { + return catcher.Error("failed to create file", err, map[string]any{"process": "plugin_com.utmstack.config"}) + } - bRule, err := yaml.Marshal([]Rule{rule}) - if err != nil { - return fmt.Errorf("failed to marshal rule: %v", err) - } + defer func() { + err := file.Close() + if err != nil { + _ = catcher.Error("failed to close file", err, map[string]any{"process": "plugin_com.utmstack.config"}) + } + }() - _, err = file.Write(bRule) - if err != nil { - return fmt.Errorf("failed to write to file: %v", err) - } + bRule, err := yaml.Marshal([]Rule{rule}) + if err != nil { + return catcher.Error("failed to marshal rule", err, map[string]any{"process": "plugin_com.utmstack.config"}) + } + + _, err = file.Write(bRule) + if err != nil { + return catcher.Error("failed to write to file", err, map[string]any{"process": "plugin_com.utmstack.config"}) + } + + err = file.Close() + if err != nil { + return catcher.Error("failed to close file", err, map[string]any{"process": "plugin_com.utmstack.config"}) + } + + return nil + }() - err = file.Close() if err != nil { - return fmt.Errorf("failed to close file: %v", err) + return err } } @@ -747,28 +811,36 @@ func writePatterns(patterns map[string]string) error { if err != nil { return catcher.Error("cannot create pipeline directory", err, nil) } + file, err := os.Create(filePath.FileJoin("patterns.yaml")) if err != nil { - return fmt.Errorf("failed to create file: %v", err) + return catcher.Error("failed to create file", err, map[string]any{"process": "plugin_com.utmstack.config"}) } + defer func() { + err := file.Close() + if err != nil { + _ = catcher.Error("failed to close file", err, map[string]any{"process": "plugin_com.utmstack.config"}) + } + }() + config := plugins.Config{ Patterns: patterns, } bPatterns, err := k8syaml.Marshal(config) if err != nil { - return fmt.Errorf("failed to marshal patterns: %v", err) + return catcher.Error("failed to marshal patterns", err, map[string]any{"process": "plugin_com.utmstack.config"}) } _, err = file.Write(bPatterns) if err != nil { - return fmt.Errorf("failed to write to file: %v", err) + return catcher.Error("failed to write to file", err, map[string]any{"process": "plugin_com.utmstack.config"}) } err = file.Close() if err != nil { - return fmt.Errorf("failed to close file: %v", err) + return catcher.Error("failed to close file", err, map[string]any{"process": "plugin_com.utmstack.config"}) } return nil diff --git a/plugins/crowdStrike/check.go b/plugins/crowdStrike/check.go index 51c0ab79b..063aa7cd4 100644 --- a/plugins/crowdStrike/check.go +++ b/plugins/crowdStrike/check.go @@ -41,7 +41,7 @@ func checkConnection(url string) error { defer func() { err := resp.Body.Close() if err != nil { - _ = catcher.Error("error closing response body: %v", err, nil) + _ = catcher.Error("error closing response body: %v", err, map[string]any{"process": "plugin_com.utmstack.crowdstrike"}) } }() @@ -55,7 +55,7 @@ func infiniteRetryIfXError(f func() error, exception string) error { err := f() if err != nil && is(err, exception) { if !xErrorWasLogged { - _ = catcher.Error("An error occurred (%s), will keep retrying indefinitely...", err, nil) + _ = catcher.Error("An error occurred (%s), will keep retrying indefinitely...", err, map[string]any{"process": "plugin_com.utmstack.crowdstrike"}) xErrorWasLogged = true } time.Sleep(wait) diff --git a/plugins/crowdStrike/config/config.go b/plugins/crowdStrike/config/config.go index b555f9be6..272f15def 100644 --- a/plugins/crowdStrike/config/config.go +++ b/plugins/crowdStrike/config/config.go @@ -43,7 +43,7 @@ func StartConfigurationSystem() { for { pluginConfig := plugins.PluginCfg("com.utmstack", false) if !pluginConfig.Exists() { - _ = catcher.Error("plugin configuration not found", nil, nil) + _ = catcher.Error("plugin configuration not found", nil, map[string]any{"process": "plugin_com.utmstack.crowdstrike"}) time.Sleep(reconnectDelay) continue } @@ -69,7 +69,7 @@ func StartConfigurationSystem() { ) if err != nil { - catcher.Error("Failed to connect to server", err, nil) + catcher.Error("Failed to connect to server", err, map[string]any{"process": "plugin_com.utmstack.crowdstrike"}) cancel() time.Sleep(reconnectDelay) continue @@ -77,7 +77,7 @@ func StartConfigurationSystem() { state := conn.GetState() if state == connectivity.Shutdown || state == connectivity.TransientFailure { - catcher.Error("Connection is in shutdown or transient failure state", nil, nil) + catcher.Error("Connection is in shutdown or transient failure state", nil, map[string]any{"process": "plugin_com.utmstack.crowdstrike"}) cancel() time.Sleep(reconnectDelay) continue @@ -86,7 +86,7 @@ func StartConfigurationSystem() { client := NewConfigServiceClient(conn) stream, err := client.StreamConfig(ctx) if err != nil { - catcher.Error("Failed to create stream", err, nil) + catcher.Error("Failed to create stream", err, map[string]any{"process": "plugin_com.utmstack.crowdstrike"}) conn.Close() cancel() time.Sleep(reconnectDelay) @@ -99,7 +99,7 @@ func StartConfigurationSystem() { }, }) if err != nil { - catcher.Error("Failed to send PluginInit", err, nil) + catcher.Error("Failed to send PluginInit", err, map[string]any{"process": "plugin_com.utmstack.crowdstrike"}) conn.Close() cancel() time.Sleep(reconnectDelay) @@ -110,7 +110,7 @@ func StartConfigurationSystem() { in, err := stream.Recv() if err != nil { if strings.Contains(err.Error(), "EOF") { - catcher.Info("Stream closed by server, reconnecting...", nil) + catcher.Info("Stream closed by server, reconnecting...", map[string]any{"process": "plugin_com.utmstack.crowdstrike"}) conn.Close() cancel() time.Sleep(reconnectDelay) @@ -118,13 +118,13 @@ func StartConfigurationSystem() { } st, ok := status.FromError(err) if ok && (st.Code() == codes.Unavailable || st.Code() == codes.Canceled) { - catcher.Error("Stream error: "+st.Message(), err, nil) + catcher.Error("Stream error: "+st.Message(), err, map[string]any{"process": "plugin_com.utmstack.crowdstrike"}) conn.Close() cancel() time.Sleep(reconnectDelay) break } else { - catcher.Error("Stream receive error", err, nil) + catcher.Error("Stream receive error", err, map[string]any{"process": "plugin_com.utmstack.crowdstrike"}) time.Sleep(reconnectDelay) continue } @@ -132,7 +132,7 @@ func StartConfigurationSystem() { switch message := in.Payload.(type) { case *BiDirectionalMessage_Config: - catcher.Info("Received configuration update", map[string]any{"config": message.Config}) + catcher.Info("Received configuration update", map[string]any{"config": message.Config, "process": "plugin_com.utmstack.crowdstrike"}) cnf = message.Config } } diff --git a/plugins/crowdStrike/go.mod b/plugins/crowdStrike/go.mod index 23d78a06f..ad1e00582 100644 --- a/plugins/crowdStrike/go.mod +++ b/plugins/crowdStrike/go.mod @@ -1,57 +1,58 @@ module github.com/utmstack/UTMStack/plugins/crowdStrike -go 1.24.6 +go 1.25.5 require ( - github.com/crowdstrike/gofalcon v0.16.0 + github.com/crowdstrike/gofalcon v0.19.0 github.com/google/uuid v1.6.0 - github.com/threatwinds/go-sdk v1.0.45 - google.golang.org/grpc v1.76.0 - google.golang.org/protobuf v1.36.10 + github.com/threatwinds/go-sdk v1.1.7 + google.golang.org/grpc v1.78.0 + google.golang.org/protobuf v1.36.11 ) require ( - cel.dev/expr v0.24.0 // indirect + cel.dev/expr v0.25.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/bytedance/gopkg v0.1.3 // indirect - github.com/bytedance/sonic v1.14.1 // indirect - github.com/bytedance/sonic/loader v0.3.0 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cloudwego/base64x v0.1.6 // indirect - github.com/gabriel-vasile/mimetype v1.4.10 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect github.com/gin-contrib/sse v1.1.0 // indirect github.com/gin-gonic/gin v1.11.0 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-openapi/analysis v0.24.0 // indirect - github.com/go-openapi/errors v0.22.3 // indirect - github.com/go-openapi/jsonpointer v0.22.1 // indirect - github.com/go-openapi/jsonreference v0.21.2 // indirect - github.com/go-openapi/loads v0.23.1 // indirect - github.com/go-openapi/runtime v0.29.0 // indirect - github.com/go-openapi/spec v0.22.0 // indirect - github.com/go-openapi/strfmt v0.24.0 // indirect - github.com/go-openapi/swag v0.25.1 // indirect - github.com/go-openapi/swag/cmdutils v0.25.1 // indirect - github.com/go-openapi/swag/conv v0.25.1 // indirect - github.com/go-openapi/swag/fileutils v0.25.1 // indirect - github.com/go-openapi/swag/jsonname v0.25.1 // indirect - github.com/go-openapi/swag/jsonutils v0.25.1 // indirect - github.com/go-openapi/swag/loading v0.25.1 // indirect - github.com/go-openapi/swag/mangling v0.25.1 // indirect - github.com/go-openapi/swag/netutils v0.25.1 // indirect - github.com/go-openapi/swag/stringutils v0.25.1 // indirect - github.com/go-openapi/swag/typeutils v0.25.1 // indirect - github.com/go-openapi/swag/yamlutils v0.25.1 // indirect - github.com/go-openapi/validate v0.25.0 // indirect + github.com/go-openapi/analysis v0.24.2 // indirect + github.com/go-openapi/errors v0.22.6 // indirect + github.com/go-openapi/jsonpointer v0.22.4 // indirect + github.com/go-openapi/jsonreference v0.21.4 // indirect + github.com/go-openapi/loads v0.23.2 // indirect + github.com/go-openapi/runtime v0.29.2 // indirect + github.com/go-openapi/spec v0.22.3 // indirect + github.com/go-openapi/strfmt v0.25.0 // indirect + github.com/go-openapi/swag v0.25.4 // indirect + github.com/go-openapi/swag/cmdutils v0.25.4 // indirect + github.com/go-openapi/swag/conv v0.25.4 // indirect + github.com/go-openapi/swag/fileutils v0.25.4 // indirect + github.com/go-openapi/swag/jsonname v0.25.4 // indirect + github.com/go-openapi/swag/jsonutils v0.25.4 // indirect + github.com/go-openapi/swag/loading v0.25.4 // indirect + github.com/go-openapi/swag/mangling v0.25.4 // indirect + github.com/go-openapi/swag/netutils v0.25.4 // indirect + github.com/go-openapi/swag/stringutils v0.25.4 // indirect + github.com/go-openapi/swag/typeutils v0.25.4 // indirect + github.com/go-openapi/swag/yamlutils v0.25.4 // indirect + github.com/go-openapi/validate v0.25.1 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.28.0 // indirect - github.com/go-viper/mapstructure/v2 v2.4.0 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect + github.com/go-viper/mapstructure/v2 v2.5.0 // indirect github.com/goccy/go-json v0.10.5 // indirect - github.com/goccy/go-yaml v1.18.0 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect github.com/google/cel-go v0.26.1 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect @@ -59,36 +60,34 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/oklog/ulid v1.3.1 // indirect + github.com/opensearch-project/opensearch-go/v4 v4.6.0 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect - github.com/quic-go/qpack v0.5.1 // indirect - github.com/quic-go/quic-go v0.54.0 // indirect - github.com/sirupsen/logrus v1.9.3 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect + github.com/sirupsen/logrus v1.9.4 // indirect github.com/stoewer/go-strcase v1.3.1 // indirect github.com/tidwall/gjson v1.18.0 // indirect github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.3.0 // indirect - go.mongodb.org/mongo-driver v1.17.4 // indirect + github.com/ugorji/go/codec v1.3.1 // indirect + go.mongodb.org/mongo-driver v1.17.6 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect - go.opentelemetry.io/otel v1.38.0 // indirect - go.opentelemetry.io/otel/metric v1.38.0 // indirect - go.opentelemetry.io/otel/trace v1.38.0 // indirect - go.uber.org/mock v0.5.0 // indirect + go.opentelemetry.io/otel v1.39.0 // indirect + go.opentelemetry.io/otel/metric v1.39.0 // indirect + go.opentelemetry.io/otel/trace v1.39.0 // indirect go.yaml.in/yaml/v2 v2.4.3 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/arch v0.22.0 // indirect - golang.org/x/crypto v0.43.0 // indirect - golang.org/x/exp v0.0.0-20251009144603-d2f985daa21b // indirect - golang.org/x/mod v0.29.0 // indirect - golang.org/x/net v0.46.0 // indirect - golang.org/x/oauth2 v0.32.0 // indirect - golang.org/x/sync v0.17.0 // indirect - golang.org/x/sys v0.37.0 // indirect - golang.org/x/text v0.30.0 // indirect - golang.org/x/tools v0.38.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20251007200510-49b9836ed3ff // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20251007200510-49b9836ed3ff // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/oauth2 v0.34.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/plugins/crowdStrike/go.sum b/plugins/crowdStrike/go.sum index 78e7d37fa..997dfbd89 100644 --- a/plugins/crowdStrike/go.sum +++ b/plugins/crowdStrike/go.sum @@ -1,26 +1,27 @@ -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= -github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= -github.com/bytedance/sonic v1.14.1 h1:FBMC0zVz5XUmE4z9wF4Jey0An5FueFvOsTKKKtwIl7w= -github.com/bytedance/sonic v1.14.1/go.mod h1:gi6uhQLMbTdeP0muCnrjHLeCUPyb70ujhnNlhOylAFc= -github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= -github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= -github.com/crowdstrike/gofalcon v0.16.0 h1:qwJdoYZ2OXEzArZZNrIwhOO2aFr1uL6SbxprWLjsbO4= -github.com/crowdstrike/gofalcon v0.16.0/go.mod h1:a12GB+md+hRSgVCb3Pv6CakeTIsDIUCIVWRlJelIhY0= +github.com/crowdstrike/gofalcon v0.19.0 h1:pKvA8Az85wD6OR7aq/tvc+tORtR5CSyKp3+LDQXc4pc= +github.com/crowdstrike/gofalcon v0.19.0/go.mod h1:a12GB+md+hRSgVCb3Pv6CakeTIsDIUCIVWRlJelIhY0= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gabriel-vasile/mimetype v1.4.10 h1:zyueNbySn/z8mJZHLt6IPw0KoZsiQNszIpU+bX4+ZK0= -github.com/gabriel-vasile/mimetype v1.4.10/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= @@ -30,64 +31,68 @@ github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-openapi/analysis v0.24.0 h1:vE/VFFkICKyYuTWYnplQ+aVr45vlG6NcZKC7BdIXhsA= -github.com/go-openapi/analysis v0.24.0/go.mod h1:GLyoJA+bvmGGaHgpfeDh8ldpGo69fAJg7eeMDMRCIrw= -github.com/go-openapi/errors v0.22.3 h1:k6Hxa5Jg1TUyZnOwV2Lh81j8ayNw5VVYLvKrp4zFKFs= -github.com/go-openapi/errors v0.22.3/go.mod h1:+WvbaBBULWCOna//9B9TbLNGSFOfF8lY9dw4hGiEiKQ= -github.com/go-openapi/jsonpointer v0.22.1 h1:sHYI1He3b9NqJ4wXLoJDKmUmHkWy/L7rtEo92JUxBNk= -github.com/go-openapi/jsonpointer v0.22.1/go.mod h1:pQT9OsLkfz1yWoMgYFy4x3U5GY5nUlsOn1qSBH5MkCM= -github.com/go-openapi/jsonreference v0.21.2 h1:Wxjda4M/BBQllegefXrY/9aq1fxBA8sI5M/lFU6tSWU= -github.com/go-openapi/jsonreference v0.21.2/go.mod h1:pp3PEjIsJ9CZDGCNOyXIQxsNuroxm8FAJ/+quA0yKzQ= -github.com/go-openapi/loads v0.23.1 h1:H8A0dX2KDHxDzc797h0+uiCZ5kwE2+VojaQVaTlXvS0= -github.com/go-openapi/loads v0.23.1/go.mod h1:hZSXkyACCWzWPQqizAv/Ye0yhi2zzHwMmoXQ6YQml44= -github.com/go-openapi/runtime v0.29.0 h1:Y7iDTFarS9XaFQ+fA+lBLngMwH6nYfqig1G+pHxMRO0= -github.com/go-openapi/runtime v0.29.0/go.mod h1:52HOkEmLL/fE4Pg3Kf9nxc9fYQn0UsIWyGjGIJE9dkg= -github.com/go-openapi/spec v0.22.0 h1:xT/EsX4frL3U09QviRIZXvkh80yibxQmtoEvyqug0Tw= -github.com/go-openapi/spec v0.22.0/go.mod h1:K0FhKxkez8YNS94XzF8YKEMULbFrRw4m15i2YUht4L0= -github.com/go-openapi/strfmt v0.24.0 h1:dDsopqbI3wrrlIzeXRbqMihRNnjzGC+ez4NQaAAJLuc= -github.com/go-openapi/strfmt v0.24.0/go.mod h1:Lnn1Bk9rZjXxU9VMADbEEOo7D7CDyKGLsSKekhFr7s4= -github.com/go-openapi/swag v0.25.1 h1:6uwVsx+/OuvFVPqfQmOOPsqTcm5/GkBhNwLqIR916n8= -github.com/go-openapi/swag v0.25.1/go.mod h1:bzONdGlT0fkStgGPd3bhZf1MnuPkf2YAys6h+jZipOo= -github.com/go-openapi/swag/cmdutils v0.25.1 h1:nDke3nAFDArAa631aitksFGj2omusks88GF1VwdYqPY= -github.com/go-openapi/swag/cmdutils v0.25.1/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= -github.com/go-openapi/swag/conv v0.25.1 h1:+9o8YUg6QuqqBM5X6rYL/p1dpWeZRhoIt9x7CCP+he0= -github.com/go-openapi/swag/conv v0.25.1/go.mod h1:Z1mFEGPfyIKPu0806khI3zF+/EUXde+fdeksUl2NiDs= -github.com/go-openapi/swag/fileutils v0.25.1 h1:rSRXapjQequt7kqalKXdcpIegIShhTPXx7yw0kek2uU= -github.com/go-openapi/swag/fileutils v0.25.1/go.mod h1:+NXtt5xNZZqmpIpjqcujqojGFek9/w55b3ecmOdtg8M= -github.com/go-openapi/swag/jsonname v0.25.1 h1:Sgx+qbwa4ej6AomWC6pEfXrA6uP2RkaNjA9BR8a1RJU= -github.com/go-openapi/swag/jsonname v0.25.1/go.mod h1:71Tekow6UOLBD3wS7XhdT98g5J5GR13NOTQ9/6Q11Zo= -github.com/go-openapi/swag/jsonutils v0.25.1 h1:AihLHaD0brrkJoMqEZOBNzTLnk81Kg9cWr+SPtxtgl8= -github.com/go-openapi/swag/jsonutils v0.25.1/go.mod h1:JpEkAjxQXpiaHmRO04N1zE4qbUEg3b7Udll7AMGTNOo= -github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.1 h1:DSQGcdB6G0N9c/KhtpYc71PzzGEIc/fZ1no35x4/XBY= -github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.1/go.mod h1:kjmweouyPwRUEYMSrbAidoLMGeJ5p6zdHi9BgZiqmsg= -github.com/go-openapi/swag/loading v0.25.1 h1:6OruqzjWoJyanZOim58iG2vj934TysYVptyaoXS24kw= -github.com/go-openapi/swag/loading v0.25.1/go.mod h1:xoIe2EG32NOYYbqxvXgPzne989bWvSNoWoyQVWEZicc= -github.com/go-openapi/swag/mangling v0.25.1 h1:XzILnLzhZPZNtmxKaz/2xIGPQsBsvmCjrJOWGNz/ync= -github.com/go-openapi/swag/mangling v0.25.1/go.mod h1:CdiMQ6pnfAgyQGSOIYnZkXvqhnnwOn997uXZMAd/7mQ= -github.com/go-openapi/swag/netutils v0.25.1 h1:2wFLYahe40tDUHfKT1GRC4rfa5T1B4GWZ+msEFA4Fl4= -github.com/go-openapi/swag/netutils v0.25.1/go.mod h1:CAkkvqnUJX8NV96tNhEQvKz8SQo2KF0f7LleiJwIeRE= -github.com/go-openapi/swag/stringutils v0.25.1 h1:Xasqgjvk30eUe8VKdmyzKtjkVjeiXx1Iz0zDfMNpPbw= -github.com/go-openapi/swag/stringutils v0.25.1/go.mod h1:JLdSAq5169HaiDUbTvArA2yQxmgn4D6h4A+4HqVvAYg= -github.com/go-openapi/swag/typeutils v0.25.1 h1:rD/9HsEQieewNt6/k+JBwkxuAHktFtH3I3ysiFZqukA= -github.com/go-openapi/swag/typeutils v0.25.1/go.mod h1:9McMC/oCdS4BKwk2shEB7x17P6HmMmA6dQRtAkSnNb8= -github.com/go-openapi/swag/yamlutils v0.25.1 h1:mry5ez8joJwzvMbaTGLhw8pXUnhDK91oSJLDPF1bmGk= -github.com/go-openapi/swag/yamlutils v0.25.1/go.mod h1:cm9ywbzncy3y6uPm/97ysW8+wZ09qsks+9RS8fLWKqg= -github.com/go-openapi/validate v0.25.0 h1:JD9eGX81hDTjoY3WOzh6WqxVBVl7xjsLnvDo1GL5WPU= -github.com/go-openapi/validate v0.25.0/go.mod h1:SUY7vKrN5FiwK6LyvSwKjDfLNirSfWwHNgxd2l29Mmw= +github.com/go-openapi/analysis v0.24.2 h1:6p7WXEuKy1llDgOH8FooVeO+Uq2za9qoAOq4ZN08B50= +github.com/go-openapi/analysis v0.24.2/go.mod h1:x27OOHKANE0lutg2ml4kzYLoHGMKgRm1Cj2ijVOjJuE= +github.com/go-openapi/errors v0.22.6 h1:eDxcf89O8odEnohIXwEjY1IB4ph5vmbUsBMsFNwXWPo= +github.com/go-openapi/errors v0.22.6/go.mod h1:z9S8ASTUqx7+CP1Q8dD8ewGH/1JWFFLX/2PmAYNQLgk= +github.com/go-openapi/jsonpointer v0.22.4 h1:dZtK82WlNpVLDW2jlA1YCiVJFVqkED1MegOUy9kR5T4= +github.com/go-openapi/jsonpointer v0.22.4/go.mod h1:elX9+UgznpFhgBuaMQ7iu4lvvX1nvNsesQ3oxmYTw80= +github.com/go-openapi/jsonreference v0.21.4 h1:24qaE2y9bx/q3uRK/qN+TDwbok1NhbSmGjjySRCHtC8= +github.com/go-openapi/jsonreference v0.21.4/go.mod h1:rIENPTjDbLpzQmQWCj5kKj3ZlmEh+EFVbz3RTUh30/4= +github.com/go-openapi/loads v0.23.2 h1:rJXAcP7g1+lWyBHC7iTY+WAF0rprtM+pm8Jxv1uQJp4= +github.com/go-openapi/loads v0.23.2/go.mod h1:IEVw1GfRt/P2Pplkelxzj9BYFajiWOtY2nHZNj4UnWY= +github.com/go-openapi/runtime v0.29.2 h1:UmwSGWNmWQqKm1c2MGgXVpC2FTGwPDQeUsBMufc5Yj0= +github.com/go-openapi/runtime v0.29.2/go.mod h1:biq5kJXRJKBJxTDJXAa00DOTa/anflQPhT0/wmjuy+0= +github.com/go-openapi/spec v0.22.3 h1:qRSmj6Smz2rEBxMnLRBMeBWxbbOvuOoElvSvObIgwQc= +github.com/go-openapi/spec v0.22.3/go.mod h1:iIImLODL2loCh3Vnox8TY2YWYJZjMAKYyLH2Mu8lOZs= +github.com/go-openapi/strfmt v0.25.0 h1:7R0RX7mbKLa9EYCTHRcCuIPcaqlyQiWNPTXwClK0saQ= +github.com/go-openapi/strfmt v0.25.0/go.mod h1:nNXct7OzbwrMY9+5tLX4I21pzcmE6ccMGXl3jFdPfn8= +github.com/go-openapi/swag v0.25.4 h1:OyUPUFYDPDBMkqyxOTkqDYFnrhuhi9NR6QVUvIochMU= +github.com/go-openapi/swag v0.25.4/go.mod h1:zNfJ9WZABGHCFg2RnY0S4IOkAcVTzJ6z2Bi+Q4i6qFQ= +github.com/go-openapi/swag/cmdutils v0.25.4 h1:8rYhB5n6WawR192/BfUu2iVlxqVR9aRgGJP6WaBoW+4= +github.com/go-openapi/swag/cmdutils v0.25.4/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= +github.com/go-openapi/swag/conv v0.25.4 h1:/Dd7p0LZXczgUcC/Ikm1+YqVzkEeCc9LnOWjfkpkfe4= +github.com/go-openapi/swag/conv v0.25.4/go.mod h1:3LXfie/lwoAv0NHoEuY1hjoFAYkvlqI/Bn5EQDD3PPU= +github.com/go-openapi/swag/fileutils v0.25.4 h1:2oI0XNW5y6UWZTC7vAxC8hmsK/tOkWXHJQH4lKjqw+Y= +github.com/go-openapi/swag/fileutils v0.25.4/go.mod h1:cdOT/PKbwcysVQ9Tpr0q20lQKH7MGhOEb6EwmHOirUk= +github.com/go-openapi/swag/jsonname v0.25.4 h1:bZH0+MsS03MbnwBXYhuTttMOqk+5KcQ9869Vye1bNHI= +github.com/go-openapi/swag/jsonname v0.25.4/go.mod h1:GPVEk9CWVhNvWhZgrnvRA6utbAltopbKwDu8mXNUMag= +github.com/go-openapi/swag/jsonutils v0.25.4 h1:VSchfbGhD4UTf4vCdR2F4TLBdLwHyUDTd1/q4i+jGZA= +github.com/go-openapi/swag/jsonutils v0.25.4/go.mod h1:7OYGXpvVFPn4PpaSdPHJBtF0iGnbEaTk8AvBkoWnaAY= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.4 h1:IACsSvBhiNJwlDix7wq39SS2Fh7lUOCJRmx/4SN4sVo= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.4/go.mod h1:Mt0Ost9l3cUzVv4OEZG+WSeoHwjWLnarzMePNDAOBiM= +github.com/go-openapi/swag/loading v0.25.4 h1:jN4MvLj0X6yhCDduRsxDDw1aHe+ZWoLjW+9ZQWIKn2s= +github.com/go-openapi/swag/loading v0.25.4/go.mod h1:rpUM1ZiyEP9+mNLIQUdMiD7dCETXvkkC30z53i+ftTE= +github.com/go-openapi/swag/mangling v0.25.4 h1:2b9kBJk9JvPgxr36V23FxJLdwBrpijI26Bx5JH4Hp48= +github.com/go-openapi/swag/mangling v0.25.4/go.mod h1:6dxwu6QyORHpIIApsdZgb6wBk/DPU15MdyYj/ikn0Hg= +github.com/go-openapi/swag/netutils v0.25.4 h1:Gqe6K71bGRb3ZQLusdI8p/y1KLgV4M/k+/HzVSqT8H0= +github.com/go-openapi/swag/netutils v0.25.4/go.mod h1:m2W8dtdaoX7oj9rEttLyTeEFFEBvnAx9qHd5nJEBzYg= +github.com/go-openapi/swag/stringutils v0.25.4 h1:O6dU1Rd8bej4HPA3/CLPciNBBDwZj9HiEpdVsb8B5A8= +github.com/go-openapi/swag/stringutils v0.25.4/go.mod h1:GTsRvhJW5xM5gkgiFe0fV3PUlFm0dr8vki6/VSRaZK0= +github.com/go-openapi/swag/typeutils v0.25.4 h1:1/fbZOUN472NTc39zpa+YGHn3jzHWhv42wAJSN91wRw= +github.com/go-openapi/swag/typeutils v0.25.4/go.mod h1:Ou7g//Wx8tTLS9vG0UmzfCsjZjKhpjxayRKTHXf2pTE= +github.com/go-openapi/swag/yamlutils v0.25.4 h1:6jdaeSItEUb7ioS9lFoCZ65Cne1/RZtPBZ9A56h92Sw= +github.com/go-openapi/swag/yamlutils v0.25.4/go.mod h1:MNzq1ulQu+yd8Kl7wPOut/YHAAU/H6hL91fF+E2RFwc= +github.com/go-openapi/testify/enable/yaml/v2 v2.0.2 h1:0+Y41Pz1NkbTHz8NngxTuAXxEodtNSI1WG1c/m5Akw4= +github.com/go-openapi/testify/enable/yaml/v2 v2.0.2/go.mod h1:kme83333GCtJQHXQ8UKX3IBZu6z8T5Dvy5+CW3NLUUg= +github.com/go-openapi/testify/v2 v2.0.2 h1:X999g3jeLcoY8qctY/c/Z8iBHTbwLz7R2WXd6Ub6wls= +github.com/go-openapi/testify/v2 v2.0.2/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= +github.com/go-openapi/validate v0.25.1 h1:sSACUI6Jcnbo5IWqbYHgjibrhhmt3vR6lCzKZnmAgBw= +github.com/go-openapi/validate v0.25.1/go.mod h1:RMVyVFYte0gbSTaZ0N4KmTn6u/kClvAFp+mAVfS/DQc= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.28.0 h1:Q7ibns33JjyW48gHkuFT91qX48KG0ktULL6FgHdG688= -github.com/go-playground/validator/v10 v10.28.0/go.mod h1:GoI6I1SjPBh9p7ykNE/yj3fFYbyDOpwMn5KXd+m2hUU= -github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= -github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= +github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro= +github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= -github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw= -github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= @@ -97,6 +102,8 @@ github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= @@ -116,32 +123,37 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc= +github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI= -github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg= -github.com/quic-go/quic-go v0.54.0 h1:6s1YB9QotYI6Ospeiguknbp2Znb/jZYjZLRXn9kMQBg= -github.com/quic-go/quic-go v0.54.0/go.mod h1:e68ZEaCdyviluZmy44P6Iey98v/Wfz6HCjQEm+l8zTY= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= +github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -github.com/threatwinds/go-sdk v1.0.45 h1:KZ3s3HviNRrOkg5EqjFnoauANFFzTqjNFyshPLY2SoI= -github.com/threatwinds/go-sdk v1.0.45/go.mod h1:tcWn6r6vqID/W/nL3UKfc5NafA3V/cSkiLvfJnwB58c= +github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo= +github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= @@ -150,62 +162,61 @@ github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JT github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= -github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= -go.mongodb.org/mongo-driver v1.17.4 h1:jUorfmVzljjr0FLzYQsGP8cgN/qzzxlY9Vh0C9KFXVw= -go.mongodb.org/mongo-driver v1.17.4/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ= +github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM= +go.mongodb.org/mongo-driver v1.17.6 h1:87JUG1wZfWsr6rIz3ZmpH90rL5tea7O3IHuSwHUpsss= +go.mongodb.org/mongo-driver v1.17.6/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= -go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= -go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= -go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48= +go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8= +go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0= +go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs= go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= -go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc= -go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= -go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= -go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= -go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= -go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI= +go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/arch v0.22.0 h1:c/Zle32i5ttqRXjdLyyHZESLD/bB90DCU1g9l/0YBDI= -golang.org/x/arch v0.22.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= -golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04= -golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0= -golang.org/x/exp v0.0.0-20251009144603-d2f985daa21b h1:18qgiDvlvH7kk8Ioa8Ov+K6xCi0GMvmGfGW0sgd/SYA= -golang.org/x/exp v0.0.0-20251009144603-d2f985daa21b/go.mod h1:j/pmGrbnkbPtQfxEe5D0VQhZC6qKbfKifgD0oM7sR70= -golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA= -golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w= -golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4= -golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210= -golang.org/x/oauth2 v0.32.0 h1:jsCblLleRMDrxMN29H3z/k1KliIvpLgCkE6R8FXXNgY= -golang.org/x/oauth2 v0.32.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= -golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= -golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= +golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw= +golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ= -golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k= -golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM= -golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ= -golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= -google.golang.org/genproto/googleapis/api v0.0.0-20251007200510-49b9836ed3ff h1:8Zg5TdmcbU8A7CXGjGXF1Slqu/nIFCRaR3S5gT2plIA= -google.golang.org/genproto/googleapis/api v0.0.0-20251007200510-49b9836ed3ff/go.mod h1:dbWfpVPvW/RqafStmRWBUpMN14puDezDMHxNYiRfQu0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20251007200510-49b9836ed3ff h1:A90eA31Wq6HOMIQlLfzFwzqGKBTuaVztYu/g8sn+8Zc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20251007200510-49b9836ed3ff/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= -google.golang.org/grpc v1.76.0 h1:UnVkv1+uMLYXoIz6o7chp59WfQUYA2ex/BXQ9rHZu7A= -google.golang.org/grpc v1.76.0/go.mod h1:Ju12QI8M6iQJtbcsV+awF5a4hfJMLi4X0JLo94ULZ6c= -google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= -google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/plugins/crowdStrike/main.go b/plugins/crowdStrike/main.go index 4211be3ba..e200da211 100644 --- a/plugins/crowdStrike/main.go +++ b/plugins/crowdStrike/main.go @@ -27,7 +27,7 @@ const ( ) func main() { - mode := plugins.GetCfg().Env.Mode + mode := plugins.GetCfg("plugin_com.utmstack.crowdstrike").Env.Mode if mode != "manager" { return } @@ -36,7 +36,7 @@ func main() { for t := 0; t < 2*runtime.NumCPU(); t++ { go func() { - plugins.SendLogsFromChannel() + plugins.SendLogsFromChannel("com.utmstack.crowdstrike") }() } @@ -46,7 +46,7 @@ func main() { for range ticker.C { if err := connectionChecker(urlCheckConnection); err != nil { - _ = catcher.Error("External connection failure detected: %v", err, nil) + _ = catcher.Error("External connection failure detected: %v", err, map[string]any{"process": "plugin_com.utmstack.crowdstrike"}) } moduleConfig := config.GetConfig() @@ -80,7 +80,8 @@ func pullCrowdStrikeEvents(group *config.ModuleGroup) { events, err := processor.getEvents() if err != nil { _ = catcher.Error("cannot get CrowdStrike events", err, map[string]any{ - "group": group.GroupName, + "group": group.GroupName, + "process": "plugin_com.utmstack.crowdstrike", }) return } @@ -93,7 +94,7 @@ func pullCrowdStrikeEvents(group *config.ModuleGroup) { DataSource: group.GroupName, Timestamp: time.Now().UTC().Format(time.RFC3339Nano), Raw: event, - }) + }, "com.utmstack.crowdstrike") } } @@ -125,7 +126,7 @@ func getCrowdStrikeProcessor(group *config.ModuleGroup) CrowdStrikeProcessor { func (p *CrowdStrikeProcessor) createClient() (*client.CrowdStrikeAPISpecification, error) { if p.ClientID == "" || p.ClientSecret == "" { return nil, catcher.Error("cannot create CrowdStrike client", - errors.New("client ID or client secret is empty"), nil) + errors.New("client ID or client secret is empty"), map[string]any{"process": "plugin_com.utmstack.crowdstrike"}) } client, err := falcon.NewClient(&falcon.ApiConfig{ @@ -135,7 +136,7 @@ func (p *CrowdStrikeProcessor) createClient() (*client.CrowdStrikeAPISpecificati Context: context.Background(), }) if err != nil { - return nil, catcher.Error("cannot create CrowdStrike client", err, nil) + return nil, catcher.Error("cannot create CrowdStrike client", err, map[string]any{"process": "plugin_com.utmstack.crowdstrike"}) } return client, nil @@ -159,17 +160,18 @@ func (p *CrowdStrikeProcessor) getEvents() ([]string, error) { }, ) if err != nil { - return nil, catcher.Error("cannot list available streams", err, nil) + return nil, catcher.Error("cannot list available streams", err, map[string]any{"process": "plugin_com.utmstack.crowdstrike"}) } if err = falcon.AssertNoError(response.Payload.Errors); err != nil { - return nil, catcher.Error("CrowdStrike API error", err, nil) + return nil, catcher.Error("CrowdStrike API error", err, map[string]any{"process": "plugin_com.utmstack.crowdstrike"}) } availableStreams := response.Payload.Resources if len(availableStreams) == 0 { _ = catcher.Error("no available streams found", nil, map[string]any{ - "app_id": p.AppName, + "app_id": p.AppName, + "process": "plugin_com.utmstack.crowdstrike", }) return []string{}, nil } @@ -179,7 +181,8 @@ func (p *CrowdStrikeProcessor) getEvents() ([]string, error) { streamEvents, err := p.getStreamEvents(ctx, client, availableStream) if err != nil { _ = catcher.Error("cannot get stream events", err, map[string]any{ - "stream": availableStream, + "stream": availableStream, + "process": "plugin_com.utmstack.crowdstrike", }) continue } @@ -192,12 +195,12 @@ func (p *CrowdStrikeProcessor) getEvents() ([]string, error) { func (p *CrowdStrikeProcessor) getStreamEvents(ctx context.Context, client *client.CrowdStrikeAPISpecification, availableStream interface{}) ([]string, error) { stream_v2, ok := availableStream.(*models.MainAvailableStreamV2) if !ok { - return nil, catcher.Error("invalid stream type", fmt.Errorf("cannot convert to MainAvailableStreamV2"), nil) + return nil, catcher.Error("invalid stream type", fmt.Errorf("cannot convert to MainAvailableStreamV2"), map[string]any{"process": "plugin_com.utmstack.crowdstrike"}) } stream, err := falcon.NewStream(ctx, client, p.AppName, stream_v2, 0) if err != nil { - return nil, catcher.Error("cannot create stream", err, nil) + return nil, catcher.Error("cannot create stream", err, map[string]any{"process": "plugin_com.utmstack.crowdstrike"}) } defer stream.Close() @@ -209,14 +212,14 @@ func (p *CrowdStrikeProcessor) getStreamEvents(ctx context.Context, client *clie select { case err := <-stream.Errors: if err.Fatal { - return events, catcher.Error("fatal stream error", err.Err, nil) + return events, catcher.Error("fatal stream error", err.Err, map[string]any{"process": "plugin_com.utmstack.crowdstrike"}) } else { - _ = catcher.Error("stream error", err.Err, nil) + _ = catcher.Error("stream error", err.Err, map[string]any{"process": "plugin_com.utmstack.crowdstrike"}) } case event := <-stream.Events: eventJSON, err := json.Marshal(event) if err != nil { - _ = catcher.Error("cannot marshal event", err, nil) + _ = catcher.Error("cannot marshal event", err, map[string]any{"process": "crowdstrike-plugin"}) continue } events = append(events, string(eventJSON)) diff --git a/plugins/events/go.mod b/plugins/events/go.mod index f28b435b4..8c0b2dbf2 100644 --- a/plugins/events/go.mod +++ b/plugins/events/go.mod @@ -1,52 +1,56 @@ module github.com/utmstack/UTMStack/plugins/events -go 1.24.2 +go 1.25.5 require ( - github.com/threatwinds/go-sdk v1.0.43 + github.com/threatwinds/go-sdk v1.1.7 github.com/tidwall/gjson v1.18.0 - google.golang.org/grpc v1.74.2 ) require ( - cel.dev/expr v0.24.0 // indirect + cel.dev/expr v0.25.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/bytedance/sonic v1.14.0 // indirect - github.com/bytedance/sonic/loader v0.3.0 // indirect - github.com/cloudwego/base64x v0.1.5 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/bytedance/gopkg v0.1.3 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect github.com/gin-contrib/sse v1.1.0 // indirect - github.com/gin-gonic/gin v1.10.1 // indirect + github.com/gin-gonic/gin v1.11.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.27.0 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect github.com/goccy/go-json v0.10.5 // indirect - github.com/google/cel-go v0.26.0 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect + github.com/google/cel-go v0.26.1 // indirect github.com/google/uuid v1.6.0 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect - github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/opensearch-project/opensearch-go/v2 v2.3.0 // indirect + github.com/opensearch-project/opensearch-go/v4 v4.6.0 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect github.com/stoewer/go-strcase v1.3.1 // indirect - github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.3.0 // indirect - go.yaml.in/yaml/v2 v2.4.2 // indirect - golang.org/x/arch v0.19.0 // indirect - golang.org/x/crypto v0.40.0 // indirect - golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 // indirect - golang.org/x/net v0.42.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/text v0.27.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/protobuf v1.36.6 // indirect + github.com/ugorji/go/codec v1.3.1 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/grpc v1.78.0 // indirect + google.golang.org/protobuf v1.36.11 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - sigs.k8s.io/yaml v1.5.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/plugins/events/go.sum b/plugins/events/go.sum index 76d128924..605fc201b 100644 --- a/plugins/events/go.sum +++ b/plugins/events/go.sum @@ -1,38 +1,25 @@ -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/aws/aws-sdk-go v1.44.263/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= -github.com/aws/aws-sdk-go-v2/config v1.18.25/go.mod h1:dZnYpD5wTW/dQF0rRNLVypB396zWCcPiBIvdvSWHEg4= -github.com/aws/aws-sdk-go-v2/credentials v1.13.24/go.mod h1:jYPYi99wUOPIFi0rhiOvXeSEReVOzBqFNOX5bXYoG2o= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34/go.mod h1:Etz2dj6UHYuw+Xw830KfzCfWGMzqvUTCjUj5b76GVDc= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw= -github.com/aws/aws-sdk-go-v2/service/sso v1.12.10/go.mod h1:ouy2P4z6sJN70fR3ka3wD3Ro3KezSxU6eKGQI2+2fjI= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk= -github.com/aws/aws-sdk-go-v2/service/sts v1.19.0/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8= -github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= -github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= -github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= +github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= -github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= -github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -43,28 +30,27 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= -github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -78,116 +64,97 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/opensearch-project/opensearch-go/v2 v2.3.0 h1:nQIEMr+A92CkhHrZgUhcfsrZjibvB3APXf2a1VwCmMQ= -github.com/opensearch-project/opensearch-go/v2 v2.3.0/go.mod h1:8LDr9FCgUTVoT+5ESjc2+iaZuldqE+23Iq0r1XeNue8= +github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc= +github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/threatwinds/go-sdk v1.0.43 h1:q2Pl0DvmFpeBCs5sZRcsG1oDn2zIoIB5vHwcJ/VDgD8= -github.com/threatwinds/go-sdk v1.0.43/go.mod h1:S0R7kQj2BsTgaYnX6eZ3keEFRy9yt4f9SCEKYMJzD6g= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo= +github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= +github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= -github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= -go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= -go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= -go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= -go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= -go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= -go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= -go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= -golang.org/x/arch v0.19.0 h1:LmbDQUodHThXE+htjrnmVD73M//D9GTH6wFZjyDkjyU= -golang.org/x/arch v0.19.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 h1:R9PFI6EUdfVKgwKjZef7QIwGcBKu86OEFpJ9nUEP2l4= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ= +github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 h1:mVXdvnmR3S3BQOqHECm9NGMjYiRtEvDYcqAqedTXY6s= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 h1:qJW29YvkiJmXOYMu5Tf8lyrTp3dOS+K4z6IixtLaCf8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ= -sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/plugins/events/main.go b/plugins/events/main.go index 005e82d9b..d08f63c45 100644 --- a/plugins/events/main.go +++ b/plugins/events/main.go @@ -1,126 +1,30 @@ package main import ( - "github.com/threatwinds/go-sdk/catcher" - "github.com/threatwinds/go-sdk/plugins" - "github.com/threatwinds/go-sdk/utils" "io" - "net" "os" - "time" - "google.golang.org/grpc" + "github.com/threatwinds/go-sdk/catcher" + "github.com/threatwinds/go-sdk/plugins" + "github.com/threatwinds/go-sdk/utils" ) -type analysisServer struct { - plugins.UnimplementedAnalysisServer -} - func main() { - // Retry logic for initialization - maxRetries := 3 - retryDelay := 2 * time.Second - - // Initialize with retry logic instead of exiting - var filePath utils.Folder - var err error - var socketPath string - var unixAddress *net.UnixAddr - var listener *net.UnixListener - - // Retry loop for creating socket directory - for retry := 0; retry < maxRetries; retry++ { - filePath, err = utils.MkdirJoin(plugins.WorkDir, "sockets") - if err == nil { - break - } - - _ = catcher.Error("cannot create socket directory, retrying", err, map[string]any{ - "retry": retry + 1, - "maxRetries": maxRetries, - }) - - if retry < maxRetries-1 { - time.Sleep(retryDelay) - // Increase delay for next retry - retryDelay *= 2 - } else { - // If all retries failed, log the error and return - _ = catcher.Error("all retries failed when creating socket directory", err, nil) - return - } - } - - socketPath = filePath.FileJoin("com.utmstack.events_analysis.sock") - _ = os.Remove(socketPath) - - // Retry loop for resolving unix address - retryDelay = 2 * time.Second - for retry := 0; retry < maxRetries; retry++ { - unixAddress, err = net.ResolveUnixAddr("unix", socketPath) - if err == nil { - break - } - - _ = catcher.Error("cannot resolve unix address, retrying", err, map[string]any{ - "retry": retry + 1, - "maxRetries": maxRetries, - }) - - if retry < maxRetries-1 { - time.Sleep(retryDelay) - // Increase delay for next retry - retryDelay *= 2 - } else { - // If all retries failed, log the error and return - _ = catcher.Error("all retries failed when resolving unix address", err, nil) - return - } - } - startQueue() - // Retry loop for listening to unix socket - retryDelay = 2 * time.Second - for retry := 0; retry < maxRetries; retry++ { - listener, err = net.ListenUnix("unix", unixAddress) - if err == nil { - break - } - - _ = catcher.Error("cannot listen to unix socket, retrying", err, map[string]any{ - "retry": retry + 1, - "maxRetries": maxRetries, + err := plugins.InitAnalysisPlugin("com.utmstack.events", analyze) + if err != nil { + _ = catcher.Error("failed to start analysis plugin", err, map[string]any{ + "process": "plugin_com.utmstack.events", }) - - if retry < maxRetries-1 { - time.Sleep(retryDelay) - // Increase delay for next retry - retryDelay *= 2 - } else { - // If all retries failed, log the error and return - _ = catcher.Error("all retries failed when listening to unix socket", err, nil) - return - } - } - - grpcServer := grpc.NewServer() - plugins.RegisterAnalysisServer(grpcServer, &analysisServer{}) - - // Serve with error handling - if err := grpcServer.Serve(listener); err != nil { - _ = catcher.Error("cannot serve grpc", err, nil) - // Instead of exiting, restart the main function - time.Sleep(5 * time.Second) - go main() - return + os.Exit(1) } } -func (p *analysisServer) Analyze(event *plugins.Event, _ grpc.ServerStreamingServer[plugins.Alert]) error { - jLog, err := utils.ToString(event) +func analyze(event *plugins.Event, _ plugins.Analysis_AnalyzeServer) error { + jLog, err := utils.ProtoMessageToString(event) if err != nil { - return catcher.Error("cannot convert event to json", err, nil) + return catcher.Error("cannot convert event to json", err, map[string]any{"process": "plugin_com.utmstack.events"}) } addToQueue(*jLog) diff --git a/plugins/events/queue.go b/plugins/events/queue.go index f857e2f36..81ab8f606 100644 --- a/plugins/events/queue.go +++ b/plugins/events/queue.go @@ -1,16 +1,14 @@ package main import ( - "context" "fmt" "runtime" - "sync" "time" "github.com/threatwinds/go-sdk/catcher" "github.com/threatwinds/go-sdk/plugins" - "github.com/threatwinds/go-sdk/opensearch" + sdkos "github.com/threatwinds/go-sdk/os" "github.com/tidwall/gjson" ) @@ -19,7 +17,8 @@ var logs = make(chan string, 100*runtime.NumCPU()) func addToQueue(l string) { if len(logs) >= 100*runtime.NumCPU() { _ = catcher.Error("cannot enqueue log", fmt.Errorf("queue is full"), map[string]any{ - "queue": "logs", + "process": "plugin_com.utmstack.events", + "queue": "logs", }) return @@ -34,14 +33,15 @@ func startQueue() { retryDelay := 2 * time.Second for retry := 0; retry < maxRetries; retry++ { - osUrl := plugins.PluginCfg("com.utmstack", false).Get("opensearch").String() + osUrl := plugins.PluginCfg("org.opensearch", false).Get("opensearch").String() - err := opensearch.Connect([]string{osUrl}) + err := sdkos.Connect([]string{osUrl}, "", "") if err == nil { break } _ = catcher.Error("cannot connect to OpenSearch, retrying", err, map[string]any{ + "process": "plugin_com.utmstack.events", "retry": retry + 1, "maxRetries": maxRetries, }) @@ -52,54 +52,34 @@ func startQueue() { retryDelay *= 2 } else { // If all retries failed, log the error and return - _ = catcher.Error("all retries failed when connecting to OpenSearch", err, nil) + _ = catcher.Error("all retries failed when connecting to OpenSearch", err, map[string]any{"process": "plugin_com.utmstack.events"}) return } } + queue := sdkos.NewBulkQueue("plugin_com.utmstack.events", sdkos.BulkQueueConfig{ + FlushInterval: 10 * time.Second, + FlushThreshold: 50, + MaxRetries: 0, + RetryDelay: time.Second, + }) + numCPU := runtime.NumCPU() * 2 for i := 0; i < numCPU; i++ { go func() { - var ndMutex = &sync.Mutex{} - var nd = make([]opensearch.BulkItem, 0, 10) - - go func() { - for { - if len(nd) == 0 { - time.Sleep(10 * time.Second) - continue - } - - ndMutex.Lock() - - err := opensearch.Bulk(context.Background(), nd) - if err != nil { - _ = catcher.Error("failed to send logs to OpenSearch", err, nil) - } - - nd = make([]opensearch.BulkItem, 0, 10) - - ndMutex.Unlock() - } - }() - for { l := <-logs dataType := gjson.Get(l, "dataType").String() id := gjson.Get(l, "id").String() - index := opensearch.BuildCurrentIndex("v11", "log", dataType) + index := sdkos.BuildCurrentIndex("v11", "log", dataType) - ndMutex.Lock() - - nd = append(nd, opensearch.BulkItem{ - Index: index, - Id: id, - Body: []byte(l), - Action: "index", + queue.AddItem(sdkos.BulkItem{ + Index: index, + DocumentID: id, + Document: []byte(l), + Operation: "index", }) - - ndMutex.Unlock() } }() } diff --git a/plugins/gcp/check.go b/plugins/gcp/check.go index 2fbefd961..38250b769 100644 --- a/plugins/gcp/check.go +++ b/plugins/gcp/check.go @@ -50,7 +50,7 @@ func checkConnection(url string, ctx context.Context) error { defer func() { err := resp.Body.Close() if err != nil { - _ = catcher.Error("error closing response body: %v", err, nil) + _ = catcher.Error("error closing response body", err, map[string]any{"process": "plugin_com.utmstack.gcp"}) } }() @@ -64,7 +64,7 @@ func infiniteRetryIfXError(f func() error, exception string) error { err := f() if err != nil && is(err, exception) { if !xErrorWasLogged { - _ = catcher.Error("An error occurred (%s), will keep retrying indefinitely...", err, nil) + _ = catcher.Error("An error occurred, will keep retrying indefinitely...", err, map[string]any{"process": "plugin_com.utmstack.gcp"}) xErrorWasLogged = true } time.Sleep(wait) diff --git a/plugins/gcp/config/config.go b/plugins/gcp/config/config.go index b2cb87583..e6f9daa17 100644 --- a/plugins/gcp/config/config.go +++ b/plugins/gcp/config/config.go @@ -43,7 +43,7 @@ func StartConfigurationSystem() { for { pluginConfig := plugins.PluginCfg("com.utmstack", false) if !pluginConfig.Exists() { - _ = catcher.Error("plugin configuration not found", nil, nil) + _ = catcher.Error("plugin configuration not found", nil, map[string]any{"process": "plugin_com.utmstack.gcp"}) time.Sleep(reconnectDelay) continue } @@ -69,7 +69,7 @@ func StartConfigurationSystem() { ) if err != nil { - catcher.Error("Failed to connect to server", err, nil) + catcher.Error("Failed to connect to server", err, map[string]any{"process": "plugin_com.utmstack.gcp"}) cancel() time.Sleep(reconnectDelay) continue @@ -77,7 +77,7 @@ func StartConfigurationSystem() { state := conn.GetState() if state == connectivity.Shutdown || state == connectivity.TransientFailure { - catcher.Error("Connection is in shutdown or transient failure state", nil, nil) + catcher.Error("Connection is in shutdown or transient failure state", nil, map[string]any{"process": "plugin_com.utmstack.gcp"}) cancel() time.Sleep(reconnectDelay) continue @@ -86,7 +86,7 @@ func StartConfigurationSystem() { client := NewConfigServiceClient(conn) stream, err := client.StreamConfig(ctx) if err != nil { - catcher.Error("Failed to create stream", err, nil) + catcher.Error("Failed to create stream", err, map[string]any{"process": "plugin_com.utmstack.gcp"}) conn.Close() cancel() time.Sleep(reconnectDelay) @@ -99,7 +99,7 @@ func StartConfigurationSystem() { }, }) if err != nil { - catcher.Error("Failed to send PluginInit", err, nil) + catcher.Error("Failed to send PluginInit", err, map[string]any{"process": "plugin_com.utmstack.gcp"}) conn.Close() cancel() time.Sleep(reconnectDelay) @@ -110,7 +110,7 @@ func StartConfigurationSystem() { in, err := stream.Recv() if err != nil { if strings.Contains(err.Error(), "EOF") { - catcher.Info("Stream closed by server, reconnecting...", nil) + catcher.Info("Stream closed by server, reconnecting...", map[string]any{"process": "plugin_com.utmstack.gcp"}) conn.Close() cancel() time.Sleep(reconnectDelay) @@ -118,13 +118,13 @@ func StartConfigurationSystem() { } st, ok := status.FromError(err) if ok && (st.Code() == codes.Unavailable || st.Code() == codes.Canceled) { - catcher.Error("Stream error: "+st.Message(), err, nil) + catcher.Error("Stream error", err, map[string]any{"process": "plugin_com.utmstack.gcp", "status_message": st.Message()}) conn.Close() cancel() time.Sleep(reconnectDelay) break } else { - catcher.Error("Stream receive error", err, nil) + catcher.Error("Stream receive error", err, map[string]any{"process": "plugin_com.utmstack.gcp"}) time.Sleep(reconnectDelay) continue } @@ -132,7 +132,7 @@ func StartConfigurationSystem() { switch message := in.Payload.(type) { case *BiDirectionalMessage_Config: - catcher.Info("Received configuration update", map[string]any{"config": message.Config}) + catcher.Info("Received configuration update", map[string]any{"config": message.Config, "process": "plugin_com.utmstack.gcp"}) cnf = message.Config } } diff --git a/plugins/gcp/go.mod b/plugins/gcp/go.mod index 6e04d9dc0..a2546c0f9 100644 --- a/plugins/gcp/go.mod +++ b/plugins/gcp/go.mod @@ -1,76 +1,83 @@ module github.com/utmstack/UTMStack/plugins/gcp -go 1.24.2 +go 1.25.5 require ( - cloud.google.com/go/pubsub v1.49.0 + cloud.google.com/go/pubsub v1.50.1 github.com/google/uuid v1.6.0 - github.com/threatwinds/go-sdk v1.0.43 - github.com/utmstack/config-client-go v1.2.7 - google.golang.org/api v0.236.0 + github.com/threatwinds/go-sdk v1.1.7 + google.golang.org/api v0.260.0 + google.golang.org/grpc v1.78.0 + google.golang.org/protobuf v1.36.11 ) require ( - cel.dev/expr v0.24.0 // indirect - cloud.google.com/go v0.121.2 // indirect - cloud.google.com/go/auth v0.16.2 // indirect + cel.dev/expr v0.25.1 // indirect + cloud.google.com/go v0.123.0 // indirect + cloud.google.com/go/auth v0.18.0 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect - cloud.google.com/go/compute/metadata v0.7.0 // indirect - cloud.google.com/go/iam v1.5.2 // indirect + cloud.google.com/go/compute/metadata v0.9.0 // indirect + cloud.google.com/go/iam v1.5.3 // indirect + cloud.google.com/go/pubsub/v2 v2.3.0 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/bytedance/sonic v1.14.0 // indirect - github.com/bytedance/sonic/loader v0.3.0 // indirect - github.com/cloudwego/base64x v0.1.5 // indirect + github.com/bytedance/gopkg v0.1.3 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect github.com/gin-contrib/sse v1.1.0 // indirect - github.com/gin-gonic/gin v1.10.1 // indirect + github.com/gin-gonic/gin v1.11.0 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.27.0 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect github.com/goccy/go-json v0.10.5 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect - github.com/google/cel-go v0.26.0 // indirect + github.com/google/cel-go v0.26.1 // indirect github.com/google/s2a-go v0.1.9 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect - github.com/googleapis/gax-go/v2 v2.14.2 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.11 // indirect + github.com/googleapis/gax-go/v2 v2.16.0 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/opensearch-project/opensearch-go/v4 v4.6.0 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect github.com/stoewer/go-strcase v1.3.1 // indirect github.com/tidwall/gjson v1.18.0 // indirect - github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.3.0 // indirect + github.com/ugorji/go/codec v1.3.1 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect - go.opentelemetry.io/otel v1.36.0 // indirect - go.opentelemetry.io/otel/metric v1.36.0 // indirect - go.opentelemetry.io/otel/trace v1.36.0 // indirect - go.yaml.in/yaml/v2 v2.4.2 // indirect - golang.org/x/arch v0.19.0 // indirect - golang.org/x/crypto v0.40.0 // indirect - golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 // indirect - golang.org/x/net v0.42.0 // indirect - golang.org/x/oauth2 v0.30.0 // indirect - golang.org/x/sync v0.16.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/text v0.27.0 // indirect - golang.org/x/time v0.12.0 // indirect - google.golang.org/genproto v0.0.0-20250603155806-513f23925822 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/grpc v1.74.2 // indirect - google.golang.org/protobuf v1.36.6 // indirect + go.opentelemetry.io/auto/sdk v1.2.1 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.64.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0 // indirect + go.opentelemetry.io/otel v1.39.0 // indirect + go.opentelemetry.io/otel/metric v1.39.0 // indirect + go.opentelemetry.io/otel/trace v1.39.0 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/oauth2 v0.34.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + golang.org/x/time v0.14.0 // indirect + google.golang.org/genproto v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - sigs.k8s.io/yaml v1.5.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/plugins/gcp/go.sum b/plugins/gcp/go.sum index e75d59114..1ae931714 100644 --- a/plugins/gcp/go.sum +++ b/plugins/gcp/go.sum @@ -1,51 +1,63 @@ -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.121.2 h1:v2qQpN6Dx9x2NmwrqlesOt3Ys4ol5/lFZ6Mg1B7OJCg= -cloud.google.com/go v0.121.2/go.mod h1:nRFlrHq39MNVWu+zESP2PosMWA0ryJw8KUBZ2iZpxbw= -cloud.google.com/go/auth v0.16.2 h1:QvBAGFPLrDeoiNjyfVunhQ10HKNYuOwZ5noee0M5df4= -cloud.google.com/go/auth v0.16.2/go.mod h1:sRBas2Y1fB1vZTdurouM0AzuYQBMZinrUYL8EufhtEA= +cloud.google.com/go v0.123.0 h1:2NAUJwPR47q+E35uaJeYoNhuNEM9kM8SjgRgdeOJUSE= +cloud.google.com/go v0.123.0/go.mod h1:xBoMV08QcqUGuPW65Qfm1o9Y4zKZBpGS+7bImXLTAZU= +cloud.google.com/go/auth v0.18.0 h1:wnqy5hrv7p3k7cShwAU/Br3nzod7fxoqG+k0VZ+/Pk0= +cloud.google.com/go/auth v0.18.0/go.mod h1:wwkPM1AgE1f2u6dG443MiWoD8C3BtOywNsUMcUTVDRo= cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc= cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= -cloud.google.com/go/compute/metadata v0.7.0 h1:PBWF+iiAerVNe8UCHxdOt6eHLVc3ydFeOCw78U8ytSU= -cloud.google.com/go/compute/metadata v0.7.0/go.mod h1:j5MvL9PprKL39t166CoB1uVHfQMs4tFQZZcKwksXUjo= -cloud.google.com/go/iam v1.5.2 h1:qgFRAGEmd8z6dJ/qyEchAuL9jpswyODjA2lS+w234g8= -cloud.google.com/go/iam v1.5.2/go.mod h1:SE1vg0N81zQqLzQEwxL2WI6yhetBdbNQuTvIKCSkUHE= -cloud.google.com/go/kms v1.22.0 h1:dBRIj7+GDeeEvatJeTB19oYZNV0aj6wEqSIT/7gLqtk= -cloud.google.com/go/kms v1.22.0/go.mod h1:U7mf8Sva5jpOb4bxYZdtw/9zsbIjrklYwPcvMk34AL8= -cloud.google.com/go/longrunning v0.6.7 h1:IGtfDWHhQCgCjwQjV9iiLnUta9LBCo8R9QmAFsS/PrE= -cloud.google.com/go/longrunning v0.6.7/go.mod h1:EAFV3IZAKmM56TyiE6VAP3VoTzhZzySwI/YI1s/nRsY= -cloud.google.com/go/pubsub v1.49.0 h1:5054IkbslnrMCgA2MAEPcsN3Ky+AyMpEZcii/DoySPo= -cloud.google.com/go/pubsub v1.49.0/go.mod h1:K1FswTWP+C1tI/nfi3HQecoVeFvL4HUOB1tdaNXKhUY= +cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs= +cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= +cloud.google.com/go/iam v1.5.3 h1:+vMINPiDF2ognBJ97ABAYYwRgsaqxPbQDlMnbHMjolc= +cloud.google.com/go/iam v1.5.3/go.mod h1:MR3v9oLkZCTlaqljW6Eb2d3HGDGK5/bDv93jhfISFvU= +cloud.google.com/go/kms v1.23.2 h1:4IYDQL5hG4L+HzJBhzejUySoUOheh3Lk5YT4PCyyW6k= +cloud.google.com/go/kms v1.23.2/go.mod h1:rZ5kK0I7Kn9W4erhYVoIRPtpizjunlrfU4fUkumUp8g= +cloud.google.com/go/longrunning v0.8.0 h1:LiKK77J3bx5gDLi4SMViHixjD2ohlkwBi+mKA7EhfW8= +cloud.google.com/go/longrunning v0.8.0/go.mod h1:UmErU2Onzi+fKDg2gR7dusz11Pe26aknR4kHmJJqIfk= +cloud.google.com/go/pubsub v1.50.1 h1:fzbXpPyJnSGvWXF1jabhQeXyxdbCIkXTpjXHy7xviBM= +cloud.google.com/go/pubsub v1.50.1/go.mod h1:6YVJv3MzWJUVdvQXG081sFvS0dWQOdnV+oTo++q/xFk= +cloud.google.com/go/pubsub/v2 v2.3.0 h1:DgAN907x+sP0nScYfBzneRiIhWoXcpCD8ZAut8WX9vs= +cloud.google.com/go/pubsub/v2 v2.3.0/go.mod h1:O5f0KHG9zDheZAd3z5rlCRhxt2JQtB+t/IYLKK3Bpvw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= -github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= -github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= +github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= +github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f h1:Y8xYupdHxryycyPlc9Y+bSQAYZnetRJ70VMVKm5CKI0= +github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f/go.mod h1:HlzOvOjVBOfTGSRXRyY0OiCS/3J1akRGQQpRO/7zyF4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.13.5-0.20251024222203-75eaa193e329 h1:K+fnvUM0VZ7ZFJf0n4L/BRlnsb9pL/GuDG6FqaH+PwM= +github.com/envoyproxy/go-control-plane/envoy v1.35.0 h1:ixjkELDE+ru6idPxcHLj8LBVc2bFP7iBytj353BoHUo= +github.com/envoyproxy/go-control-plane/envoy v1.35.0/go.mod h1:09qwbGVuSWWAyN5t/b3iyVfz5+z8QWGrzkoqm/8SbEs= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v1.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfUKS7KJ7spH3d86P8= +github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= -github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= -github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -57,10 +69,12 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ= @@ -77,8 +91,8 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= -github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -93,16 +107,16 @@ github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0 github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.3.6 h1:GW/XbdyBFQ8Qe+YAmFU9uHLo7OnF5tL52HFAgMmyrf4= -github.com/googleapis/enterprise-certificate-proxy v0.3.6/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA= -github.com/googleapis/gax-go/v2 v2.14.2 h1:eBLnkZ9635krYIPD+ag1USrOAI0Nr0QYF3+/3GqO0k0= -github.com/googleapis/gax-go/v2 v2.14.2/go.mod h1:ON64QhlJkhVtSqp4v1uaK92VyZ2gmvDQsweuyLV+8+w= +github.com/googleapis/enterprise-certificate-proxy v0.3.11 h1:vAe81Msw+8tKUxi2Dqh/NZMz7475yUvmRIkXr4oN2ao= +github.com/googleapis/enterprise-certificate-proxy v0.3.11/go.mod h1:RFV7MUdlb7AgEq2v7FmMCfeSMCllAzWxFgRdusoGks8= +github.com/googleapis/gax-go/v2 v2.16.0 h1:iHbQmKLLZrexmb0OSsNGTeSTS0HO4YvFOG8g5E4Zd0Y= +github.com/googleapis/gax-go/v2 v2.16.0/go.mod h1:o1vfQjjNZn4+dPnRdl/4ZD7S9414Y4xA+a/6Icj6l14= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -116,73 +130,89 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc= +github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/threatwinds/go-sdk v1.0.43 h1:q2Pl0DvmFpeBCs5sZRcsG1oDn2zIoIB5vHwcJ/VDgD8= -github.com/threatwinds/go-sdk v1.0.43/go.mod h1:S0R7kQj2BsTgaYnX6eZ3keEFRy9yt4f9SCEKYMJzD6g= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo= +github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= +github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= -github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= -github.com/utmstack/config-client-go v1.2.7 h1:JeRdI5JjH1liNzMW3LmyevjuPd67J/yt9MAO3+oJAuM= -github.com/utmstack/config-client-go v1.2.7/go.mod h1:kM0KoUizM9ZlcQp0qKviGTWn/+anT5Rfjx3zfZk79nM= -go.einride.tech/aip v0.68.1 h1:16/AfSxcQISGN5z9C5lM+0mLYXihrHbQ1onvYTr93aQ= -go.einride.tech/aip v0.68.1/go.mod h1:XaFtaj4HuA3Zwk9xoBtTWgNubZ0ZZXv9BZJCkuKuWbg= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ= +github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM= +go.einride.tech/aip v0.73.0 h1:bPo4oqBo2ZQeBKo4ZzLb1kxYXTY1ysJhpvQyfuGzvps= +go.einride.tech/aip v0.73.0/go.mod h1:Mj7rFbmXEgw0dq1dqJ7JGMvYCZZVxmGOR3S4ZcV5LvQ= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 h1:q4XOmH/0opmeuJtPsbFNivyl7bCt7yRBbeEm2sC/XtQ= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= -go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= -go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= -go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= -go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= -go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= -go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= -go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= -golang.org/x/arch v0.19.0 h1:LmbDQUodHThXE+htjrnmVD73M//D9GTH6wFZjyDkjyU= -golang.org/x/arch v0.19.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.64.0 h1:RN3ifU8y4prNWeEnQp2kRRHz8UwonAEYZl8tUzHEXAk= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.64.0/go.mod h1:habDz3tEWiFANTo6oUE99EmaFUrCNYAAg3wiVmusm70= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0 h1:ssfIgGNANqpVFCndZvcuyKbl0g+UAVcbBcqGkG28H0Y= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0/go.mod h1:GQ/474YrbE4Jx8gZ4q5I4hrhUzM6UPzyrqJYV2AqPoQ= +go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48= +go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8= +go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0= +go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs= +go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18= +go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE= +go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8= +go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew= +go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI= +go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 h1:R9PFI6EUdfVKgwKjZef7QIwGcBKu86OEFpJ9nUEP2l4= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -192,55 +222,57 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= -golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= +golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw= +golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= -golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= -golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= -golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= +golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.236.0 h1:CAiEiDVtO4D/Qja2IA9VzlFrgPnK3XVMmRoJZlSWbc0= -google.golang.org/api v0.236.0/go.mod h1:X1WF9CU2oTc+Jml1tiIxGmWFK/UZezdqEu09gcxZAj4= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/api v0.260.0 h1:XbNi5E6bOVEj/uLXQRlt6TKuEzMD7zvW/6tNwltE4P4= +google.golang.org/api v0.260.0/go.mod h1:Shj1j0Phr/9sloYrKomICzdYgsSDImpTxME8rGLaZ/o= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20250603155806-513f23925822 h1:rHWScKit0gvAPuOnu87KpaYtjK5zBMLcULh7gxkCXu4= -google.golang.org/genproto v0.0.0-20250603155806-513f23925822/go.mod h1:HubltRL7rMh0LfnQPkMH4NPDFEWp0jw3vixw7jEM53s= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 h1:mVXdvnmR3S3BQOqHECm9NGMjYiRtEvDYcqAqedTXY6s= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 h1:qJW29YvkiJmXOYMu5Tf8lyrTp3dOS+K4z6IixtLaCf8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/genproto v0.0.0-20260114163908-3f89685c29c3 h1:rUamZFBwsWVWg4Yb7iTbwYp81XVHUvOXNdrFCoYRRNE= +google.golang.org/genproto v0.0.0-20260114163908-3f89685c29c3/go.mod h1:wE6SUYr3iNtF/D0GxVAjT+0CbDFktQNssYs9PVptCt4= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -250,8 +282,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -260,6 +292,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ= -sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/plugins/gcp/main.go b/plugins/gcp/main.go index 2f8f2103c..139949c16 100644 --- a/plugins/gcp/main.go +++ b/plugins/gcp/main.go @@ -29,7 +29,7 @@ type GroupModule struct { } func main() { - mode := plugins.GetCfg().Env.Mode + mode := plugins.GetCfg("plugin_com.utmstack.gcp").Env.Mode if mode != "worker" { return } @@ -37,8 +37,8 @@ func main() { go config.StartConfigurationSystem() for i := 0; i < 2*runtime.NumCPU(); i++ { - go plugins.SendLogsFromChannel() - go plugins.SendNotificationsFromChannel() + go plugins.SendLogsFromChannel("com.utmstack.gcp") + go plugins.SendNotificationsFromChannel("com.utmstack.gcp") } startGroupModuleManager() @@ -64,6 +64,7 @@ func (g *GroupModule) PullLogs() { } _ = catcher.Error("failed to create client, retrying", err, map[string]any{ + "process": "plugin_com.utmstack.gcp", "retry": retry + 1, "maxRetries": maxRetries, "group": g.GroupName, @@ -78,7 +79,8 @@ func (g *GroupModule) PullLogs() { if err != nil { _ = catcher.Error("all retries failed when creating client", err, map[string]any{ - "group": g.GroupName, + "process": "plugin_com.utmstack.gcp", + "group": g.GroupName, }) return } @@ -96,13 +98,13 @@ func (g *GroupModule) PullLogs() { DataSource: g.GroupName, Timestamp: time.Now().UTC().Format(time.RFC3339Nano), Raw: string(msg.Data), - }) + }, "com.utmstack.gcp") msg.Ack() }) if err != nil { - _ = catcher.Error("failed to receive message", err, nil) + _ = catcher.Error("failed to receive message", err, map[string]any{"process": "plugin_com.utmstack.gcp"}) time.Sleep(5 * time.Second) continue } @@ -143,7 +145,7 @@ func (m *GroupModuleManager) SyncConfigs() { for range ticker.C { if err := ConnectionChecker(CHECKCON); err != nil { - _ = catcher.Error("External connection failure detected: %v", err, nil) + _ = catcher.Error("External connection failure detected", err, map[string]any{"process": "plugin_com.utmstack.gcp"}) } moduleConfig := config.GetConfig() diff --git a/plugins/geolocation/bases.go b/plugins/geolocation/bases.go index 466b272be..e03619679 100644 --- a/plugins/geolocation/bases.go +++ b/plugins/geolocation/bases.go @@ -1,22 +1,21 @@ package main import ( - "github.com/threatwinds/go-sdk/plugins" "net" "strconv" "time" + "github.com/threatwinds/go-sdk/plugins" + "github.com/threatwinds/go-sdk/catcher" "github.com/threatwinds/go-sdk/utils" ) // loadGeolocationData loads the geolocation files and populates the maps func loadGeolocationData() { - // Get the geolocation directory from environment variable or use default - workdir := plugins.WorkDir - geoDir, err := utils.MkdirJoin(workdir, "geolocation") + geoDir, err := utils.MkdirJoin(plugins.WorkDir, "geolocation") if err != nil { - _ = catcher.Error("could not create geolocation directory", err, nil) + _ = catcher.Error("could not create geolocation directory", err, map[string]any{"process": "plugin_com.utmstack.geolocation"}) return } @@ -54,6 +53,7 @@ func loadGeolocationData() { } _ = catcher.Error("could not read geolocation file, retrying", err, map[string]any{ + "process": "plugin_com.utmstack.geolocation", "file": filePath, "retry": retry + 1, "maxRetries": maxRetries, @@ -67,7 +67,8 @@ func loadGeolocationData() { if err != nil { _ = catcher.Error("all retries failed when reading geolocation file", err, map[string]any{ - "file": filePath, + "process": "plugin_com.utmstack.geolocation", + "file": filePath, }) continue } @@ -105,7 +106,8 @@ func populateASNBlocksMap(csv [][]string, blocks map[string][]*asnBlock) { _, n, err := net.ParseCIDR(line[0]) if err != nil { _ = catcher.Error("could not parse CIDR", err, map[string]any{ - "cidr": line[0], + "process": "plugin_com.utmstack.geolocation", + "cidr": line[0], }) continue } @@ -118,7 +120,8 @@ func populateASNBlocksMap(csv [][]string, blocks map[string][]*asnBlock) { }(), 10, 64) if err != nil { _ = catcher.Error("could not parse ASN", err, map[string]any{ - "asn": line[1], + "process": "plugin_com.utmstack.geolocation", + "asn": line[1], }) continue } @@ -150,7 +153,8 @@ func populateCityBlocksMap(csv [][]string, blocks map[string][]*cityBlock) { _, n, err := net.ParseCIDR(line[0]) if err != nil { _ = catcher.Error("could not parse CIDR", err, map[string]any{ - "cidr": line[0], + "process": "plugin_com.utmstack.geolocation", + "cidr": line[0], }) continue } @@ -163,6 +167,7 @@ func populateCityBlocksMap(csv [][]string, blocks map[string][]*cityBlock) { }(), 10, 64) if err != nil { _ = catcher.Error("could not parse geonameID", err, map[string]any{ + "process": "plugin_com.utmstack.geolocation", "geonameID": line[1], }) continue @@ -176,6 +181,7 @@ func populateCityBlocksMap(csv [][]string, blocks map[string][]*cityBlock) { }(), 64) if err != nil { _ = catcher.Error("could not parse latitude", err, map[string]any{ + "process": "plugin_com.utmstack.geolocation", "latitude": line[7], }) continue @@ -189,6 +195,7 @@ func populateCityBlocksMap(csv [][]string, blocks map[string][]*cityBlock) { }(), 64) if err != nil { _ = catcher.Error("could not parse longitude", err, map[string]any{ + "process": "plugin_com.utmstack.geolocation", "longitude": line[8], }) continue @@ -202,6 +209,7 @@ func populateCityBlocksMap(csv [][]string, blocks map[string][]*cityBlock) { }()) if err != nil { _ = catcher.Error("could not parse accuracyRadius", err, map[string]any{ + "process": "plugin_com.utmstack.geolocation", "accuracyRadius": line[9], }) continue @@ -231,6 +239,7 @@ func populateCityLocationsMap(csv [][]string, locations map[uint64]*cityLocation geonameID, err := strconv.ParseUint(line[0], 10, 64) if err != nil { _ = catcher.Error("could not parse geonameID", err, map[string]any{ + "process": "plugin_com.utmstack.geolocation", "geonameID": line[0], }) continue diff --git a/plugins/geolocation/go.mod b/plugins/geolocation/go.mod index 60913eb64..b2658b712 100644 --- a/plugins/geolocation/go.mod +++ b/plugins/geolocation/go.mod @@ -1,52 +1,57 @@ module github.com/utmstack/UTMStack/plugins/geolocation -go 1.24.2 +go 1.25.5 require ( - github.com/threatwinds/go-sdk v1.0.43 + github.com/threatwinds/go-sdk v1.1.7 github.com/tidwall/gjson v1.18.0 github.com/tidwall/sjson v1.2.5 - google.golang.org/grpc v1.74.2 ) require ( - cel.dev/expr v0.24.0 // indirect + cel.dev/expr v0.25.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/bytedance/sonic v1.14.0 // indirect - github.com/bytedance/sonic/loader v0.3.0 // indirect - github.com/cloudwego/base64x v0.1.5 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/bytedance/gopkg v0.1.3 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect github.com/gin-contrib/sse v1.1.0 // indirect - github.com/gin-gonic/gin v1.10.1 // indirect + github.com/gin-gonic/gin v1.11.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.27.0 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect github.com/goccy/go-json v0.10.5 // indirect - github.com/google/cel-go v0.26.0 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect + github.com/google/cel-go v0.26.1 // indirect github.com/google/uuid v1.6.0 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect - github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/opensearch-project/opensearch-go/v4 v4.6.0 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect github.com/stoewer/go-strcase v1.3.1 // indirect - github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.3.0 // indirect - go.yaml.in/yaml/v2 v2.4.2 // indirect - golang.org/x/arch v0.19.0 // indirect - golang.org/x/crypto v0.40.0 // indirect - golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 // indirect - golang.org/x/net v0.42.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/text v0.27.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/protobuf v1.36.6 // indirect + github.com/ugorji/go/codec v1.3.1 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/grpc v1.78.0 // indirect + google.golang.org/protobuf v1.36.11 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - sigs.k8s.io/yaml v1.5.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/plugins/geolocation/go.sum b/plugins/geolocation/go.sum index cce04f08c..b28d079f1 100644 --- a/plugins/geolocation/go.sum +++ b/plugins/geolocation/go.sum @@ -1,25 +1,25 @@ -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= -github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= -github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= +github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= -github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= -github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -30,25 +30,27 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= -github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -62,31 +64,41 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc= +github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/threatwinds/go-sdk v1.0.43 h1:q2Pl0DvmFpeBCs5sZRcsG1oDn2zIoIB5vHwcJ/VDgD8= -github.com/threatwinds/go-sdk v1.0.43/go.mod h1:S0R7kQj2BsTgaYnX6eZ3keEFRy9yt4f9SCEKYMJzD6g= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo= +github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= +github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= @@ -94,51 +106,56 @@ github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= -github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= -go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= -go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= -go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= -go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= -go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= -go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= -go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= -golang.org/x/arch v0.19.0 h1:LmbDQUodHThXE+htjrnmVD73M//D9GTH6wFZjyDkjyU= -golang.org/x/arch v0.19.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 h1:R9PFI6EUdfVKgwKjZef7QIwGcBKu86OEFpJ9nUEP2l4= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ= +github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 h1:mVXdvnmR3S3BQOqHECm9NGMjYiRtEvDYcqAqedTXY6s= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 h1:qJW29YvkiJmXOYMu5Tf8lyrTp3dOS+K4z6IixtLaCf8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ= -sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/plugins/geolocation/main.go b/plugins/geolocation/main.go index c0fe1cbb7..aa128016d 100644 --- a/plugins/geolocation/main.go +++ b/plugins/geolocation/main.go @@ -2,9 +2,7 @@ package main import ( "context" - "net" "os" - "time" "github.com/threatwinds/go-sdk/catcher" "github.com/threatwinds/go-sdk/plugins" @@ -12,124 +10,29 @@ import ( "github.com/tidwall/gjson" "github.com/tidwall/sjson" - "google.golang.org/grpc" ) -type parsingServer struct { - plugins.UnimplementedParsingServer -} - func main() { - // Retry logic for creating socket directory - maxRetries := 3 - retryDelay := 2 * time.Second - - var filePath utils.Folder - var err error - - for retry := 0; retry < maxRetries; retry++ { - filePath, err = utils.MkdirJoin(plugins.WorkDir, "sockets") - if err == nil { - break - } - - _ = catcher.Error("cannot create directory, retrying", err, map[string]any{ - "retry": retry + 1, - "maxRetries": maxRetries, - }) - - if retry < maxRetries-1 { - time.Sleep(retryDelay) - // Increase delay for next retry - retryDelay *= 2 - } else { - // If all retries failed, log the error and return - _ = catcher.Error("all retries failed when creating directory", err, nil) - return - } - } - - socketPath := filePath.FileJoin("com.utmstack.geolocation_parsing.sock") - _ = os.Remove(socketPath) - - // Retry logic for resolving unix address - retryDelay = 2 * time.Second - var unixAddress *net.UnixAddr - - for retry := 0; retry < maxRetries; retry++ { - unixAddress, err = net.ResolveUnixAddr("unix", socketPath) - if err == nil { - break - } - - _ = catcher.Error("cannot resolve unix address, retrying", err, map[string]any{ - "retry": retry + 1, - "maxRetries": maxRetries, - }) - - if retry < maxRetries-1 { - time.Sleep(retryDelay) - // Increase delay for next retry - retryDelay *= 2 - } else { - // If all retries failed, log the error and return - _ = catcher.Error("all retries failed when resolving unix address", err, nil) - return - } - } - - // Retry logic for listening to unix socket - retryDelay = 2 * time.Second - var listener *net.UnixListener - - for retry := 0; retry < maxRetries; retry++ { - listener, err = net.ListenUnix("unix", unixAddress) - if err == nil { - break - } - - _ = catcher.Error("cannot listen to unix socket, retrying", err, map[string]any{ - "retry": retry + 1, - "maxRetries": maxRetries, - }) - - if retry < maxRetries-1 { - time.Sleep(retryDelay) - // Increase delay for next retry - retryDelay *= 2 - } else { - // If all retries failed, log the error and return - _ = catcher.Error("all retries failed when listening to unix socket", err, nil) - return - } - } - - grpcServer := grpc.NewServer() - plugins.RegisterParsingServer(grpcServer, &parsingServer{}) - go loadGeolocationData() - // Serve with error handling and retry logic - for { - err := grpcServer.Serve(listener) - if err == nil { - break - } - - _ = catcher.Error("cannot serve grpc, retrying", err, nil) - time.Sleep(5 * time.Second) + err := plugins.InitParsingPlugin("com.utmstack.geolocation", parseLog) + if err != nil { + _ = catcher.Error("com.utmstack.geolocation", err, map[string]any{ + "process": "plugin_com.utmstack.geolocation", + }) + os.Exit(1) } } -func (p *parsingServer) ParseLog(_ context.Context, transform *plugins.Transform) (*plugins.Draft, error) { +func parseLog(_ context.Context, transform *plugins.Transform) (*plugins.Draft, error) { source, ok := transform.Step.Dynamic.Params["source"] if !ok { - return transform.Draft, catcher.Error("'source' parameter required", nil, nil) + return transform.Draft, catcher.Error("'source' parameter required", nil, map[string]any{"process": "plugin_com.utmstack.geolocation"}) } destination, ok := transform.Step.Dynamic.Params["destination"] if !ok { - return transform.Draft, catcher.Error("'destination' parameter required", nil, nil) + return transform.Draft, catcher.Error("'destination' parameter required", nil, map[string]any{"process": "plugin_com.utmstack.geolocation"}) } sourceField := source.GetStringValue() @@ -138,7 +41,8 @@ func (p *parsingServer) ParseLog(_ context.Context, transform *plugins.Transform err := utils.ValidateReservedField(sourceField, false) if err != nil { return transform.Draft, catcher.Error("cannot parse log", err, map[string]any{ - "field": sourceField, + "process": "plugin_com.utmstack.geolocation", + "field": sourceField, }) } @@ -148,7 +52,8 @@ func (p *parsingServer) ParseLog(_ context.Context, transform *plugins.Transform err = utils.ValidateReservedField(destinationField, false) if err != nil { return transform.Draft, catcher.Error("cannot parse log", err, map[string]any{ - "field": destinationField, + "process": "plugin_com.utmstack.geolocation", + "field": destinationField, }) } @@ -165,7 +70,7 @@ func (p *parsingServer) ParseLog(_ context.Context, transform *plugins.Transform transform.Draft.Log, err = sjson.Set(transform.Draft.Log, destinationField, geo) if err != nil { - return transform.Draft, catcher.Error("failed to set geolocation", err, nil) + return transform.Draft, catcher.Error("failed to set geolocation", err, map[string]any{"process": "plugin_com.utmstack.geolocation"}) } return transform.Draft, nil diff --git a/plugins/inputs/auth.go b/plugins/inputs/auth.go index bbf4311fb..dc03dff92 100644 --- a/plugins/inputs/auth.go +++ b/plugins/inputs/auth.go @@ -4,12 +4,13 @@ import ( "context" "crypto/tls" "fmt" - "github.com/threatwinds/go-sdk/catcher" - "github.com/threatwinds/go-sdk/plugins" "strings" "sync" "time" + "github.com/threatwinds/go-sdk/catcher" + "github.com/threatwinds/go-sdk/plugins" + "github.com/utmstack/UTMStack/plugins/utmstack-inputs/agent" "google.golang.org/grpc" "google.golang.org/grpc/credentials" @@ -57,7 +58,7 @@ func (auth *LogAuthService) syncKeys(typ agent.ConnectorType) { internalKey := pConfig.Get("internalKey").String() if agentManager == "" { - _ = catcher.Error("Could not sync keys. This is a common occurrence during the startup process and typically resolves on its own after a short while.", fmt.Errorf("configuration is empty"), nil) + _ = catcher.Error("Could not sync keys. This is a common occurrence during the startup process and typically resolves on its own after a short while.", fmt.Errorf("configuration is empty"), map[string]any{"process": "plugin_com.utmstack.inputs"}) // Don't exit, just return and retry later return } @@ -69,7 +70,7 @@ func (auth *LogAuthService) syncKeys(typ agent.ConnectorType) { tlsCredentials := credentials.NewTLS(tlsConfig) conn, err := grpc.NewClient(agentManager, grpc.WithTransportCredentials(tlsCredentials), grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxMessageSize))) if err != nil { - _ = catcher.Error("Could not sync keys. This is a common occurrence during the startup process and typically resolves on its own after a short while.", err, nil) + _ = catcher.Error("Could not sync keys. This is a common occurrence during the startup process and typically resolves on its own after a short while.", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) return } defer func() { @@ -91,7 +92,7 @@ func (auth *LogAuthService) syncKeys(typ agent.ConnectorType) { }) if err != nil { if !strings.Contains(err.Error(), "error reading server preface: http2: frame too large") { - _ = catcher.Error("cannot synchronize collector keys", err, nil) + _ = catcher.Error("cannot synchronize collector keys", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) } return } @@ -115,7 +116,7 @@ func (auth *LogAuthService) syncKeys(typ agent.ConnectorType) { }) if err != nil { if !strings.Contains(err.Error(), "error reading server preface: http2: frame too large") { - _ = catcher.Error("cannot synchronize agent keys", err, nil) + _ = catcher.Error("cannot synchronize agent keys", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) } return } diff --git a/plugins/inputs/backend.go b/plugins/inputs/backend.go index b813d0e6f..4b3c9a471 100644 --- a/plugins/inputs/backend.go +++ b/plugins/inputs/backend.go @@ -2,10 +2,11 @@ package main import ( "fmt" - "github.com/threatwinds/go-sdk/catcher" - "github.com/threatwinds/go-sdk/plugins" "io" "net/http" + + "github.com/threatwinds/go-sdk/catcher" + "github.com/threatwinds/go-sdk/plugins" ) func createPanelRequest(method string, endpoint string) (*http.Request, error) { @@ -17,7 +18,7 @@ func createPanelRequest(method string, endpoint string) (*http.Request, error) { req, err := http.NewRequest(method, url, nil) if err != nil { - return nil, catcher.Error("cannot create request", err, nil) + return nil, catcher.Error("cannot create request", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) } req.Header.Add(panelAPIKeyHeader, internalKey) @@ -30,12 +31,12 @@ func GetConnectionKey() ([]byte, error) { req, err := createPanelRequest("GET", panelConnectionKeyEndpoint) if err != nil { - return nil, catcher.Error("cannot create request", err, nil) + return nil, catcher.Error("cannot create request", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) } resp, err := client.Do(req) if err != nil { - return nil, catcher.Error("cannot send request", err, nil) + return nil, catcher.Error("cannot send request", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) } defer func() { @@ -44,7 +45,8 @@ func GetConnectionKey() ([]byte, error) { if resp.StatusCode != http.StatusOK { return nil, catcher.Error("cannot get connection key", nil, map[string]any{ - "status": resp.StatusCode, + "process": "plugin_com.utmstack.inputs", + "status": resp.StatusCode, }) } diff --git a/plugins/inputs/go.mod b/plugins/inputs/go.mod index 99d3eb3a0..01a744f23 100644 --- a/plugins/inputs/go.mod +++ b/plugins/inputs/go.mod @@ -1,51 +1,56 @@ module github.com/utmstack/UTMStack/plugins/utmstack-inputs -go 1.24.2 +go 1.25.5 require ( - github.com/gin-gonic/gin v1.10.1 + github.com/gin-gonic/gin v1.11.0 github.com/google/uuid v1.6.0 - github.com/threatwinds/go-sdk v1.0.45 - google.golang.org/grpc v1.75.0 - google.golang.org/protobuf v1.36.8 + github.com/threatwinds/go-sdk v1.1.7 + google.golang.org/grpc v1.78.0 + google.golang.org/protobuf v1.36.11 ) require ( - cel.dev/expr v0.24.0 // indirect + cel.dev/expr v0.25.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/bytedance/sonic v1.14.0 // indirect - github.com/bytedance/sonic/loader v0.3.0 // indirect + github.com/bytedance/gopkg v0.1.3 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect github.com/cloudwego/base64x v0.1.6 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect github.com/gin-contrib/sse v1.1.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.27.0 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect github.com/goccy/go-json v0.10.5 // indirect - github.com/google/cel-go v0.26.0 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect + github.com/google/cel-go v0.26.1 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect - github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/opensearch-project/opensearch-go/v4 v4.6.0 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect github.com/stoewer/go-strcase v1.3.1 // indirect github.com/tidwall/gjson v1.18.0 // indirect - github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.3.0 // indirect - go.yaml.in/yaml/v2 v2.4.2 // indirect - golang.org/x/arch v0.20.0 // indirect - golang.org/x/crypto v0.41.0 // indirect - golang.org/x/exp v0.0.0-20250819193227-8b4c13bb791b // indirect - golang.org/x/net v0.43.0 // indirect - golang.org/x/sys v0.35.0 // indirect - golang.org/x/text v0.28.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250818200422-3122310a409c // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c // indirect + github.com/ugorji/go/codec v1.3.1 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/plugins/inputs/go.sum b/plugins/inputs/go.sum index e7c315fce..605fc201b 100644 --- a/plugins/inputs/go.sum +++ b/plugins/inputs/go.sum @@ -1,27 +1,25 @@ -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= -github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= -github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= +github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= +github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= -github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= -github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -32,25 +30,27 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= -github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -64,104 +64,97 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc= +github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/threatwinds/go-sdk v1.0.43 h1:q2Pl0DvmFpeBCs5sZRcsG1oDn2zIoIB5vHwcJ/VDgD8= -github.com/threatwinds/go-sdk v1.0.43/go.mod h1:S0R7kQj2BsTgaYnX6eZ3keEFRy9yt4f9SCEKYMJzD6g= -github.com/threatwinds/go-sdk v1.0.45 h1:KZ3s3HviNRrOkg5EqjFnoauANFFzTqjNFyshPLY2SoI= -github.com/threatwinds/go-sdk v1.0.45/go.mod h1:tcWn6r6vqID/W/nL3UKfc5NafA3V/cSkiLvfJnwB58c= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo= +github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= +github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= -github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= -go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= -go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= -go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= -go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= -go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= -go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= -go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= -golang.org/x/arch v0.19.0 h1:LmbDQUodHThXE+htjrnmVD73M//D9GTH6wFZjyDkjyU= -golang.org/x/arch v0.19.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= -golang.org/x/arch v0.20.0 h1:dx1zTU0MAE98U+TQ8BLl7XsJbgze2WnNKF/8tGp/Q6c= -golang.org/x/arch v0.20.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= -golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4= -golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 h1:R9PFI6EUdfVKgwKjZef7QIwGcBKu86OEFpJ9nUEP2l4= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc= -golang.org/x/exp v0.0.0-20250819193227-8b4c13bb791b h1:DXr+pvt3nC887026GRP39Ej11UATqWDmWuS99x26cD0= -golang.org/x/exp v0.0.0-20250819193227-8b4c13bb791b/go.mod h1:4QTo5u+SEIbbKW1RacMZq1YEfOBqeXa19JeshGi+zc4= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= -golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= -golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ= +github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= -golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= -golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= -golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 h1:mVXdvnmR3S3BQOqHECm9NGMjYiRtEvDYcqAqedTXY6s= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I= -google.golang.org/genproto/googleapis/api v0.0.0-20250818200422-3122310a409c h1:AtEkQdl5b6zsybXcbz00j1LwNodDuH6hVifIaNqk7NQ= -google.golang.org/genproto/googleapis/api v0.0.0-20250818200422-3122310a409c/go.mod h1:ea2MjsO70ssTfCjiwHgI0ZFqcw45Ksuk2ckf9G468GA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 h1:qJW29YvkiJmXOYMu5Tf8lyrTp3dOS+K4z6IixtLaCf8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c h1:qXWI/sQtv5UKboZ/zUk7h+mrf/lXORyI+n9DKDAusdg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c/go.mod h1:gw1tLEfykwDz2ET4a12jcXt4couGAm7IwsVaTy0Sflo= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= -google.golang.org/grpc v1.75.0 h1:+TW+dqTd2Biwe6KKfhE5JpiYIBWq865PhKGSXiivqt4= -google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= -google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= -google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ= -sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4= sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/plugins/inputs/handlers.go b/plugins/inputs/handlers.go index 80a6ad9de..4f44ce47a 100644 --- a/plugins/inputs/handlers.go +++ b/plugins/inputs/handlers.go @@ -43,6 +43,7 @@ func startHTTPServer(middlewares *Middlewares, cert string, key string) { } _ = catcher.Error("failed to read the certificate files, retrying", err, map[string]any{ + "process": "plugin_com.utmstack.inputs", "retry": retry + 1, "maxRetries": maxRetries, }) @@ -53,7 +54,7 @@ func startHTTPServer(middlewares *Middlewares, cert string, key string) { retryDelay *= 2 } else { // If all retries failed, log the error and return - _ = catcher.Error("could not read the certificate files, all retries failed", err, nil) + _ = catcher.Error("could not read the certificate files, all retries failed", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) return } } @@ -71,7 +72,7 @@ func startHTTPServer(middlewares *Middlewares, cert string, key string) { err = server.ListenAndServeTLS("", "") if err != nil { - _ = catcher.Error("could not start http server", err, nil) + _ = catcher.Error("could not start http server", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) } } @@ -81,7 +82,7 @@ func Log(c *gin.Context) { _, err := buf.ReadFrom(c.Request.Body) if err != nil { - e := catcher.Error("failed to read request body", err, nil) + e := catcher.Error("failed to read request body", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) e.GinError(c) return } @@ -90,9 +91,9 @@ func Log(c *gin.Context) { var l = new(plugins.Log) - err = utils.ToObject(&body, l) + err = utils.StringToProtoMessage(&body, l) if err != nil { - e := catcher.Error("failed to parse log", err, nil) + e := catcher.Error("failed to parse log", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) e.GinError(c) return } @@ -131,7 +132,7 @@ func GitHub(c *gin.Context) { buf := new(bytes.Buffer) _, err := buf.ReadFrom(c.Request.Body) if err != nil { - e := catcher.Error("failed to read request body", err, nil) + e := catcher.Error("failed to read request body", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) e.GinError(c) return } @@ -172,6 +173,7 @@ func startGRPCServer(middlewares *Middlewares, cert string, key string) error { } _ = catcher.Error("failed to read the certificate files, retrying", err, map[string]any{ + "process": "plugin_com.utmstack.inputs", "retry": retry + 1, "maxRetries": maxRetries, }) @@ -182,7 +184,7 @@ func startGRPCServer(middlewares *Middlewares, cert string, key string) error { retryDelay *= 2 } else { // If all retries failed, log the error and return - return catcher.Error("could not read the certificate files, all retries failed", err, nil) + return catcher.Error("could not read the certificate files, all retries failed", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) } } @@ -215,6 +217,7 @@ func startGRPCServer(middlewares *Middlewares, cert string, key string) error { } _ = catcher.Error("failed to listen to grpc, retrying", err, map[string]any{ + "process": "plugin_com.utmstack.inputs", "retry": retry + 1, "maxRetries": maxRetries, }) @@ -225,13 +228,13 @@ func startGRPCServer(middlewares *Middlewares, cert string, key string) error { retryDelay *= 2 } else { // If all retries failed, log the error and return - return catcher.Error("all retries failed when listening to grpc", err, nil) + return catcher.Error("all retries failed when listening to grpc", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) } } // Serve with error handling if err := server.Serve(listener); err != nil { - return catcher.Error("failed to serve grpc", err, nil) + return catcher.Error("failed to serve grpc", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) } return nil @@ -269,7 +272,8 @@ func (i *integration) ProcessLog(srv plugins.Integration_ProcessLogServer) error if err := srv.Send(&plugins.Ack{LastId: l.Id}); err != nil { return catcher.Error("failed to send ack", err, map[string]any{ - "lastId": l.Id, + "process": "plugin_com.utmstack.inputs", + "lastId": l.Id, }) } } diff --git a/plugins/inputs/health.go b/plugins/inputs/health.go index dd51be967..453b064ef 100644 --- a/plugins/inputs/health.go +++ b/plugins/inputs/health.go @@ -4,9 +4,10 @@ import ( "context" "crypto/tls" "fmt" + "time" + "github.com/threatwinds/go-sdk/catcher" "github.com/threatwinds/go-sdk/plugins" - "time" "google.golang.org/grpc" "google.golang.org/grpc/credentials" @@ -28,14 +29,14 @@ func CheckAgentManagerHealth() { internalKey := pConfig.Get("internalKey").String() if agentManager == "" { - _ = catcher.Error("Could not connect to the Agent Manager. This is a common occurrence during the startup process and typically resolves on its own after a short while.", fmt.Errorf("configuration is empty"), nil) + _ = catcher.Error("Could not connect to the Agent Manager. This is a common occurrence during the startup process and typically resolves on its own after a short while.", fmt.Errorf("configuration is empty"), map[string]any{"process": "plugin_com.utmstack.inputs"}) time.Sleep(5 * time.Second) continue } conn, err := grpc.NewClient(agentManager, grpc.WithTransportCredentials(tlsCredentials), grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(healthMaxMessageSize))) if err != nil { - _ = catcher.Error("Could not connect to the Agent Manager. This is a common occurrence during the startup process and typically resolves on its own after a short while.", err, nil) + _ = catcher.Error("Could not connect to the Agent Manager. This is a common occurrence during the startup process and typically resolves on its own after a short while.", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) time.Sleep(5 * time.Second) continue } @@ -50,7 +51,7 @@ func CheckAgentManagerHealth() { if err != nil { cancel() _ = conn.Close() - _ = catcher.Error("Could not connect to the Agent Manager. This is a common occurrence during the startup process and typically resolves on its own after a short while.", err, nil) + _ = catcher.Error("Could not connect to the Agent Manager. This is a common occurrence during the startup process and typically resolves on its own after a short while.", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) time.Sleep(5 * time.Second) continue } diff --git a/plugins/inputs/main.go b/plugins/inputs/main.go index af9b38988..7db70f9c3 100644 --- a/plugins/inputs/main.go +++ b/plugins/inputs/main.go @@ -16,7 +16,7 @@ const defaultTenant string = "ce66672c-e36d-4761-a8c8-90058fee1a24" var localLogsChannel chan *plugins.Log func main() { - mode := plugins.GetCfg().Env.Mode + mode := plugins.GetCfg("plugin_com.utmstack.inputs").Env.Mode if mode != "worker" { return } @@ -43,6 +43,7 @@ func main() { } _ = catcher.Error("cannot load certificates, retrying", err, map[string]any{ + "process": "plugin_com.utmstack.inputs", "retry": retry + 1, "maxRetries": maxRetries, }) @@ -53,7 +54,7 @@ func main() { retryDelay *= 2 } else { // If all retries failed, log the error and return - _ = catcher.Error("all retries failed when loading certificates", err, nil) + _ = catcher.Error("all retries failed when loading certificates", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) return } } diff --git a/plugins/inputs/middlewares.go b/plugins/inputs/middlewares.go index 0142e1961..2c5d0f0f4 100644 --- a/plugins/inputs/middlewares.go +++ b/plugins/inputs/middlewares.go @@ -7,6 +7,10 @@ import ( "crypto/sha256" "errors" "fmt" + "io" + "strconv" + "strings" + "github.com/gin-gonic/gin" "github.com/threatwinds/go-sdk/catcher" "github.com/threatwinds/go-sdk/plugins" @@ -14,9 +18,6 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" - "io" - "strconv" - "strings" ) type Middlewares struct { @@ -48,13 +49,13 @@ func (m *Middlewares) HttpAuth() gin.HandlerFunc { return func(c *gin.Context) { connectionKey := c.GetHeader(proxyAPIKeyHeader) if connectionKey == "" { - e := catcher.Error("missing connection key", nil, nil) + e := catcher.Error("missing connection key", nil, map[string]any{"process": "plugin_com.utmstack.inputs"}) e.GinError(c) return } isValid := m.AuthService.IsConnectionKeyValid(connectionKey) if !isValid { - e := catcher.Error("invalid connection key", nil, nil) + e := catcher.Error("invalid connection key", nil, map[string]any{"process": "plugin_com.utmstack.inputs"}) e.GinError(c) return } @@ -66,13 +67,13 @@ func (m *Middlewares) GitHubAuth() gin.HandlerFunc { return func(c *gin.Context) { body, err := io.ReadAll(c.Request.Body) if err != nil { - e := catcher.Error("failed to read request body", err, nil) + e := catcher.Error("failed to read request body", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) e.GinError(c) return } sig := c.GetHeader("X-Hub-Signature-256") if len(sig) == 0 { - e := catcher.Error("missing X-Hub-Signature-256 header", nil, nil) + e := catcher.Error("missing X-Hub-Signature-256 header", nil, map[string]any{"process": "plugin_com.utmstack.inputs"}) e.GinError(c) return } @@ -80,7 +81,7 @@ func (m *Middlewares) GitHubAuth() gin.HandlerFunc { key := m.AuthService.GetConnectionKey() err = verifySignature(body, key, sig) if err != nil { - e := catcher.Error("failed to verify signature", err, nil) + e := catcher.Error("failed to verify signature", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) e.GinError(c) return } diff --git a/plugins/inputs/output.go b/plugins/inputs/output.go index c8a89e92c..90dddeebf 100644 --- a/plugins/inputs/output.go +++ b/plugins/inputs/output.go @@ -26,7 +26,7 @@ func sendLog() { for { socketsFolder, err = utils.MkdirJoin(plugins.WorkDir, "sockets") if err != nil { - _ = catcher.Error("cannot create socket directory", err, nil) + _ = catcher.Error("cannot create socket directory", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) time.Sleep(5 * time.Second) continue } @@ -36,7 +36,7 @@ func sendLog() { conn, err = grpc.NewClient(fmt.Sprintf("unix://%s", socketFile), grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { - _ = catcher.Error("failed to connect to engine server", err, nil) + _ = catcher.Error("failed to connect to engine server", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) time.Sleep(5 * time.Second) continue } @@ -45,7 +45,7 @@ func sendLog() { inputClient, err = client.Input(context.Background()) if err != nil { - _ = catcher.Error("failed to create input client", err, nil) + _ = catcher.Error("failed to create input client", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) if conn != nil { _ = conn.Close() } @@ -67,7 +67,7 @@ func sendLog() { err := inputClient.Send(l) if err != nil { - _ = catcher.Error("failed to send log", err, nil) + _ = catcher.Error("failed to send log", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) restart <- true return } @@ -78,7 +78,7 @@ func sendLog() { for { _, err = inputClient.Recv() if err != nil { - _ = catcher.Error("failed to receive ack", err, nil) + _ = catcher.Error("failed to receive ack", err, map[string]any{"process": "plugin_com.utmstack.inputs"}) restart <- true return } diff --git a/plugins/modules-config/config/config.go b/plugins/modules-config/config/config.go index 0a1576896..580326cc4 100644 --- a/plugins/modules-config/config/config.go +++ b/plugins/modules-config/config/config.go @@ -45,7 +45,7 @@ func (s *ConfigServer) GetModuleGroup(moduleName PluginType) *ConfigurationSecti section, exists := s.cache[moduleName] if !exists { - catcher.Error("module group not found", fmt.Errorf("module: %s", moduleName), nil) + catcher.Error("module group not found", fmt.Errorf("module: %s", moduleName), map[string]any{"process": "plugin_com.utmstack.modules-config"}) return nil } @@ -69,7 +69,7 @@ func (s *ConfigServer) StreamConfig(stream ConfigService_StreamConfigServer) err switch payload := msg.Payload.(type) { case *BiDirectionalMessage_PluginInit: pluginType = payload.PluginInit.Type - catcher.Info(fmt.Sprintf("Plugin (%s) connected", pluginType), nil) + catcher.Info(fmt.Sprintf("Plugin (%s) connected", pluginType), map[string]any{"process": "plugin_com.utmstack.modules-config"}) s.mu.Lock() s.plugins[pluginType] = append(s.plugins[pluginType], conn) @@ -89,7 +89,7 @@ func (s *ConfigServer) StreamConfig(stream ConfigService_StreamConfigServer) err go s.monitorDisconnect(pluginType, conn) default: - catcher.Error("unexpected message type", fmt.Errorf("received: %T", payload), nil) + catcher.Error("unexpected message type", fmt.Errorf("received: %T", payload), map[string]any{"process": "plugin_com.utmstack.modules-config"}) } } @@ -131,7 +131,7 @@ func (s *ConfigServer) NotifyUpdate(moduleName string, section *ConfigurationSec case "CROWDSTRIKE": pluginType = PluginType_CROWDSTRIKE default: - _ = catcher.Error("unknown module name", fmt.Errorf("module: %s", moduleName), nil) + _ = catcher.Error("unknown module name", fmt.Errorf("module: %s", moduleName), map[string]any{"process": "plugin_com.utmstack.modules-config"}) return } @@ -141,7 +141,7 @@ func (s *ConfigServer) NotifyUpdate(moduleName string, section *ConfigurationSec s.cache[pluginType] = section if len(s.plugins[pluginType]) == 0 { - catcher.Info(fmt.Sprintf("No active connections for plugin type: %s", pluginType), nil) + catcher.Info(fmt.Sprintf("No active connections for plugin type: %s", pluginType), map[string]any{"process": "plugin_com.utmstack.modules-config"}) return } @@ -152,7 +152,7 @@ func (s *ConfigServer) NotifyUpdate(moduleName string, section *ConfigurationSec }, }) if err != nil { - _ = catcher.Error("error sending configuration update", err, nil) + _ = catcher.Error("error sending configuration update", err, map[string]any{"process": "plugin_com.utmstack.modules-config"}) continue } } diff --git a/plugins/modules-config/go.mod b/plugins/modules-config/go.mod index 7e7b86fc4..1ace1649b 100644 --- a/plugins/modules-config/go.mod +++ b/plugins/modules-config/go.mod @@ -1,114 +1,131 @@ module github.com/utmstack/UTMStack/plugins/modules-config -go 1.24.4 +go 1.25.5 require ( - cloud.google.com/go/pubsub v1.50.0 - github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/v2 v2.0.0 - github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.2 - github.com/aws/aws-sdk-go-v2/config v1.30.3 - github.com/aws/aws-sdk-go-v2/credentials v1.18.3 - github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.63.0 - github.com/aws/aws-sdk-go-v2/service/sts v1.36.0 - github.com/crowdstrike/gofalcon v0.16.0 - github.com/gin-gonic/gin v1.10.1 - github.com/threatwinds/go-sdk v1.0.43 - google.golang.org/api v0.244.0 - google.golang.org/grpc v1.74.2 - google.golang.org/protobuf v1.36.6 + cloud.google.com/go/pubsub v1.50.1 + github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/v2 v2.0.1 + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.4 + github.com/aws/aws-sdk-go-v2/config v1.32.7 + github.com/aws/aws-sdk-go-v2/credentials v1.19.7 + github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.63.1 + github.com/aws/aws-sdk-go-v2/service/sts v1.41.6 + github.com/crowdstrike/gofalcon v0.19.0 + github.com/gin-gonic/gin v1.11.0 + github.com/threatwinds/go-sdk v1.1.7 + google.golang.org/api v0.260.0 + google.golang.org/grpc v1.78.0 + google.golang.org/protobuf v1.36.11 ) require ( - cel.dev/expr v0.24.0 // indirect - cloud.google.com/go v0.121.4 // indirect - cloud.google.com/go/auth v0.16.3 // indirect + cel.dev/expr v0.25.1 // indirect + cloud.google.com/go v0.123.0 // indirect + cloud.google.com/go/auth v0.18.0 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect - cloud.google.com/go/compute/metadata v0.7.0 // indirect - cloud.google.com/go/iam v1.5.2 // indirect - cloud.google.com/go/pubsub/v2 v2.0.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect - github.com/Azure/go-amqp v1.4.0 // indirect + cloud.google.com/go/compute/metadata v0.9.0 // indirect + cloud.google.com/go/iam v1.5.3 // indirect + cloud.google.com/go/pubsub/v2 v2.3.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect + github.com/Azure/go-amqp v1.5.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go-v2 v1.41.0 // indirect + github.com/aws/aws-sdk-go-v2 v1.41.1 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.4 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.16 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.16 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.27.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.32.0 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.17 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.17 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.17 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.17 // indirect + github.com/aws/aws-sdk-go-v2/service/signin v1.0.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.30.9 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.13 // indirect github.com/aws/smithy-go v1.24.0 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/bytedance/sonic v1.13.3 // indirect - github.com/bytedance/sonic/loader v0.2.4 // indirect - github.com/cloudwego/base64x v0.1.5 // indirect + github.com/bytedance/gopkg v0.1.3 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect github.com/gin-contrib/sse v1.1.0 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-openapi/analysis v0.22.2 // indirect - github.com/go-openapi/errors v0.22.0 // indirect - github.com/go-openapi/jsonpointer v0.20.2 // indirect - github.com/go-openapi/jsonreference v0.20.4 // indirect - github.com/go-openapi/loads v0.21.5 // indirect - github.com/go-openapi/runtime v0.27.1 // indirect - github.com/go-openapi/spec v0.20.14 // indirect - github.com/go-openapi/strfmt v0.22.2 // indirect - github.com/go-openapi/swag v0.22.9 // indirect - github.com/go-openapi/validate v0.23.1 // indirect + github.com/go-openapi/analysis v0.24.2 // indirect + github.com/go-openapi/errors v0.22.6 // indirect + github.com/go-openapi/jsonpointer v0.22.4 // indirect + github.com/go-openapi/jsonreference v0.21.4 // indirect + github.com/go-openapi/loads v0.23.2 // indirect + github.com/go-openapi/runtime v0.29.2 // indirect + github.com/go-openapi/spec v0.22.3 // indirect + github.com/go-openapi/strfmt v0.25.0 // indirect + github.com/go-openapi/swag v0.25.4 // indirect + github.com/go-openapi/swag/cmdutils v0.25.4 // indirect + github.com/go-openapi/swag/conv v0.25.4 // indirect + github.com/go-openapi/swag/fileutils v0.25.4 // indirect + github.com/go-openapi/swag/jsonname v0.25.4 // indirect + github.com/go-openapi/swag/jsonutils v0.25.4 // indirect + github.com/go-openapi/swag/loading v0.25.4 // indirect + github.com/go-openapi/swag/mangling v0.25.4 // indirect + github.com/go-openapi/swag/netutils v0.25.4 // indirect + github.com/go-openapi/swag/stringutils v0.25.4 // indirect + github.com/go-openapi/swag/typeutils v0.25.4 // indirect + github.com/go-openapi/swag/yamlutils v0.25.4 // indirect + github.com/go-openapi/validate v0.25.1 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.26.0 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect + github.com/go-viper/mapstructure/v2 v2.5.0 // indirect github.com/goccy/go-json v0.10.5 // indirect - github.com/google/cel-go v0.25.0 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect + github.com/google/cel-go v0.26.1 // indirect github.com/google/s2a-go v0.1.9 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect - github.com/googleapis/gax-go/v2 v2.15.0 // indirect - github.com/josharian/intern v1.0.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.11 // indirect + github.com/googleapis/gax-go/v2 v2.16.0 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/cpuid/v2 v2.2.10 // indirect + github.com/klauspost/cpuid/v2 v2.3.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect - github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/oklog/ulid v1.3.1 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/opensearch-project/opensearch-go/v4 v4.6.0 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect - github.com/sirupsen/logrus v1.9.3 // indirect - github.com/stoewer/go-strcase v1.3.0 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect + github.com/sirupsen/logrus v1.9.4 // indirect + github.com/stoewer/go-strcase v1.3.1 // indirect github.com/tidwall/gjson v1.18.0 // indirect - github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.2.14 // indirect - go.mongodb.org/mongo-driver v1.14.0 // indirect + github.com/ugorji/go/codec v1.3.1 // indirect + go.mongodb.org/mongo-driver v1.17.6 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect - go.opentelemetry.io/otel v1.36.0 // indirect - go.opentelemetry.io/otel/metric v1.36.0 // indirect - go.opentelemetry.io/otel/trace v1.36.0 // indirect - golang.org/x/arch v0.18.0 // indirect - golang.org/x/crypto v0.40.0 // indirect - golang.org/x/exp v0.0.0-20250606033433-dcc06ee1d476 // indirect - golang.org/x/net v0.42.0 // indirect - golang.org/x/oauth2 v0.30.0 // indirect - golang.org/x/sync v0.16.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/text v0.27.0 // indirect - golang.org/x/time v0.12.0 // indirect - google.golang.org/genproto v0.0.0-20250603155806-513f23925822 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250728155136-f173205681a0 // indirect + go.opentelemetry.io/auto/sdk v1.2.1 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.64.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0 // indirect + go.opentelemetry.io/otel v1.39.0 // indirect + go.opentelemetry.io/otel/metric v1.39.0 // indirect + go.opentelemetry.io/otel/trace v1.39.0 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/oauth2 v0.34.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + golang.org/x/time v0.14.0 // indirect + google.golang.org/genproto v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - sigs.k8s.io/yaml v1.4.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/plugins/modules-config/go.sum b/plugins/modules-config/go.sum index 9f8302dec..492758d25 100644 --- a/plugins/modules-config/go.sum +++ b/plugins/modules-config/go.sum @@ -1,148 +1,190 @@ -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.121.4 h1:cVvUiY0sX0xwyxPwdSU2KsF9knOVmtRyAMt8xou0iTs= -cloud.google.com/go v0.121.4/go.mod h1:XEBchUiHFJbz4lKBZwYBDHV/rSyfFktk737TLDU089s= -cloud.google.com/go/auth v0.16.3 h1:kabzoQ9/bobUmnseYnBO6qQG7q4a/CffFRlJSxv2wCc= -cloud.google.com/go/auth v0.16.3/go.mod h1:NucRGjaXfzP1ltpcQ7On/VTZ0H4kWB5Jy+Y9Dnm76fA= +cloud.google.com/go v0.123.0 h1:2NAUJwPR47q+E35uaJeYoNhuNEM9kM8SjgRgdeOJUSE= +cloud.google.com/go v0.123.0/go.mod h1:xBoMV08QcqUGuPW65Qfm1o9Y4zKZBpGS+7bImXLTAZU= +cloud.google.com/go/auth v0.18.0 h1:wnqy5hrv7p3k7cShwAU/Br3nzod7fxoqG+k0VZ+/Pk0= +cloud.google.com/go/auth v0.18.0/go.mod h1:wwkPM1AgE1f2u6dG443MiWoD8C3BtOywNsUMcUTVDRo= cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc= cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= -cloud.google.com/go/compute/metadata v0.7.0 h1:PBWF+iiAerVNe8UCHxdOt6eHLVc3ydFeOCw78U8ytSU= -cloud.google.com/go/compute/metadata v0.7.0/go.mod h1:j5MvL9PprKL39t166CoB1uVHfQMs4tFQZZcKwksXUjo= -cloud.google.com/go/iam v1.5.2 h1:qgFRAGEmd8z6dJ/qyEchAuL9jpswyODjA2lS+w234g8= -cloud.google.com/go/iam v1.5.2/go.mod h1:SE1vg0N81zQqLzQEwxL2WI6yhetBdbNQuTvIKCSkUHE= -cloud.google.com/go/kms v1.22.0 h1:dBRIj7+GDeeEvatJeTB19oYZNV0aj6wEqSIT/7gLqtk= -cloud.google.com/go/kms v1.22.0/go.mod h1:U7mf8Sva5jpOb4bxYZdtw/9zsbIjrklYwPcvMk34AL8= -cloud.google.com/go/longrunning v0.6.7 h1:IGtfDWHhQCgCjwQjV9iiLnUta9LBCo8R9QmAFsS/PrE= -cloud.google.com/go/longrunning v0.6.7/go.mod h1:EAFV3IZAKmM56TyiE6VAP3VoTzhZzySwI/YI1s/nRsY= -cloud.google.com/go/pubsub v1.50.0 h1:hnYpOIxVlgVD1Z8LN7est4DQZK3K6tvZNurZjIVjUe0= -cloud.google.com/go/pubsub v1.50.0/go.mod h1:Di2Y+nqXBpIS+dXUEJPQzLh8PbIQZMLE9IVUFhf2zmM= -cloud.google.com/go/pubsub/v2 v2.0.0 h1:0qS6mRJ41gD1lNmM/vdm6bR7DQu6coQcVwD+VPf0Bz0= -cloud.google.com/go/pubsub/v2 v2.0.0/go.mod h1:0aztFxNzVQIRSZ8vUr79uH2bS3jwLebwK6q1sgEub+E= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.1 h1:Wc1ml6QlJs2BHQ/9Bqu1jiyggbsSjramq2oUmp5WeIo= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.1/go.mod h1:Ot/6aikWnKWi4l9QB7qVSwa8iMphQNqkWALMoNT3rzM= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1 h1:B+blDbyVIG3WaikNxPnhPiJ1MThR03b3vKGtER95TP4= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1/go.mod h1:JdM5psgjfBf5fo2uWOZhflPWyDBZ/O/CNAH9CtsuZE4= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 h1:FPKJS1T+clwv+OLGt13a8UjqeRuh0O4SJ3lUriThc+4= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1/go.mod h1:j2chePtV91HrC22tGoRX3sGY42uF13WzmmV80/OdVAA= -github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/v2 v2.0.0 h1:h7gH6+/PUP+flGgkDUmIzXfsCnZXlv/g9SjlbWovQ04= -github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/v2 v2.0.0/go.mod h1:EEyRbPfkzkEmV8AJrYTZ/5of9l5aoarWGm5200n3/oY= +cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs= +cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= +cloud.google.com/go/iam v1.5.3 h1:+vMINPiDF2ognBJ97ABAYYwRgsaqxPbQDlMnbHMjolc= +cloud.google.com/go/iam v1.5.3/go.mod h1:MR3v9oLkZCTlaqljW6Eb2d3HGDGK5/bDv93jhfISFvU= +cloud.google.com/go/kms v1.23.2 h1:4IYDQL5hG4L+HzJBhzejUySoUOheh3Lk5YT4PCyyW6k= +cloud.google.com/go/kms v1.23.2/go.mod h1:rZ5kK0I7Kn9W4erhYVoIRPtpizjunlrfU4fUkumUp8g= +cloud.google.com/go/longrunning v0.8.0 h1:LiKK77J3bx5gDLi4SMViHixjD2ohlkwBi+mKA7EhfW8= +cloud.google.com/go/longrunning v0.8.0/go.mod h1:UmErU2Onzi+fKDg2gR7dusz11Pe26aknR4kHmJJqIfk= +cloud.google.com/go/pubsub v1.50.1 h1:fzbXpPyJnSGvWXF1jabhQeXyxdbCIkXTpjXHy7xviBM= +cloud.google.com/go/pubsub v1.50.1/go.mod h1:6YVJv3MzWJUVdvQXG081sFvS0dWQOdnV+oTo++q/xFk= +cloud.google.com/go/pubsub/v2 v2.3.0 h1:DgAN907x+sP0nScYfBzneRiIhWoXcpCD8ZAut8WX9vs= +cloud.google.com/go/pubsub/v2 v2.3.0/go.mod h1:O5f0KHG9zDheZAd3z5rlCRhxt2JQtB+t/IYLKK3Bpvw= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.0 h1:fou+2+WFTib47nS+nz/ozhEBnvU96bKHy6LjRsY4E28= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.0/go.mod h1:t76Ruy8AHvUAC8GfMWJMa0ElSbuIcO03NLpynfbgsPA= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1 h1:Hk5QBxZQC1jb2Fwj6mpzme37xbCDdNTxU7O9eb5+LB4= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1/go.mod h1:IYus9qsFobWIc2YVwe/WPjcnyCkPKtnHAqUYeebc8z0= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 h1:9iefClla7iYpfYWdzPCRDozdmndjTm8DXdpCzPajMgA= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2/go.mod h1:XtLgD3ZD34DAaVIIAyG3objl5DynM3CQ/vMcbBNJZGI= +github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/v2 v2.0.1 h1:0jZwGhuG42Gm/yv/sSxO0L6uh7JfJBflK8Eh8SAi3QE= +github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/v2 v2.0.1/go.mod h1:mWrFe78uRBS76gOOmm6+/nR0INwQeGZfhankYx6ShQA= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub v1.3.0 h1:4hGvxD72TluuFIXVr8f4XkKZfqAa7Pj61t0jmQ7+kes= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub v1.3.0/go.mod h1:TSH7DcFItwAufy0Lz+Ft2cyopExCpxbOxI5SkH4dRNo= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.1 h1:/Zt+cDPnpC3OVDm/JKLOs7M2DKmLRIIp3XIx9pHHiig= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.1/go.mod h1:Ng3urmn6dYe8gnbCMoHHVl5APYz2txho3koEkV2o2HA= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.2 h1:FwladfywkNirM+FZYLBR2kBz5C8Tg0fw5w5Y7meRXWI= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.2/go.mod h1:vv5Ad0RrIoT1lJFdWBZwt4mB1+j+V8DUroixmKDTCdk= -github.com/Azure/go-amqp v1.4.0 h1:Xj3caqi4comOF/L1Uc5iuBxR/pB6KumejC01YQOqOR4= -github.com/Azure/go-amqp v1.4.0/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE= -github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2 h1:oygO0locgZJe7PpYPXT5A29ZkwJaPqcva7BVeemZOZs= -github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.4 h1:jWQK1GI+LeGGUKBADtcH2rRqPxYB1Ljwms5gFA2LqrM= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.4/go.mod h1:8mwH4klAm9DUgR2EEHyEEAQlRDvLPyg5fQry3y+cDew= +github.com/Azure/go-amqp v1.5.1 h1:WyiPTz2C3zVvDL7RLAqwWdeoYhMtX62MZzQoP09fzsU= +github.com/Azure/go-amqp v1.5.1/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE= +github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 h1:XRzhVemXdgvJqCH0sFfrBUTnUJSBrBf7++ypk+twtRs= +github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0/go.mod h1:HKpQxkWaGLJ+D/5H8QRpyQXA1eKjxkFlOMwck5+33Jk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= -github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go-v2 v1.41.0 h1:tNvqh1s+v0vFYdA1xq0aOJH+Y5cRyZ5upu6roPgPKd4= -github.com/aws/aws-sdk-go-v2 v1.41.0/go.mod h1:MayyLB8y+buD9hZqkCW3kX1AKq07Y5pXxtgB+rRFhz0= +github.com/aws/aws-sdk-go-v2 v1.41.1 h1:ABlyEARCDLN034NhxlRUSZr4l71mh+T5KAeGh6cerhU= +github.com/aws/aws-sdk-go-v2 v1.41.1/go.mod h1:MayyLB8y+buD9hZqkCW3kX1AKq07Y5pXxtgB+rRFhz0= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.4 h1:489krEF9xIGkOaaX3CE/Be2uWjiXrkCH6gUX+bZA/BU= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.4/go.mod h1:IOAPF6oT9KCsceNTvvYMNHy0+kMF8akOjeDvPENWxp4= -github.com/aws/aws-sdk-go-v2/config v1.30.3 h1:utupeVnE3bmB221W08P0Moz1lDI3OwYa2fBtUhl7TCc= -github.com/aws/aws-sdk-go-v2/config v1.30.3/go.mod h1:NDGwOEBdpyZwLPlQkpKIO7frf18BW8PaCmAM9iUxQmI= -github.com/aws/aws-sdk-go-v2/credentials v1.18.3 h1:ptfyXmv+ooxzFwyuBth0yqABcjVIkjDL0iTYZBSbum8= -github.com/aws/aws-sdk-go-v2/credentials v1.18.3/go.mod h1:Q43Nci++Wohb0qUh4m54sNln0dbxJw8PvQWkrwOkGOI= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.2 h1:nRniHAvjFJGUCl04F3WaAj7qp/rcz5Gi1OVoj5ErBkc= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.2/go.mod h1:eJDFKAMHHUvv4a0Zfa7bQb//wFNUXGrbFpYRCHe2kD0= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.16 h1:rgGwPzb82iBYSvHMHXc8h9mRoOUBZIGFgKb9qniaZZc= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.16/go.mod h1:L/UxsGeKpGoIj6DxfhOWHWQ/kGKcd4I1VncE4++IyKA= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.16 h1:1jtGzuV7c82xnqOVfx2F0xmJcOw5374L7N6juGW6x6U= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.16/go.mod h1:M2E5OQf+XLe+SZGmmpaI2yy+J326aFf6/+54PoxSANc= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= -github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.63.0 h1:vEc1y56GbepIC0/NsYfFn4splRMNXgJTTG3G1B/6Ov0= -github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.63.0/go.mod h1:ESQxVIp7hs1MdsdEF4KITf65SfM3fh/EEiYi+s0S/pE= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 h1:6+lZi2JeGKtCraAj1rpoZfKqnQ9SptseRZioejfUOLM= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0/go.mod h1:eb3gfbVIxIoGgJsi9pGne19dhCBpK6opTYpQqAmdy44= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.2 h1:oxmDEO14NBZJbK/M8y3brhMFEIGN4j8a6Aq8eY0sqlo= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.2/go.mod h1:4hH+8QCrk1uRWDPsVfsNDUup3taAjO8Dnx63au7smAU= -github.com/aws/aws-sdk-go-v2/service/sso v1.27.0 h1:j7/jTOjWeJDolPwZ/J4yZ7dUsxsWZEsxNwH5O7F8eEA= -github.com/aws/aws-sdk-go-v2/service/sso v1.27.0/go.mod h1:M0xdEPQtgpNT7kdAX4/vOAPkFj60hSQRb7TvW9B0iug= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.32.0 h1:ywQF2N4VjqX+Psw+jLjMmUL2g1RDHlvri3NxHA08MGI= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.32.0/go.mod h1:Z+qv5Q6b7sWiclvbJyPSOT1BRVU9wfSUPaqQzZ1Xg3E= -github.com/aws/aws-sdk-go-v2/service/sts v1.36.0 h1:bRP/a9llXSSgDPk7Rqn5GD/DQCGo6uk95plBFKoXt2M= -github.com/aws/aws-sdk-go-v2/service/sts v1.36.0/go.mod h1:tgBsFzxwl65BWkuJ/x2EUs59bD4SfYKgikvFDJi1S58= +github.com/aws/aws-sdk-go-v2/config v1.32.7 h1:vxUyWGUwmkQ2g19n7JY/9YL8MfAIl7bTesIUykECXmY= +github.com/aws/aws-sdk-go-v2/config v1.32.7/go.mod h1:2/Qm5vKUU/r7Y+zUk/Ptt2MDAEKAfUtKc1+3U1Mo3oY= +github.com/aws/aws-sdk-go-v2/credentials v1.19.7 h1:tHK47VqqtJxOymRrNtUXN5SP/zUTvZKeLx4tH6PGQc8= +github.com/aws/aws-sdk-go-v2/credentials v1.19.7/go.mod h1:qOZk8sPDrxhf+4Wf4oT2urYJrYt3RejHSzgAquYeppw= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.17 h1:I0GyV8wiYrP8XpA70g1HBcQO1JlQxCMTW9npl5UbDHY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.17/go.mod h1:tyw7BOl5bBe/oqvoIeECFJjMdzXoa/dfVz3QQ5lgHGA= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.17 h1:xOLELNKGp2vsiteLsvLPwxC+mYmO6OZ8PYgiuPJzF8U= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.17/go.mod h1:5M5CI3D12dNOtH3/mk6minaRwI2/37ifCURZISxA/IQ= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.17 h1:WWLqlh79iO48yLkj1v3ISRNiv+3KdQoZ6JWyfcsyQik= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.17/go.mod h1:EhG22vHRrvF8oXSTYStZhJc1aUgKtnJe+aOiFEV90cM= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 h1:WKuaxf++XKWlHWu9ECbMlha8WOEGm0OUEZqm4K/Gcfk= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4/go.mod h1:ZWy7j6v1vWGmPReu0iSGvRiise4YI5SkR3OHKTZ6Wuc= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.63.1 h1:l65dmgr7tO26EcHe6WMdseRnFLoJ2nqdkPz1nJdXfaw= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.63.1/go.mod h1:wvnXh1w1pGS2UpEvPTKSjXYuxiXhuvob/IMaK2AWvek= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.4 h1:0ryTNEdJbzUCEWkVXEXoqlXV72J5keC1GvILMOuD00E= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.4/go.mod h1:HQ4qwNZh32C3CBeO6iJLQlgtMzqeG17ziAA/3KDJFow= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.17 h1:RuNSMoozM8oXlgLG/n6WLaFGoea7/CddrCfIiSA+xdY= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.17/go.mod h1:F2xxQ9TZz5gDWsclCtPQscGpP0VUOc8RqgFM3vDENmU= +github.com/aws/aws-sdk-go-v2/service/signin v1.0.5 h1:VrhDvQib/i0lxvr3zqlUwLwJP4fpmpyD9wYG1vfSu+Y= +github.com/aws/aws-sdk-go-v2/service/signin v1.0.5/go.mod h1:k029+U8SY30/3/ras4G/Fnv/b88N4mAfliNn08Dem4M= +github.com/aws/aws-sdk-go-v2/service/sso v1.30.9 h1:v6EiMvhEYBoHABfbGB4alOYmCIrcgyPPiBE1wZAEbqk= +github.com/aws/aws-sdk-go-v2/service/sso v1.30.9/go.mod h1:yifAsgBxgJWn3ggx70A3urX2AN49Y5sJTD1UQFlfqBw= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.13 h1:gd84Omyu9JLriJVCbGApcLzVR3XtmC4ZDPcAI6Ftvds= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.13/go.mod h1:sTGThjphYE4Ohw8vJiRStAcu3rbjtXRsdNB0TvZ5wwo= +github.com/aws/aws-sdk-go-v2/service/sts v1.41.6 h1:5fFjR/ToSOzB2OQ/XqWpZBmNvmP/pJ1jOWYlFDJTjRQ= +github.com/aws/aws-sdk-go-v2/service/sts v1.41.6/go.mod h1:qgFDZQSD/Kys7nJnVqYlWKnh0SSdMjAi0uSwON4wgYQ= github.com/aws/smithy-go v1.24.0 h1:LpilSUItNPFr1eY85RYgTIg5eIEPtvFbskaFcmmIUnk= github.com/aws/smithy-go v1.24.0/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/bytedance/sonic v1.13.3 h1:MS8gmaH16Gtirygw7jV91pDCN33NyMrPbN7qiYhEsF0= -github.com/bytedance/sonic v1.13.3/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1+KgkJhz4= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.2.4 h1:ZWCw4stuXUsn1/+zQDqeE7JKP+QO47tz7QCNan80NzY= -github.com/bytedance/sonic/loader v0.2.4/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= +github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= +github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f h1:Y8xYupdHxryycyPlc9Y+bSQAYZnetRJ70VMVKm5CKI0= +github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f/go.mod h1:HlzOvOjVBOfTGSRXRyY0OiCS/3J1akRGQQpRO/7zyF4= github.com/coder/websocket v1.8.13 h1:f3QZdXy7uGVz+4uCJy2nTZyM0yTBj8yANEHhqlXZ9FE= github.com/coder/websocket v1.8.13/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs= -github.com/crowdstrike/gofalcon v0.16.0 h1:qwJdoYZ2OXEzArZZNrIwhOO2aFr1uL6SbxprWLjsbO4= -github.com/crowdstrike/gofalcon v0.16.0/go.mod h1:a12GB+md+hRSgVCb3Pv6CakeTIsDIUCIVWRlJelIhY0= +github.com/crowdstrike/gofalcon v0.19.0 h1:pKvA8Az85wD6OR7aq/tvc+tORtR5CSyKp3+LDQXc4pc= +github.com/crowdstrike/gofalcon v0.19.0/go.mod h1:a12GB+md+hRSgVCb3Pv6CakeTIsDIUCIVWRlJelIhY0= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.13.5-0.20251024222203-75eaa193e329 h1:K+fnvUM0VZ7ZFJf0n4L/BRlnsb9pL/GuDG6FqaH+PwM= +github.com/envoyproxy/go-control-plane/envoy v1.35.0 h1:ixjkELDE+ru6idPxcHLj8LBVc2bFP7iBytj353BoHUo= +github.com/envoyproxy/go-control-plane/envoy v1.35.0/go.mod h1:09qwbGVuSWWAyN5t/b3iyVfz5+z8QWGrzkoqm/8SbEs= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v1.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfUKS7KJ7spH3d86P8= +github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= -github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= -github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-openapi/analysis v0.22.2 h1:ZBmNoP2h5omLKr/srIC9bfqrUGzT6g6gNv03HE9Vpj0= -github.com/go-openapi/analysis v0.22.2/go.mod h1:pDF4UbZsQTo/oNuRfAWWd4dAh4yuYf//LYorPTjrpvo= -github.com/go-openapi/errors v0.22.0 h1:c4xY/OLxUBSTiepAg3j/MHuAv5mJhnf53LLMWFB+u/w= -github.com/go-openapi/errors v0.22.0/go.mod h1:J3DmZScxCDufmIMsdOuDHxJbdOGC0xtUynjIx092vXE= -github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= -github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= -github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= -github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= -github.com/go-openapi/loads v0.21.5 h1:jDzF4dSoHw6ZFADCGltDb2lE4F6De7aWSpe+IcsRzT0= -github.com/go-openapi/loads v0.21.5/go.mod h1:PxTsnFBoBe+z89riT+wYt3prmSBP6GDAQh2l9H1Flz8= -github.com/go-openapi/runtime v0.27.1 h1:ae53yaOoh+fx/X5Eaq8cRmavHgDma65XPZuvBqvJYto= -github.com/go-openapi/runtime v0.27.1/go.mod h1:fijeJEiEclyS8BRurYE1DE5TLb9/KZl6eAdbzjsrlLU= -github.com/go-openapi/spec v0.20.14 h1:7CBlRnw+mtjFGlPDRZmAMnq35cRzI91xj03HVyUi/Do= -github.com/go-openapi/spec v0.20.14/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= -github.com/go-openapi/strfmt v0.22.2 h1:DPYOrm6gexCfZZfXUaXFS4+Jw6HAaIIG0SZ5630f8yw= -github.com/go-openapi/strfmt v0.22.2/go.mod h1:HB/b7TCm91rno75Dembc1dFW/0FPLk5CEXsoF9ReNc4= -github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= -github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= -github.com/go-openapi/validate v0.23.1 h1:3YlF+7NP/pKpaZrSxB88oeVbIuCYlWPGKVMWvPcBMYw= -github.com/go-openapi/validate v0.23.1/go.mod h1:DYvS/pv2Y65SE4hB6Tx+kFC+gS9sPKbqYbY1iwG6z7k= +github.com/go-openapi/analysis v0.24.2 h1:6p7WXEuKy1llDgOH8FooVeO+Uq2za9qoAOq4ZN08B50= +github.com/go-openapi/analysis v0.24.2/go.mod h1:x27OOHKANE0lutg2ml4kzYLoHGMKgRm1Cj2ijVOjJuE= +github.com/go-openapi/errors v0.22.6 h1:eDxcf89O8odEnohIXwEjY1IB4ph5vmbUsBMsFNwXWPo= +github.com/go-openapi/errors v0.22.6/go.mod h1:z9S8ASTUqx7+CP1Q8dD8ewGH/1JWFFLX/2PmAYNQLgk= +github.com/go-openapi/jsonpointer v0.22.4 h1:dZtK82WlNpVLDW2jlA1YCiVJFVqkED1MegOUy9kR5T4= +github.com/go-openapi/jsonpointer v0.22.4/go.mod h1:elX9+UgznpFhgBuaMQ7iu4lvvX1nvNsesQ3oxmYTw80= +github.com/go-openapi/jsonreference v0.21.4 h1:24qaE2y9bx/q3uRK/qN+TDwbok1NhbSmGjjySRCHtC8= +github.com/go-openapi/jsonreference v0.21.4/go.mod h1:rIENPTjDbLpzQmQWCj5kKj3ZlmEh+EFVbz3RTUh30/4= +github.com/go-openapi/loads v0.23.2 h1:rJXAcP7g1+lWyBHC7iTY+WAF0rprtM+pm8Jxv1uQJp4= +github.com/go-openapi/loads v0.23.2/go.mod h1:IEVw1GfRt/P2Pplkelxzj9BYFajiWOtY2nHZNj4UnWY= +github.com/go-openapi/runtime v0.29.2 h1:UmwSGWNmWQqKm1c2MGgXVpC2FTGwPDQeUsBMufc5Yj0= +github.com/go-openapi/runtime v0.29.2/go.mod h1:biq5kJXRJKBJxTDJXAa00DOTa/anflQPhT0/wmjuy+0= +github.com/go-openapi/spec v0.22.3 h1:qRSmj6Smz2rEBxMnLRBMeBWxbbOvuOoElvSvObIgwQc= +github.com/go-openapi/spec v0.22.3/go.mod h1:iIImLODL2loCh3Vnox8TY2YWYJZjMAKYyLH2Mu8lOZs= +github.com/go-openapi/strfmt v0.25.0 h1:7R0RX7mbKLa9EYCTHRcCuIPcaqlyQiWNPTXwClK0saQ= +github.com/go-openapi/strfmt v0.25.0/go.mod h1:nNXct7OzbwrMY9+5tLX4I21pzcmE6ccMGXl3jFdPfn8= +github.com/go-openapi/swag v0.25.4 h1:OyUPUFYDPDBMkqyxOTkqDYFnrhuhi9NR6QVUvIochMU= +github.com/go-openapi/swag v0.25.4/go.mod h1:zNfJ9WZABGHCFg2RnY0S4IOkAcVTzJ6z2Bi+Q4i6qFQ= +github.com/go-openapi/swag/cmdutils v0.25.4 h1:8rYhB5n6WawR192/BfUu2iVlxqVR9aRgGJP6WaBoW+4= +github.com/go-openapi/swag/cmdutils v0.25.4/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= +github.com/go-openapi/swag/conv v0.25.4 h1:/Dd7p0LZXczgUcC/Ikm1+YqVzkEeCc9LnOWjfkpkfe4= +github.com/go-openapi/swag/conv v0.25.4/go.mod h1:3LXfie/lwoAv0NHoEuY1hjoFAYkvlqI/Bn5EQDD3PPU= +github.com/go-openapi/swag/fileutils v0.25.4 h1:2oI0XNW5y6UWZTC7vAxC8hmsK/tOkWXHJQH4lKjqw+Y= +github.com/go-openapi/swag/fileutils v0.25.4/go.mod h1:cdOT/PKbwcysVQ9Tpr0q20lQKH7MGhOEb6EwmHOirUk= +github.com/go-openapi/swag/jsonname v0.25.4 h1:bZH0+MsS03MbnwBXYhuTttMOqk+5KcQ9869Vye1bNHI= +github.com/go-openapi/swag/jsonname v0.25.4/go.mod h1:GPVEk9CWVhNvWhZgrnvRA6utbAltopbKwDu8mXNUMag= +github.com/go-openapi/swag/jsonutils v0.25.4 h1:VSchfbGhD4UTf4vCdR2F4TLBdLwHyUDTd1/q4i+jGZA= +github.com/go-openapi/swag/jsonutils v0.25.4/go.mod h1:7OYGXpvVFPn4PpaSdPHJBtF0iGnbEaTk8AvBkoWnaAY= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.4 h1:IACsSvBhiNJwlDix7wq39SS2Fh7lUOCJRmx/4SN4sVo= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.4/go.mod h1:Mt0Ost9l3cUzVv4OEZG+WSeoHwjWLnarzMePNDAOBiM= +github.com/go-openapi/swag/loading v0.25.4 h1:jN4MvLj0X6yhCDduRsxDDw1aHe+ZWoLjW+9ZQWIKn2s= +github.com/go-openapi/swag/loading v0.25.4/go.mod h1:rpUM1ZiyEP9+mNLIQUdMiD7dCETXvkkC30z53i+ftTE= +github.com/go-openapi/swag/mangling v0.25.4 h1:2b9kBJk9JvPgxr36V23FxJLdwBrpijI26Bx5JH4Hp48= +github.com/go-openapi/swag/mangling v0.25.4/go.mod h1:6dxwu6QyORHpIIApsdZgb6wBk/DPU15MdyYj/ikn0Hg= +github.com/go-openapi/swag/netutils v0.25.4 h1:Gqe6K71bGRb3ZQLusdI8p/y1KLgV4M/k+/HzVSqT8H0= +github.com/go-openapi/swag/netutils v0.25.4/go.mod h1:m2W8dtdaoX7oj9rEttLyTeEFFEBvnAx9qHd5nJEBzYg= +github.com/go-openapi/swag/stringutils v0.25.4 h1:O6dU1Rd8bej4HPA3/CLPciNBBDwZj9HiEpdVsb8B5A8= +github.com/go-openapi/swag/stringutils v0.25.4/go.mod h1:GTsRvhJW5xM5gkgiFe0fV3PUlFm0dr8vki6/VSRaZK0= +github.com/go-openapi/swag/typeutils v0.25.4 h1:1/fbZOUN472NTc39zpa+YGHn3jzHWhv42wAJSN91wRw= +github.com/go-openapi/swag/typeutils v0.25.4/go.mod h1:Ou7g//Wx8tTLS9vG0UmzfCsjZjKhpjxayRKTHXf2pTE= +github.com/go-openapi/swag/yamlutils v0.25.4 h1:6jdaeSItEUb7ioS9lFoCZ65Cne1/RZtPBZ9A56h92Sw= +github.com/go-openapi/swag/yamlutils v0.25.4/go.mod h1:MNzq1ulQu+yd8Kl7wPOut/YHAAU/H6hL91fF+E2RFwc= +github.com/go-openapi/testify/enable/yaml/v2 v2.0.2 h1:0+Y41Pz1NkbTHz8NngxTuAXxEodtNSI1WG1c/m5Akw4= +github.com/go-openapi/testify/enable/yaml/v2 v2.0.2/go.mod h1:kme83333GCtJQHXQ8UKX3IBZu6z8T5Dvy5+CW3NLUUg= +github.com/go-openapi/testify/v2 v2.0.2 h1:X999g3jeLcoY8qctY/c/Z8iBHTbwLz7R2WXd6Ub6wls= +github.com/go-openapi/testify/v2 v2.0.2/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= +github.com/go-openapi/validate v0.25.1 h1:sSACUI6Jcnbo5IWqbYHgjibrhhmt3vR6lCzKZnmAgBw= +github.com/go-openapi/validate v0.25.1/go.mod h1:RMVyVFYte0gbSTaZ0N4KmTn6u/kClvAFp+mAVfS/DQc= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.26.0 h1:SP05Nqhjcvz81uJaRfEV0YBSSSGMc/iMaVtFbr3Sw2k= -github.com/go-playground/validator/v10 v10.26.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= +github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro= +github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= -github.com/golang-jwt/jwt/v5 v5.2.3 h1:kkGXqQOBSDDWRhWNXTFpqGSCMyh/PLnqUvMGJPDJDs0= -github.com/golang-jwt/jwt/v5 v5.2.3/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= +github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo= +github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= @@ -161,15 +203,14 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/cel-go v0.25.0 h1:jsFw9Fhn+3y2kBbltZR4VEz5xKkcIFRPDnuEzAGv5GY= -github.com/google/cel-go v0.25.0/go.mod h1:hjEb6r5SuOSlhCHmFoLzu8HGCERvIsDAbxDAyNU/MmI= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -178,20 +219,18 @@ github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0 github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.3.6 h1:GW/XbdyBFQ8Qe+YAmFU9uHLo7OnF5tL52HFAgMmyrf4= -github.com/googleapis/enterprise-certificate-proxy v0.3.6/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA= -github.com/googleapis/gax-go/v2 v2.15.0 h1:SyjDc1mGgZU5LncH8gimWo9lW1DtIfPibOG81vgd/bo= -github.com/googleapis/gax-go/v2 v2.15.0/go.mod h1:zVVkkxAQHa1RQpg9z2AUCMnKhi0Qld9rcmyfL1OZhoc= +github.com/googleapis/enterprise-certificate-proxy v0.3.11 h1:vAe81Msw+8tKUxi2Dqh/NZMz7475yUvmRIkXr4oN2ao= +github.com/googleapis/enterprise-certificate-proxy v0.3.11/go.mod h1:RFV7MUdlb7AgEq2v7FmMCfeSMCllAzWxFgRdusoGks8= +github.com/googleapis/gax-go/v2 v2.16.0 h1:iHbQmKLLZrexmb0OSsNGTeSTS0HO4YvFOG8g5E4Zd0Y= +github.com/googleapis/gax-go/v2 v2.16.0/go.mod h1:o1vfQjjNZn4+dPnRdl/4ZD7S9414Y4xA+a/6Icj6l14= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= -github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= +github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= +github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -200,12 +239,8 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -213,75 +248,95 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc= +github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= -github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= +github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= +github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= +github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/threatwinds/go-sdk v1.0.43 h1:q2Pl0DvmFpeBCs5sZRcsG1oDn2zIoIB5vHwcJ/VDgD8= -github.com/threatwinds/go-sdk v1.0.43/go.mod h1:S0R7kQj2BsTgaYnX6eZ3keEFRy9yt4f9SCEKYMJzD6g= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo= +github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= +github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.2.14 h1:yOQvXCBc3Ij46LRkRoh4Yd5qK6LVOgi0bYOXfb7ifjw= -github.com/ugorji/go/codec v1.2.14/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ= +github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM= go.einride.tech/aip v0.73.0 h1:bPo4oqBo2ZQeBKo4ZzLb1kxYXTY1ysJhpvQyfuGzvps= go.einride.tech/aip v0.73.0/go.mod h1:Mj7rFbmXEgw0dq1dqJ7JGMvYCZZVxmGOR3S4ZcV5LvQ= -go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80= -go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= +go.mongodb.org/mongo-driver v1.17.6 h1:87JUG1wZfWsr6rIz3ZmpH90rL5tea7O3IHuSwHUpsss= +go.mongodb.org/mongo-driver v1.17.6/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 h1:q4XOmH/0opmeuJtPsbFNivyl7bCt7yRBbeEm2sC/XtQ= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= -go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= -go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= -go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= -golang.org/x/arch v0.18.0 h1:WN9poc33zL4AzGxqf8VtpKUnGvMi8O9lhNyBMF/85qc= -golang.org/x/arch v0.18.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.64.0 h1:RN3ifU8y4prNWeEnQp2kRRHz8UwonAEYZl8tUzHEXAk= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.64.0/go.mod h1:habDz3tEWiFANTo6oUE99EmaFUrCNYAAg3wiVmusm70= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0 h1:ssfIgGNANqpVFCndZvcuyKbl0g+UAVcbBcqGkG28H0Y= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0/go.mod h1:GQ/474YrbE4Jx8gZ4q5I4hrhUzM6UPzyrqJYV2AqPoQ= +go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48= +go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8= +go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0= +go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs= +go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18= +go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE= +go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8= +go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew= +go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI= +go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20250606033433-dcc06ee1d476 h1:bsqhLWFR6G6xiQcb+JoGqdKdRU6WzPWmK8E0jxTjzo4= -golang.org/x/exp v0.0.0-20250606033433-dcc06ee1d476/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -291,56 +346,57 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= -golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= +golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw= +golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= -golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= -golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= -golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= +golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.244.0 h1:lpkP8wVibSKr++NCD36XzTk/IzeKJ3klj7vbj+XU5pE= -google.golang.org/api v0.244.0/go.mod h1:dMVhVcylamkirHdzEBAIQWUCgqY885ivNeZYd7VAVr8= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/api v0.260.0 h1:XbNi5E6bOVEj/uLXQRlt6TKuEzMD7zvW/6tNwltE4P4= +google.golang.org/api v0.260.0/go.mod h1:Shj1j0Phr/9sloYrKomICzdYgsSDImpTxME8rGLaZ/o= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20250603155806-513f23925822 h1:rHWScKit0gvAPuOnu87KpaYtjK5zBMLcULh7gxkCXu4= -google.golang.org/genproto v0.0.0-20250603155806-513f23925822/go.mod h1:HubltRL7rMh0LfnQPkMH4NPDFEWp0jw3vixw7jEM53s= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 h1:mVXdvnmR3S3BQOqHECm9NGMjYiRtEvDYcqAqedTXY6s= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250728155136-f173205681a0 h1:MAKi5q709QWfnkkpNQ0M12hYJ1+e8qYVDyowc4U1XZM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250728155136-f173205681a0/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/genproto v0.0.0-20260114163908-3f89685c29c3 h1:rUamZFBwsWVWg4Yb7iTbwYp81XVHUvOXNdrFCoYRRNE= +google.golang.org/genproto v0.0.0-20260114163908-3f89685c29c3/go.mod h1:wE6SUYr3iNtF/D0GxVAjT+0CbDFktQNssYs9PVptCt4= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -350,8 +406,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -360,6 +416,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/plugins/modules-config/handlers.go b/plugins/modules-config/handlers.go index a00d0a5ed..7e1b65ebb 100644 --- a/plugins/modules-config/handlers.go +++ b/plugins/modules-config/handlers.go @@ -19,14 +19,14 @@ func startGRPCServer() error { listener, err := net.Listen("tcp", "0.0.0.0:9003") if err != nil { - return catcher.Error("failed to listen on port 9003", err, nil) + return catcher.Error("failed to listen on port 9003", err, map[string]any{"process": "plugin_com.utmstack.modules-config"}) } config.RegisterConfigServiceServer(server, config.GetConfigServer()) config.GetConfigServer().SyncConfigs(BackendService, InternalKey) if err := server.Serve(listener); err != nil { - return catcher.Error("failed to serve grpc", err, nil) + return catcher.Error("failed to serve grpc", err, map[string]any{"process": "plugin_com.utmstack.modules-config"}) } return nil @@ -50,7 +50,7 @@ func startHTTPServer() { err := server.ListenAndServe() if err != nil { - _ = catcher.Error("could not start http server", err, nil) + _ = catcher.Error("could not start http server", err, map[string]any{"process": "plugin_com.utmstack.modules-config"}) } } @@ -71,7 +71,7 @@ func UpdateModuleConfig(c *gin.Context) { if len(body) != 0 { config.GetConfigServer().NotifyUpdate(moduleName, &body[0]) } else { - catcher.Info("Received empty configuration body, no updates made", nil) + catcher.Info("Received empty configuration body, no updates made", map[string]any{"process": "plugin_com.utmstack.modules-config"}) } c.JSON(http.StatusOK, gin.H{"status": "Module configuration updated successfully"}) diff --git a/plugins/modules-config/main.go b/plugins/modules-config/main.go index f490199ad..457749215 100644 --- a/plugins/modules-config/main.go +++ b/plugins/modules-config/main.go @@ -13,7 +13,7 @@ var ( ) func main() { - mode := plugins.GetCfg().Env.Mode + mode := plugins.GetCfg("plugin_com.utmstack.modules-config").Env.Mode if mode != "manager" { return } @@ -23,7 +23,7 @@ func main() { BackendService = utmConfig.Get("backend").String() if InternalKey == "" || BackendService == "" { - _ = catcher.Error("error getting configuration", fmt.Errorf("internal key or backend service is empty"), nil) + _ = catcher.Error("error getting configuration", fmt.Errorf("internal key or backend service is empty"), map[string]any{"process": "plugin_com.utmstack.modules-config"}) return } diff --git a/plugins/o365/check.go b/plugins/o365/check.go index 2dc541600..956d0e53a 100644 --- a/plugins/o365/check.go +++ b/plugins/o365/check.go @@ -48,7 +48,7 @@ func checkConnection(url string, ctx context.Context) error { defer func() { err := resp.Body.Close() if err != nil { - _ = catcher.Error("error closing response body: %v", err, nil) + _ = catcher.Error("error closing response body: %v", err, map[string]any{"process": "plugin_com.utmstack.o365"}) } }() @@ -62,7 +62,7 @@ func infiniteRetryIfXError(f func() error, exception string) error { err := f() if err != nil && is(err, exception) { if !xErrorWasLogged { - _ = catcher.Error("An error occurred (%s), will keep retrying indefinitely...", err, nil) + _ = catcher.Error("An error occurred (%s), will keep retrying indefinitely...", err, map[string]any{"process": "plugin_com.utmstack.o365"}) xErrorWasLogged = true } time.Sleep(wait) diff --git a/plugins/o365/config/config.go b/plugins/o365/config/config.go index 5efd3266a..2d672f5d0 100644 --- a/plugins/o365/config/config.go +++ b/plugins/o365/config/config.go @@ -43,7 +43,7 @@ func StartConfigurationSystem() { for { pluginConfig := plugins.PluginCfg("com.utmstack", false) if !pluginConfig.Exists() { - _ = catcher.Error("plugin configuration not found", nil, nil) + _ = catcher.Error("plugin configuration not found", nil, map[string]any{"process": "plugin_com.utmstack.o365"}) time.Sleep(reconnectDelay) continue } @@ -69,7 +69,7 @@ func StartConfigurationSystem() { ) if err != nil { - catcher.Error("Failed to connect to server", err, nil) + catcher.Error("Failed to connect to server", err, map[string]any{"process": "plugin_com.utmstack.o365"}) cancel() time.Sleep(reconnectDelay) continue @@ -77,7 +77,7 @@ func StartConfigurationSystem() { state := conn.GetState() if state == connectivity.Shutdown || state == connectivity.TransientFailure { - catcher.Error("Connection is in shutdown or transient failure state", nil, nil) + catcher.Error("Connection is in shutdown or transient failure state", nil, map[string]any{"process": "plugin_com.utmstack.o365"}) cancel() time.Sleep(reconnectDelay) continue @@ -86,7 +86,7 @@ func StartConfigurationSystem() { client := NewConfigServiceClient(conn) stream, err := client.StreamConfig(ctx) if err != nil { - catcher.Error("Failed to create stream", err, nil) + catcher.Error("Failed to create stream", err, map[string]any{"process": "plugin_com.utmstack.o365"}) conn.Close() cancel() time.Sleep(reconnectDelay) @@ -99,7 +99,7 @@ func StartConfigurationSystem() { }, }) if err != nil { - catcher.Error("Failed to send PluginInit", err, nil) + catcher.Error("Failed to send PluginInit", err, map[string]any{"process": "plugin_com.utmstack.o365"}) conn.Close() cancel() time.Sleep(reconnectDelay) @@ -110,7 +110,7 @@ func StartConfigurationSystem() { in, err := stream.Recv() if err != nil { if strings.Contains(err.Error(), "EOF") { - catcher.Info("Stream closed by server, reconnecting...", nil) + catcher.Info("Stream closed by server, reconnecting...", map[string]any{"process": "plugin_com.utmstack.o365"}) conn.Close() cancel() time.Sleep(reconnectDelay) @@ -118,13 +118,13 @@ func StartConfigurationSystem() { } st, ok := status.FromError(err) if ok && (st.Code() == codes.Unavailable || st.Code() == codes.Canceled) { - catcher.Error("Stream error: "+st.Message(), err, nil) + catcher.Error("Stream error: "+st.Message(), err, map[string]any{"process": "plugin_com.utmstack.o365"}) conn.Close() cancel() time.Sleep(reconnectDelay) break } else { - catcher.Error("Stream receive error", err, nil) + catcher.Error("Stream receive error", err, map[string]any{"process": "plugin_com.utmstack.o365"}) time.Sleep(reconnectDelay) continue } @@ -132,7 +132,7 @@ func StartConfigurationSystem() { switch message := in.Payload.(type) { case *BiDirectionalMessage_Config: - catcher.Info("Received configuration update", map[string]any{"config": message.Config}) + catcher.Info("Received configuration update", map[string]any{"process": "plugin_com.utmstack.o365", "config": message.Config}) cnf = message.Config } } diff --git a/plugins/o365/go.mod b/plugins/o365/go.mod index c89f3d298..f7b49a919 100644 --- a/plugins/o365/go.mod +++ b/plugins/o365/go.mod @@ -1,51 +1,56 @@ module github.com/utmstack/UTMStack/plugins/o365 -go 1.24.2 +go 1.25.5 require ( github.com/google/uuid v1.6.0 - github.com/threatwinds/go-sdk v1.0.43 - google.golang.org/grpc v1.74.2 - google.golang.org/protobuf v1.36.6 + github.com/threatwinds/go-sdk v1.1.7 + google.golang.org/grpc v1.78.0 + google.golang.org/protobuf v1.36.11 ) require ( - cel.dev/expr v0.24.0 // indirect + cel.dev/expr v0.25.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/bytedance/sonic v1.14.0 // indirect - github.com/bytedance/sonic/loader v0.3.0 // indirect - github.com/cloudwego/base64x v0.1.5 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/bytedance/gopkg v0.1.3 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect github.com/gin-contrib/sse v1.1.0 // indirect - github.com/gin-gonic/gin v1.10.1 // indirect + github.com/gin-gonic/gin v1.11.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.27.0 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect github.com/goccy/go-json v0.10.5 // indirect - github.com/google/cel-go v0.26.0 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect + github.com/google/cel-go v0.26.1 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect - github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/opensearch-project/opensearch-go/v4 v4.6.0 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect github.com/stoewer/go-strcase v1.3.1 // indirect github.com/tidwall/gjson v1.18.0 // indirect - github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.3.0 // indirect - go.yaml.in/yaml/v2 v2.4.2 // indirect - golang.org/x/arch v0.19.0 // indirect - golang.org/x/crypto v0.40.0 // indirect - golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 // indirect - golang.org/x/net v0.42.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/text v0.27.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 // indirect + github.com/ugorji/go/codec v1.3.1 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - sigs.k8s.io/yaml v1.5.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/plugins/o365/go.sum b/plugins/o365/go.sum index 9a099f3d9..605fc201b 100644 --- a/plugins/o365/go.sum +++ b/plugins/o365/go.sum @@ -1,25 +1,25 @@ -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= -github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= -github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= +github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= -github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= -github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -30,25 +30,27 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= -github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -62,80 +64,97 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc= +github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/threatwinds/go-sdk v1.0.43 h1:q2Pl0DvmFpeBCs5sZRcsG1oDn2zIoIB5vHwcJ/VDgD8= -github.com/threatwinds/go-sdk v1.0.43/go.mod h1:S0R7kQj2BsTgaYnX6eZ3keEFRy9yt4f9SCEKYMJzD6g= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo= +github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= +github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= -github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= -go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= -go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= -go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= -go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= -go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= -go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= -go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= -golang.org/x/arch v0.19.0 h1:LmbDQUodHThXE+htjrnmVD73M//D9GTH6wFZjyDkjyU= -golang.org/x/arch v0.19.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 h1:R9PFI6EUdfVKgwKjZef7QIwGcBKu86OEFpJ9nUEP2l4= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ= +github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 h1:mVXdvnmR3S3BQOqHECm9NGMjYiRtEvDYcqAqedTXY6s= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 h1:qJW29YvkiJmXOYMu5Tf8lyrTp3dOS+K4z6IixtLaCf8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ= -sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/plugins/o365/main.go b/plugins/o365/main.go index 188a94f6f..706e4c30f 100644 --- a/plugins/o365/main.go +++ b/plugins/o365/main.go @@ -70,7 +70,7 @@ func GetCloudConfig(env CloudEnvironment) CloudConfig { } func main() { - mode := plugins.GetCfg().Env.Mode + mode := plugins.GetCfg("plugin_com.utmstack.o365").Env.Mode if mode != "manager" { return } @@ -78,7 +78,7 @@ func main() { go config.StartConfigurationSystem() for i := 0; i < 2*runtime.NumCPU(); i++ { - go plugins.SendLogsFromChannel() + go plugins.SendLogsFromChannel("com.utmstack.o365") } delay := 5 * time.Minute @@ -123,6 +123,7 @@ func checkConfiguredEnvironments(groups []*config.ModuleGroup) { for authority, env := range uniqueAuthorities { if err := ConnectionChecker(authority); err != nil { _ = catcher.Error("External connection failure detected", err, map[string]any{ + "process": "plugin_com.utmstack.o365", "environment": env, "authority": authority, }) @@ -144,13 +145,13 @@ func pull(startTime time.Time, endTime time.Time, group *config.ModuleGroup) { err := agent.GetAuth() if err != nil { - _ = catcher.Error("error getting auth", err, nil) + _ = catcher.Error("error getting auth", err, map[string]any{"process": "plugin_com.utmstack.o365"}) return } err = agent.StartSubscriptions() if err != nil { - _ = catcher.Error("error starting subscriptions", err, nil) + _ = catcher.Error("error starting subscriptions", err, map[string]any{"process": "plugin_com.utmstack.o365"}) return } @@ -163,7 +164,7 @@ func pull(startTime time.Time, endTime time.Time, group *config.ModuleGroup) { DataSource: group.GroupName, Timestamp: time.Now().UTC().Format(time.RFC3339Nano), Raw: log, - }) + }, "com.utmstack.o365") } } @@ -267,6 +268,7 @@ func (o *OfficeProcessor) GetAuth() error { } _ = catcher.Error("error getting authentication, retrying", err, map[string]any{ + "process": "plugin_com.utmstack.o365", "retry": retry + 1, "maxRetries": maxRetries, }) @@ -278,7 +280,7 @@ func (o *OfficeProcessor) GetAuth() error { } } - return catcher.Error("all retries failed when getting authentication", err, nil) + return catcher.Error("all retries failed when getting authentication", err, map[string]any{"process": "plugin_com.utmstack.o365"}) } func (o *OfficeProcessor) StartSubscriptions() error { @@ -312,6 +314,7 @@ func (o *OfficeProcessor) StartSubscriptions() error { } _ = catcher.Error("error starting subscription, retrying", err, map[string]any{ + "process": "plugin_com.utmstack.o365", "retry": retry + 1, "maxRetries": maxRetries, "subscription": subscription, @@ -326,6 +329,7 @@ func (o *OfficeProcessor) StartSubscriptions() error { if err != nil { return catcher.Error("all retries failed when starting subscription", err, map[string]any{ + "process": "plugin_com.utmstack.o365", "subscription": subscription, }) } @@ -364,6 +368,7 @@ func (o *OfficeProcessor) GetContentList(subscription string, startTime time.Tim } _ = catcher.Error("error getting content list, retrying", err, map[string]any{ + "process": "plugin_com.utmstack.o365", "retry": retry + 1, "maxRetries": maxRetries, "subscription": subscription, @@ -378,6 +383,7 @@ func (o *OfficeProcessor) GetContentList(subscription string, startTime time.Tim } return []ContentList{}, catcher.Error("all retries failed when getting content list", err, map[string]any{ + "process": "plugin_com.utmstack.o365", "subscription": subscription, "status": status, }) @@ -404,6 +410,7 @@ func (o *OfficeProcessor) GetContentDetails(url string) (ContentDetailsResponse, } _ = catcher.Error("error getting content details, retrying", err, map[string]any{ + "process": "plugin_com.utmstack.o365", "retry": retry + 1, "maxRetries": maxRetries, "url": url, @@ -418,8 +425,9 @@ func (o *OfficeProcessor) GetContentDetails(url string) (ContentDetailsResponse, } return ContentDetailsResponse{}, catcher.Error("all retries failed when getting content details", err, map[string]any{ - "url": url, - "status": status, + "process": "plugin_com.utmstack.o365", + "url": url, + "status": status, }) } @@ -428,7 +436,7 @@ func (o *OfficeProcessor) GetLogs(startTime, endTime time.Time) []string { for _, subscription := range o.Subscriptions { contentList, err := o.GetContentList(subscription, startTime, endTime) if err != nil { - _ = catcher.Error("error getting content list", err, nil) + _ = catcher.Error("error getting content list", err, map[string]any{"process": "plugin_com.utmstack.o365"}) continue } @@ -436,14 +444,14 @@ func (o *OfficeProcessor) GetLogs(startTime, endTime time.Time) []string { for _, log := range contentList { details, err := o.GetContentDetails(log.ContentUri) if err != nil { - _ = catcher.Error("error getting content details", err, nil) + _ = catcher.Error("error getting content details", err, map[string]any{"process": "plugin_com.utmstack.o365"}) continue } if len(details) > 0 { for _, detail := range details { rawDetail, err := json.Marshal(detail) if err != nil { - _ = catcher.Error("error marshalling content details", err, nil) + _ = catcher.Error("error marshalling content details", err, map[string]any{"process": "plugin_com.utmstack.o365"}) continue } logs = append(logs, string(rawDetail)) diff --git a/plugins/soc-ai/alert.go b/plugins/soc-ai/alert.go index d7e3115cc..2020782fc 100644 --- a/plugins/soc-ai/alert.go +++ b/plugins/soc-ai/alert.go @@ -98,6 +98,7 @@ func alertToAlertFields(alert *plugins.Alert) schema.AlertFields { Impact: alert.Impact, ImpactScore: alert.ImpactScore, DeduplicatedBy: alert.DeduplicateBy, + GroupedBy: alert.GroupBy, } return a diff --git a/plugins/soc-ai/config/config.go b/plugins/soc-ai/config/config.go index 3999d329c..3d411aec3 100644 --- a/plugins/soc-ai/config/config.go +++ b/plugins/soc-ai/config/config.go @@ -9,7 +9,6 @@ import ( "github.com/threatwinds/go-sdk/catcher" "github.com/threatwinds/go-sdk/plugins" - "github.com/utmstack/UTMStack/plugins/soc-ai/utils" "google.golang.org/grpc" codes "google.golang.org/grpc/codes" "google.golang.org/grpc/connectivity" @@ -56,7 +55,7 @@ func StartConfigurationSystem() { for { pluginConfig := plugins.PluginCfg("com.utmstack", false) if !pluginConfig.Exists() { - _ = catcher.Error("plugin configuration not found", nil, nil) + _ = catcher.Error("plugin configuration not found", nil, map[string]any{"process": "plugin_com.utmstack.soc-ai"}) time.Sleep(reconnectDelay) continue } @@ -86,7 +85,7 @@ func StartConfigurationSystem() { ) if err != nil { - catcher.Error("Failed to connect to server", err, nil) + catcher.Error("Failed to connect to server", err, map[string]any{"process": "plugin_com.utmstack.soc-ai"}) connCancel() time.Sleep(reconnectDelay) continue @@ -94,7 +93,7 @@ func StartConfigurationSystem() { state := conn.GetState() if state == connectivity.Shutdown || state == connectivity.TransientFailure { - catcher.Error("Connection is in shutdown or transient failure state", nil, nil) + catcher.Error("Connection is in shutdown or transient failure state", nil, map[string]any{"process": "plugin_com.utmstack.soc-ai"}) conn.Close() connCancel() time.Sleep(reconnectDelay) @@ -104,7 +103,7 @@ func StartConfigurationSystem() { client := NewConfigServiceClient(conn) stream, err := client.StreamConfig(connCtx) if err != nil { - catcher.Error("Failed to create stream", err, nil) + catcher.Error("Failed to create stream", err, map[string]any{"process": "plugin_com.utmstack.soc-ai"}) conn.Close() connCancel() time.Sleep(reconnectDelay) @@ -117,7 +116,7 @@ func StartConfigurationSystem() { }, }) if err != nil { - catcher.Error("Failed to send PluginInit", err, nil) + catcher.Error("Failed to send PluginInit", err, map[string]any{"process": "plugin_com.utmstack.soc-ai"}) conn.Close() connCancel() time.Sleep(reconnectDelay) @@ -128,7 +127,7 @@ func StartConfigurationSystem() { in, err := stream.Recv() if err != nil { if strings.Contains(err.Error(), "EOF") { - catcher.Info("Stream closed by server, reconnecting...", nil) + catcher.Info("Stream closed by server, reconnecting...", map[string]any{"process": "plugin_com.utmstack.soc-ai"}) conn.Close() connCancel() time.Sleep(reconnectDelay) @@ -136,13 +135,13 @@ func StartConfigurationSystem() { } st, ok := status.FromError(err) if ok && (st.Code() == codes.Unavailable || st.Code() == codes.Canceled) { - catcher.Error("Stream error: "+st.Message(), err, nil) + catcher.Error("Stream error: "+st.Message(), err, map[string]any{"process": "plugin_com.utmstack.soc-ai"}) conn.Close() connCancel() time.Sleep(reconnectDelay) break } else { - catcher.Error("Stream receive error", err, nil) + catcher.Error("Stream receive error", err, map[string]any{"process": "plugin_com.utmstack.soc-ai"}) time.Sleep(reconnectDelay) continue } @@ -150,7 +149,7 @@ func StartConfigurationSystem() { switch message := in.Payload.(type) { case *BiDirectionalMessage_Config: - catcher.Info("Received configuration update", map[string]any{"config": message.Config}) + catcher.Info("Received configuration update", map[string]any{"process": "plugin_com.utmstack.soc-ai", "config": message.Config}) updateConfigFromGRPC(message.Config) } } @@ -166,7 +165,6 @@ func updateConfigFromGRPC(grpcConf *ConfigurationSection) { defer configMutex.Unlock() if grpcConf == nil { - utils.Logger.LogF(100, "Received nil configuration from gRPC") return } @@ -194,7 +192,7 @@ func updateConfigFromGRPC(grpcConf *ConfigurationSection) { case "utmstack.socai.custom.url": customURL = c.ConfValue default: - utils.Logger.LogF(100, "Unknown configuration key: %s", c.ConfKey) + catcher.Error("Unknown configuration key", nil, map[string]any{"process": "plugin_com.utmstack.soc-ai"}) } } diff --git a/plugins/soc-ai/elastic.go b/plugins/soc-ai/elastic.go index 2b5f27837..06d007b95 100644 --- a/plugins/soc-ai/elastic.go +++ b/plugins/soc-ai/elastic.go @@ -33,14 +33,14 @@ func processAlertToElastic(alert *schema.AlertFields) error { if config.GetConfig().ChangeAlertStatus { err = elastic.ChangeAlertStatus(alert.ID, config.API_ALERT_COMPLETED_STATUS_CODE, alert.DataSource, alert.GPTClassification+" - "+alert.GPTReasoning) if err != nil { - _ = catcher.Error("error while changing alert status in elastic: %v", err, nil) + _ = catcher.Error("error while changing alert status in elastic: %v", err, map[string]any{"process": "plugin_com.utmstack.soc-ai"}) } } if config.GetConfig().AutomaticIncidentCreation && alert.GPTClassification == "possible incident" { incidentsDetails, err := elastic.GetIncidentsByPattern("Incident in " + alert.DataSource) if err != nil { - _ = catcher.Error("error while getting incidents by pattern: %v", err, nil) + _ = catcher.Error("error while getting incidents by pattern: %v", err, map[string]any{"process": "plugin_com.utmstack.soc-ai"}) } incidentExists := false @@ -50,7 +50,7 @@ func processAlertToElastic(alert *schema.AlertFields) error { incidentExists = true err = elastic.AddAlertToIncident(incident.ID, alert) if err != nil { - _ = catcher.Error("error while adding alert to incident: %v", err, nil) + _ = catcher.Error("error while adding alert to incident: %v", err, map[string]any{"process": "plugin_com.utmstack.soc-ai"}) } } } @@ -59,7 +59,7 @@ func processAlertToElastic(alert *schema.AlertFields) error { if !incidentExists { err = elastic.CreateNewIncident(alert) if err != nil { - _ = catcher.Error("error while creating incident: %v", err, nil) + _ = catcher.Error("error while creating incident: %v", err, map[string]any{"process": "plugin_com.utmstack.soc-ai"}) } } } diff --git a/plugins/soc-ai/elastic/alerts.go b/plugins/soc-ai/elastic/alerts.go index d9343fef4..4ff3319e7 100644 --- a/plugins/soc-ai/elastic/alerts.go +++ b/plugins/soc-ai/elastic/alerts.go @@ -28,7 +28,5 @@ func ChangeAlertStatus(id string, status int, dataSource string, observations st return fmt.Errorf("error while doing request: %v, status: %d, response: %v", err, statusCode, string(resp)) } - utils.Logger.LogF(100, "Alert %s status changed successfully", id) - return nil } diff --git a/plugins/soc-ai/elastic/error.go b/plugins/soc-ai/elastic/error.go index ca8b675dc..65084e648 100644 --- a/plugins/soc-ai/elastic/error.go +++ b/plugins/soc-ai/elastic/error.go @@ -9,7 +9,7 @@ import ( func RegisterError(message string, id string) { err := IndexStatus(id, "Error", "update") if err != nil { - _ = catcher.Error("error while indexing error in elastic: %v", err, nil) + _ = catcher.Error("error while indexing error in elastic: %v", err, map[string]any{"process": "plugin_com.utmstack.soc-ai"}) } - _ = catcher.Error("TODO: Explain this error", errors.New(message), nil) + _ = catcher.Error("soc-ai operation error", errors.New(message), map[string]any{"process": "plugin_com.utmstack.soc-ai"}) } diff --git a/plugins/soc-ai/elastic/incidents.go b/plugins/soc-ai/elastic/incidents.go index 8e8515f3a..0531ae6b1 100644 --- a/plugins/soc-ai/elastic/incidents.go +++ b/plugins/soc-ai/elastic/incidents.go @@ -46,8 +46,6 @@ func CreateNewIncident(alertDetails *schema.AlertFields) error { return fmt.Errorf("error while doing request: %v, status: %d, response: %v", err, statusCode, string(resp)) } - utils.Logger.LogF(100, "Incident %s created successfully", body.IncidentName) - return nil } @@ -82,8 +80,6 @@ func AddAlertToIncident(incidentId int, alertDetails *schema.AlertFields) error return fmt.Errorf("error while doing request: %v, status: %d, response: %v", err, statusCode, string(resp)) } - utils.Logger.LogF(100, "Alert %s added to incident %d successfully", alertDetails.ID, incidentId) - return nil } diff --git a/plugins/soc-ai/go.mod b/plugins/soc-ai/go.mod index 79c93657c..b8ae90350 100644 --- a/plugins/soc-ai/go.mod +++ b/plugins/soc-ai/go.mod @@ -1,54 +1,57 @@ module github.com/utmstack/UTMStack/plugins/soc-ai -go 1.24.2 +go 1.25.5 + +require google.golang.org/grpc v1.78.0 require ( - github.com/threatwinds/logger v1.2.2 - google.golang.org/grpc v1.74.2 + github.com/bytedance/gopkg v0.1.3 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect + github.com/opensearch-project/opensearch-go/v4 v4.6.0 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect ) -require go.yaml.in/yaml/v2 v2.4.2 // indirect - require ( - cel.dev/expr v0.24.0 // indirect + cel.dev/expr v0.25.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/bytedance/sonic v1.14.0 // indirect - github.com/bytedance/sonic/loader v0.3.0 // indirect - github.com/cloudwego/base64x v0.1.5 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect github.com/gin-contrib/sse v1.1.0 // indirect - github.com/gin-gonic/gin v1.10.1 // indirect + github.com/gin-gonic/gin v1.11.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.27.0 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect github.com/goccy/go-json v0.10.5 // indirect - github.com/google/cel-go v0.26.0 // indirect + github.com/google/cel-go v0.26.1 // indirect github.com/google/uuid v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect - github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/stoewer/go-strcase v1.3.1 // indirect - github.com/threatwinds/go-sdk v1.0.43 + github.com/threatwinds/go-sdk v1.1.7 github.com/tidwall/gjson v1.18.0 // indirect - github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.3.0 // indirect - golang.org/x/arch v0.19.0 // indirect - golang.org/x/crypto v0.40.0 // indirect - golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 // indirect - golang.org/x/net v0.42.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/text v0.27.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/protobuf v1.36.6 - gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect + github.com/ugorji/go/codec v1.3.1 // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/protobuf v1.36.11 gopkg.in/yaml.v3 v3.0.1 // indirect - sigs.k8s.io/yaml v1.5.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/plugins/soc-ai/go.sum b/plugins/soc-ai/go.sum index 23b886812..605fc201b 100644 --- a/plugins/soc-ai/go.sum +++ b/plugins/soc-ai/go.sum @@ -1,25 +1,25 @@ -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= -github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= -github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= +github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= -github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= -github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -30,25 +30,27 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= -github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -62,84 +64,97 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc= +github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/threatwinds/go-sdk v1.0.43 h1:q2Pl0DvmFpeBCs5sZRcsG1oDn2zIoIB5vHwcJ/VDgD8= -github.com/threatwinds/go-sdk v1.0.43/go.mod h1:S0R7kQj2BsTgaYnX6eZ3keEFRy9yt4f9SCEKYMJzD6g= -github.com/threatwinds/logger v1.2.2 h1:sVuT8yhbecPqP4tT8EwHfp1czNC6e1wdkE1ihNnuBdA= -github.com/threatwinds/logger v1.2.2/go.mod h1:Amq0QI1y7fkTpnBUgeGVu2Z/C4u4ys2pNLUOuj3UAAU= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo= +github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= +github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= -github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= -go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= -go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= -go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= -go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= -go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= -go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= -go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= -golang.org/x/arch v0.19.0 h1:LmbDQUodHThXE+htjrnmVD73M//D9GTH6wFZjyDkjyU= -golang.org/x/arch v0.19.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 h1:R9PFI6EUdfVKgwKjZef7QIwGcBKu86OEFpJ9nUEP2l4= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ= +github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 h1:mVXdvnmR3S3BQOqHECm9NGMjYiRtEvDYcqAqedTXY6s= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 h1:qJW29YvkiJmXOYMu5Tf8lyrTp3dOS+K4z6IixtLaCf8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= -gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ= -sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/plugins/soc-ai/llm.go b/plugins/soc-ai/llm.go index 35a60ea3f..90b6b4354 100644 --- a/plugins/soc-ai/llm.go +++ b/plugins/soc-ai/llm.go @@ -6,6 +6,7 @@ import ( "strings" "time" + "github.com/threatwinds/go-sdk/catcher" "github.com/utmstack/UTMStack/plugins/soc-ai/config" "github.com/utmstack/UTMStack/plugins/soc-ai/correlation" "github.com/utmstack/UTMStack/plugins/soc-ai/schema" @@ -47,8 +48,6 @@ func sendRequestToLLM(alert *schema.AlertFields) error { }, } - utils.Logger.LogF(100, "Sending request to LLM: %v", req) - requestJson, err := json.Marshal(req) if err != nil { return fmt.Errorf("error marshalling request: %v", err) @@ -80,8 +79,8 @@ func sendRequestToLLM(alert *schema.AlertFields) error { } } - utils.Logger.LogF(500, "LLM appears to be DOWN - all %d attempts failed for alert %s. Provider: %s, URL: %s, Last error: %v", - maxRetries, alert.ID, config.GetConfig().Provider, config.GetConfig().Url, lastErr) + catcher.Error(fmt.Sprintf("LLM appears to be DOWN - all %d attempts failed for alert %s. Provider: %s, URL: %s, Last error: %v", + maxRetries, alert.ID, config.GetConfig().Provider, config.GetConfig().Url, lastErr), nil, map[string]any{"process": "plugin_com.utmstack.soc-ai"}) return fmt.Errorf("all attempts to call LLM failed: %v", lastErr) } diff --git a/plugins/soc-ai/main.go b/plugins/soc-ai/main.go index f6ff75ea7..e2e437220 100644 --- a/plugins/soc-ai/main.go +++ b/plugins/soc-ai/main.go @@ -2,164 +2,52 @@ package main import ( "context" - "net" "os" "time" "github.com/threatwinds/go-sdk/catcher" "github.com/threatwinds/go-sdk/plugins" - twutil "github.com/threatwinds/go-sdk/utils" "github.com/utmstack/UTMStack/plugins/soc-ai/config" - "github.com/utmstack/UTMStack/plugins/soc-ai/utils" - "google.golang.org/grpc" "google.golang.org/protobuf/types/known/emptypb" ) -type socAiServer struct { - plugins.UnimplementedCorrelationServer -} - func main() { - utils.Logger.Info("Starting soc-ai plugin...") + if plugins.GetCfg("plugin_com.utmstack.soc-ai").GetEnv().Mode == "playground" { + return + } go config.StartConfigurationSystem() time.Sleep(2 * time.Second) - InitializeQueue() + initializeQueue() - // Retry logic for creating socket directory - maxRetries := 3 - retryDelay := 2 * time.Second - var socketsFolder twutil.Folder - var err error - - for retry := 0; retry < maxRetries; retry++ { - socketsFolder, err = twutil.MkdirJoin(plugins.WorkDir, "sockets") - if err == nil { - utils.Logger.LogF(100, "Socket directory %s created", socketsFolder) - break - } - - _ = catcher.Error("cannot create socket directory, retrying", err, map[string]any{ - "retry": retry + 1, - "maxRetries": maxRetries, + err := plugins.InitCorrelationPlugin("com.utmstack.soc-ai", correlate) + if err != nil { + _ = catcher.Error("failed to start correlation plugin", err, map[string]any{ + "process": "plugin_com.utmstack.soc-ai", }) - - if retry < maxRetries-1 { - time.Sleep(retryDelay) - // Increase delay for next retry - retryDelay *= 2 - } else { - // If all retries failed, log the error and return - _ = catcher.Error("all retries failed when creating socket directory", err, nil) - return - } - } - - socketFile := socketsFolder.FileJoin("com.utmstack.soc-ai_correlation.sock") - _ = os.Remove(socketFile) - - // Retry logic for resolving unix address - retryDelay = 2 * time.Second - var unixAddress *net.UnixAddr - - for retry := 0; retry < maxRetries; retry++ { - unixAddress, err = net.ResolveUnixAddr("unix", socketFile) - if err == nil { - utils.Logger.LogF(100, "Socket file %s created", socketFile) - break - } - - _ = catcher.Error("cannot resolve unix address, retrying", err, map[string]any{ - "retry": retry + 1, - "maxRetries": maxRetries, - }) - - if retry < maxRetries-1 { - time.Sleep(retryDelay) - // Increase delay for next retry - retryDelay *= 2 - } else { - // If all retries failed, log the error and return - _ = catcher.Error("all retries failed when resolving unix address", err, nil) - return - } - } - - // Retry logic for listening to unix socket - retryDelay = 2 * time.Second - var listener *net.UnixListener - - for retry := 0; retry < maxRetries; retry++ { - listener, err = net.ListenUnix("unix", unixAddress) - if err == nil { - utils.Logger.LogF(100, "Listening on %s", socketFile) - break - } - - _ = catcher.Error("cannot listen to unix socket, retrying", err, map[string]any{ - "retry": retry + 1, - "maxRetries": maxRetries, - }) - - if retry < maxRetries-1 { - time.Sleep(retryDelay) - // Increase delay for next retry - retryDelay *= 2 - } else { - // If all retries failed, log the error and return - _ = catcher.Error("all retries failed when listening to unix socket", err, nil) - return - } - } - - grpcServer := grpc.NewServer() - plugins.RegisterCorrelationServer(grpcServer, &socAiServer{}) - - // Serve with error handling and retry logic - retryDelay = 2 * time.Second - for retry := 0; retry < maxRetries; retry++ { - err := grpcServer.Serve(listener) - if err == nil { - break - } - - _ = catcher.Error("cannot serve grpc, retrying", err, map[string]any{ - "retry": retry + 1, - "maxRetries": maxRetries, - }) - - if retry < maxRetries-1 { - time.Sleep(retryDelay) - // Increase delay for next retry - retryDelay *= 2 - } else { - // If all retries failed, log the error and return - _ = catcher.Error("all retries failed when listening to unix socket", err, nil) - return - } + os.Exit(1) } } -func (p *socAiServer) Correlate(_ context.Context, +func correlate(_ context.Context, alert *plugins.Alert) (*emptypb.Empty, error) { defer func() { if r := recover(); r != nil { _ = catcher.Error("recovered from panic in Correlate method", nil, map[string]any{ - "panic": r, - "alert": alert.Name, + "process": "plugin_com.utmstack.soc-ai", + "panic": r, + "alert": alert.Name, }) } }() // Check if the module is active before processing the alert if config.GetConfig() == nil || !config.GetConfig().ModuleActive { - utils.Logger.LogF(100, "SOC-AI module is disabled, skipping alert: %s", alert.Id) return &emptypb.Empty{}, nil } - if !EnqueueAlert(alert) { - utils.Logger.LogF(300, "Alert %s was dropped due to full queue", alert.Id) + if !enqueueAlert(alert) { return &emptypb.Empty{}, nil } diff --git a/plugins/soc-ai/queue.go b/plugins/soc-ai/queue.go index cf330db89..8b36d84fb 100644 --- a/plugins/soc-ai/queue.go +++ b/plugins/soc-ai/queue.go @@ -7,7 +7,6 @@ import ( "sync/atomic" "time" - "github.com/google/uuid" "github.com/threatwinds/go-sdk/catcher" "github.com/threatwinds/go-sdk/plugins" "github.com/utmstack/UTMStack/plugins/soc-ai/config" @@ -49,7 +48,7 @@ const ( QueueFullTimeout = 100 * time.Millisecond ) -func InitializeQueue() { +func initializeQueue() { ctx, cancel := context.WithCancel(context.Background()) alertQueue = &AlertQueue{ @@ -66,12 +65,10 @@ func InitializeQueue() { go alertQueue.metricsLogger() - utils.Logger.LogF(100, "Alert queue initialized with %d workers and queue size %d", DefaultWorkerCount, DefaultQueueSize) } -func EnqueueAlert(alert *plugins.Alert) bool { +func enqueueAlert(alert *plugins.Alert) bool { if alertQueue == nil { - utils.Logger.LogF(500, "Alert queue not initialized") return false } @@ -85,7 +82,6 @@ func EnqueueAlert(alert *plugins.Alert) bool { atomic.AddInt64(&alertQueue.queueSize, 1) // Reset consecutive drops counter on successful enqueue atomic.StoreInt64(&alertQueue.consecutiveDrops, 0) - utils.Logger.LogF(100, "Alert %s enqueued for processing", alert.Id) return true case <-time.After(QueueFullTimeout): atomic.AddInt64(&alertQueue.droppedCount, 1) @@ -95,16 +91,12 @@ func EnqueueAlert(alert *plugins.Alert) bool { totalDropped := atomic.LoadInt64(&alertQueue.droppedCount) consecutiveDrops := atomic.LoadInt64(&alertQueue.consecutiveDrops) - _ = plugins.EnqueueNotification(plugins.TopicIntegrationFailure, plugins.Message{ - Id: uuid.NewString(), - Message: catcher.Error("Alert Dropped", nil, map[string]any{ - "id": alert.Id, - "total_dropped": totalDropped, - "consecutive_drops": consecutiveDrops, - }).Error(), + _ = catcher.Error("Alert Dropped due to queue full", nil, map[string]any{ + "process": "plugin_com.utmstack.soc-ai", + "id": alert.Id, + "total_dropped": totalDropped, + "consecutive_drops": consecutiveDrops, }) - utils.Logger.ErrorF("QUEUE FULL - Alert %s DROPPED! Queue size: %d/%d, Total dropped: %d, Consecutive: %d.", - alert.Id, currentQueueSize, DefaultQueueSize, totalDropped, consecutiveDrops) elastic.RegisterError(fmt.Sprintf("Alert dropped - Queue FULL (%d/%d)", currentQueueSize, DefaultQueueSize), alert.Id) alertQueue.lastDropAlert = time.Now() @@ -131,15 +123,13 @@ func (aq *AlertQueue) worker(workerID int) { } func (aq *AlertQueue) processAlert(workerID int, item *AlertQueueItem) { - startTime := time.Now() alert := cleanAlerts(alertToAlertFields(item.Alert)) - utils.Logger.LogF(100, "Worker %d processing alert: %s", workerID, alert.ID) - defer func() { if r := recover(); r != nil { atomic.AddInt64(&aq.errorCount, 1) _ = catcher.Error("recovered from panic in alert processing", nil, map[string]any{ + "process": "plugin_com.utmstack.soc-ai", "panic": r, "alert": alert.Name, "workerID": workerID, @@ -149,7 +139,6 @@ func (aq *AlertQueue) processAlert(workerID int, item *AlertQueueItem) { }() if config.GetConfig() == nil || !config.GetConfig().ModuleActive { - utils.Logger.LogF(100, "SOC-AI module is disabled, skipping alert: %s", alert.ID) atomic.AddInt64(&aq.processedCount, 1) return } @@ -157,7 +146,7 @@ func (aq *AlertQueue) processAlert(workerID int, item *AlertQueueItem) { if config.GetConfig().Provider == "openai" { if err := utils.ConnectionChecker(config.GPT_API_ENDPOINT); err != nil { atomic.AddInt64(&aq.errorCount, 1) - _ = catcher.Error("Failed to establish internet connection", err, nil) + _ = catcher.Error("Failed to establish internet connection", err, map[string]any{"process": "plugin_com.utmstack.soc-ai"}) elastic.RegisterError("Failed to establish internet connection", alert.ID) return } @@ -178,11 +167,6 @@ func (aq *AlertQueue) processAlert(workerID int, item *AlertQueueItem) { } atomic.AddInt64(&aq.processedCount, 1) - duration := time.Since(startTime) - queueTime := startTime.Sub(item.Timestamp) - - utils.Logger.LogF(100, "Worker %d completed alert %s in %v (queue time: %v)", - workerID, alert.ID, duration, queueTime) } func (aq *AlertQueue) metricsLogger() { @@ -199,8 +183,13 @@ func (aq *AlertQueue) metricsLogger() { errors := atomic.LoadInt64(&aq.errorCount) queueSize := atomic.LoadInt64(&aq.queueSize) - utils.Logger.LogF(200, "Queue metrics - Processed: %d, Dropped: %d, Errors: %d, Current queue size: %d", - processed, dropped, errors, queueSize) + catcher.Info("SOC-AI queue metrics", map[string]any{ + "process": "plugin_com.utmstack.soc-ai", + "processed": processed, + "dropped": dropped, + "errors": errors, + "queueSize": queueSize, + }) } } } diff --git a/plugins/soc-ai/schema/new_schema.go b/plugins/soc-ai/schema/new_schema.go index 05a229d5c..0f61ba8f8 100644 --- a/plugins/soc-ai/schema/new_schema.go +++ b/plugins/soc-ai/schema/new_schema.go @@ -31,6 +31,7 @@ type AlertFields struct { Notes string `json:"notes"` TagRulesApplied []int `json:"tagRulesApplied,omitempty"` DeduplicatedBy []string `json:"deduplicatedBy,omitempty"` + GroupedBy []string `json:"groupedBy,omitempty"` GPTTimestamp string `json:"gpt_timestamp,omitempty"` GPTClassification string `json:"gpt_classification,omitempty"` GPTReasoning string `json:"gpt_reasoning,omitempty"` diff --git a/plugins/soc-ai/utils/check.go b/plugins/soc-ai/utils/check.go index 0e3723583..3b7fc31ba 100644 --- a/plugins/soc-ai/utils/check.go +++ b/plugins/soc-ai/utils/check.go @@ -52,7 +52,7 @@ func infiniteRetryIfXError(f func() error, exception string) error { err := f() if err != nil && is(err, exception) { if !xErrorWasLogged { - _ = catcher.Error("An error occurred, will keep retrying indefinitely...", err, nil) + _ = catcher.Error("An error occurred, will keep retrying indefinitely...", err, map[string]any{"process": "plugin_com.utmstack.soc-ai"}) xErrorWasLogged = true } time.Sleep(wait) diff --git a/plugins/soc-ai/utils/logger.go b/plugins/soc-ai/utils/logger.go deleted file mode 100644 index 4332e7f5a..000000000 --- a/plugins/soc-ai/utils/logger.go +++ /dev/null @@ -1,31 +0,0 @@ -package utils - -import ( - "log" - "os" - "strconv" - - "github.com/threatwinds/logger" -) - -var Logger *logger.Logger - -func init() { - lenv := os.Getenv("LOG_LEVEL") - var level int - var err error - - if lenv != "" && lenv != " " { - level, err = strconv.Atoi(lenv) - if err != nil { - log.Fatalln(err) - } - } else { - level = 200 - } - - Logger = logger.NewLogger(&logger.Config{ - Format: "text", - Level: level, - }) -} diff --git a/plugins/sophos/check.go b/plugins/sophos/check.go index 51c0ab79b..0492387d9 100644 --- a/plugins/sophos/check.go +++ b/plugins/sophos/check.go @@ -41,7 +41,7 @@ func checkConnection(url string) error { defer func() { err := resp.Body.Close() if err != nil { - _ = catcher.Error("error closing response body: %v", err, nil) + _ = catcher.Error("error closing response body", err, map[string]any{"process": "plugin_com.utmstack.sophos"}) } }() @@ -55,7 +55,7 @@ func infiniteRetryIfXError(f func() error, exception string) error { err := f() if err != nil && is(err, exception) { if !xErrorWasLogged { - _ = catcher.Error("An error occurred (%s), will keep retrying indefinitely...", err, nil) + _ = catcher.Error("An error occurred, will keep retrying indefinitely...", err, map[string]any{"process": "plugin_com.utmstack.sophos"}) xErrorWasLogged = true } time.Sleep(wait) diff --git a/plugins/sophos/config/config.go b/plugins/sophos/config/config.go index d115cbadb..118b494c5 100644 --- a/plugins/sophos/config/config.go +++ b/plugins/sophos/config/config.go @@ -43,7 +43,7 @@ func StartConfigurationSystem() { for { pluginConfig := plugins.PluginCfg("com.utmstack", false) if !pluginConfig.Exists() { - _ = catcher.Error("plugin configuration not found", nil, nil) + _ = catcher.Error("plugin configuration not found", nil, map[string]any{"process": "plugin_com.utmstack.sophos"}) time.Sleep(reconnectDelay) continue } @@ -69,7 +69,7 @@ func StartConfigurationSystem() { ) if err != nil { - catcher.Error("Failed to connect to server", err, nil) + catcher.Error("Failed to connect to server", err, map[string]any{"process": "plugin_com.utmstack.sophos"}) cancel() time.Sleep(reconnectDelay) continue @@ -77,7 +77,7 @@ func StartConfigurationSystem() { state := conn.GetState() if state == connectivity.Shutdown || state == connectivity.TransientFailure { - catcher.Error("Connection is in shutdown or transient failure state", nil, nil) + catcher.Error("Connection is in shutdown or transient failure state", nil, map[string]any{"process": "plugin_com.utmstack.sophos"}) cancel() time.Sleep(reconnectDelay) continue @@ -86,7 +86,7 @@ func StartConfigurationSystem() { client := NewConfigServiceClient(conn) stream, err := client.StreamConfig(ctx) if err != nil { - catcher.Error("Failed to create stream", err, nil) + catcher.Error("Failed to create stream", err, map[string]any{"process": "plugin_com.utmstack.sophos"}) conn.Close() cancel() time.Sleep(reconnectDelay) @@ -99,7 +99,7 @@ func StartConfigurationSystem() { }, }) if err != nil { - catcher.Error("Failed to send PluginInit", err, nil) + catcher.Error("Failed to send PluginInit", err, map[string]any{"process": "plugin_com.utmstack.sophos"}) conn.Close() cancel() time.Sleep(reconnectDelay) @@ -110,7 +110,7 @@ func StartConfigurationSystem() { in, err := stream.Recv() if err != nil { if strings.Contains(err.Error(), "EOF") { - catcher.Info("Stream closed by server, reconnecting...", nil) + catcher.Info("Stream closed by server, reconnecting...", map[string]any{"process": "plugin_com.utmstack.sophos"}) conn.Close() cancel() time.Sleep(reconnectDelay) @@ -118,13 +118,13 @@ func StartConfigurationSystem() { } st, ok := status.FromError(err) if ok && (st.Code() == codes.Unavailable || st.Code() == codes.Canceled) { - catcher.Error("Stream error: "+st.Message(), err, nil) + catcher.Error("Stream error", err, map[string]any{"process": "plugin_com.utmstack.sophos", "status_message": st.Message()}) conn.Close() cancel() time.Sleep(reconnectDelay) break } else { - catcher.Error("Stream receive error", err, nil) + catcher.Error("Stream receive error", err, map[string]any{"process": "plugin_com.utmstack.sophos"}) time.Sleep(reconnectDelay) continue } @@ -132,7 +132,7 @@ func StartConfigurationSystem() { switch message := in.Payload.(type) { case *BiDirectionalMessage_Config: - catcher.Info("Received configuration update", map[string]any{"config": message.Config}) + catcher.Info("Received configuration update", map[string]any{"config": message.Config, "process": "plugin_com.utmstack.sophos"}) cnf = message.Config } } diff --git a/plugins/sophos/go.mod b/plugins/sophos/go.mod index 3c48dd640..0628bce04 100644 --- a/plugins/sophos/go.mod +++ b/plugins/sophos/go.mod @@ -1,51 +1,56 @@ module github.com/utmstack/UTMStack/plugins/sophos -go 1.24.4 +go 1.25.5 require ( github.com/google/uuid v1.6.0 - github.com/threatwinds/go-sdk v1.0.43 - google.golang.org/grpc v1.74.2 - google.golang.org/protobuf v1.36.6 + github.com/threatwinds/go-sdk v1.1.7 + google.golang.org/grpc v1.78.0 + google.golang.org/protobuf v1.36.11 ) require ( - cel.dev/expr v0.24.0 // indirect + cel.dev/expr v0.25.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/bytedance/sonic v1.14.0 // indirect - github.com/bytedance/sonic/loader v0.3.0 // indirect - github.com/cloudwego/base64x v0.1.5 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/bytedance/gopkg v0.1.3 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect github.com/gin-contrib/sse v1.1.0 // indirect - github.com/gin-gonic/gin v1.10.1 // indirect + github.com/gin-gonic/gin v1.11.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.27.0 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect github.com/goccy/go-json v0.10.5 // indirect - github.com/google/cel-go v0.26.0 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect + github.com/google/cel-go v0.26.1 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect - github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/opensearch-project/opensearch-go/v4 v4.6.0 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect github.com/stoewer/go-strcase v1.3.1 // indirect github.com/tidwall/gjson v1.18.0 // indirect - github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.3.0 // indirect - go.yaml.in/yaml/v2 v2.4.2 // indirect - golang.org/x/arch v0.19.0 // indirect - golang.org/x/crypto v0.40.0 // indirect - golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 // indirect - golang.org/x/net v0.42.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/text v0.27.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 // indirect + github.com/ugorji/go/codec v1.3.1 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - sigs.k8s.io/yaml v1.5.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/plugins/sophos/go.sum b/plugins/sophos/go.sum index 9a099f3d9..605fc201b 100644 --- a/plugins/sophos/go.sum +++ b/plugins/sophos/go.sum @@ -1,25 +1,25 @@ -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= -github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= -github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= +github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= -github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= -github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -30,25 +30,27 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= -github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -62,80 +64,97 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc= +github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/threatwinds/go-sdk v1.0.43 h1:q2Pl0DvmFpeBCs5sZRcsG1oDn2zIoIB5vHwcJ/VDgD8= -github.com/threatwinds/go-sdk v1.0.43/go.mod h1:S0R7kQj2BsTgaYnX6eZ3keEFRy9yt4f9SCEKYMJzD6g= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo= +github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= +github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= -github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= -go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= -go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= -go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= -go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= -go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= -go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= -go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= -golang.org/x/arch v0.19.0 h1:LmbDQUodHThXE+htjrnmVD73M//D9GTH6wFZjyDkjyU= -golang.org/x/arch v0.19.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 h1:R9PFI6EUdfVKgwKjZef7QIwGcBKu86OEFpJ9nUEP2l4= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ= +github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 h1:mVXdvnmR3S3BQOqHECm9NGMjYiRtEvDYcqAqedTXY6s= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 h1:qJW29YvkiJmXOYMu5Tf8lyrTp3dOS+K4z6IixtLaCf8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ= -sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/plugins/sophos/main.go b/plugins/sophos/main.go index 7896dcfaf..a5c8dbdd5 100644 --- a/plugins/sophos/main.go +++ b/plugins/sophos/main.go @@ -32,7 +32,7 @@ var ( ) func main() { - mode := plugins.GetCfg().Env.Mode + mode := plugins.GetCfg("plugin_com.utmstack.sophos").Env.Mode if mode != "manager" { return } @@ -40,7 +40,7 @@ func main() { go config.StartConfigurationSystem() for t := 0; t < 2*runtime.NumCPU(); t++ { - go plugins.SendLogsFromChannel() + go plugins.SendLogsFromChannel("com.utmstack.sophos") } delay := 5 * time.Minute @@ -53,7 +53,7 @@ func main() { endTime := time.Now().UTC() if err := connectionChecker(urlCheckConnection); err != nil { - _ = catcher.Error("External connection failure detected: %v", err, nil) + _ = catcher.Error("External connection failure detected", err, map[string]any{"process": "plugin_com.utmstack.sophos"}) continue } @@ -91,7 +91,7 @@ func pull(startTime time.Time, group *config.ModuleGroup) { agent := getSophosCentralProcessor(group) logs, newNextKey, err := agent.getLogs(startTime.Unix(), prevKey) if err != nil { - _ = catcher.Error("error getting logs", err, nil) + _ = catcher.Error("error getting logs", err, map[string]any{"process": "plugin_com.utmstack.sophos"}) return } @@ -104,7 +104,7 @@ func pull(startTime time.Time, group *config.ModuleGroup) { DataSource: group.GroupName, Timestamp: time.Now().UTC().Format(time.RFC3339Nano), Raw: log, - }) + }, "com.utmstack.sophos") } } @@ -169,6 +169,7 @@ func (p *SophosCentralProcessor) getAccessToken() (string, error) { } _ = catcher.Error("error getting access token, retrying", err, map[string]any{ + "process": "plugin_com.utmstack.sophos", "retry": retry + 1, "maxRetries": maxRetries, }) @@ -181,12 +182,13 @@ func (p *SophosCentralProcessor) getAccessToken() (string, error) { } if err != nil { - return "", catcher.Error("all retries failed when getting access token", err, nil) + return "", catcher.Error("all retries failed when getting access token", err, map[string]any{"process": "plugin_com.utmstack.sophos"}) } accessToken, ok := response["access_token"].(string) if !ok || accessToken == "" { return "", catcher.Error("access_token not found in response after all retries", nil, map[string]any{ + "process": "plugin_com.utmstack.sophos", "response": response, }) } @@ -194,6 +196,7 @@ func (p *SophosCentralProcessor) getAccessToken() (string, error) { expiresIn, ok := response["expires_in"].(float64) if !ok { return "", catcher.Error("expires_in not found in response after all retries", nil, map[string]any{ + "process": "plugin_com.utmstack.sophos", "response": response, }) } @@ -237,6 +240,7 @@ func (p *SophosCentralProcessor) getTenantInfo(accessToken string) error { } _ = catcher.Error("error getting tenant info, retrying", err, map[string]any{ + "process": "plugin_com.utmstack.sophos", "retry": retry + 1, "maxRetries": maxRetries, }) @@ -249,11 +253,12 @@ func (p *SophosCentralProcessor) getTenantInfo(accessToken string) error { } if err != nil { - return catcher.Error("all retries failed when getting tenant info", err, nil) + return catcher.Error("all retries failed when getting tenant info", err, map[string]any{"process": "plugin_com.utmstack.sophos"}) } if response.ID == "" { return catcher.Error("tenant ID not found in whoami response after all retries", nil, map[string]any{ + "process": "plugin_com.utmstack.sophos", "response": response, }) } @@ -261,6 +266,7 @@ func (p *SophosCentralProcessor) getTenantInfo(accessToken string) error { if response.ApiHosts.DataRegion == "" { return catcher.Error("dataRegion not found in whoami response after all retries", nil, map[string]any{ + "process": "plugin_com.utmstack.sophos", "response": response, }) } @@ -303,6 +309,7 @@ func (p *SophosCentralProcessor) getLogs(fromTime int64, nextKey string) ([]stri } _ = catcher.Error("error getting access token, retrying", err, map[string]any{ + "process": "plugin_com.utmstack.sophos", "retry": retry + 1, "maxRetries": maxRetries, }) @@ -315,7 +322,7 @@ func (p *SophosCentralProcessor) getLogs(fromTime int64, nextKey string) ([]stri } if err != nil { - return nil, "", catcher.Error("all retries failed when getting access token", err, nil) + return nil, "", catcher.Error("all retries failed when getting access token", err, map[string]any{"process": "plugin_com.utmstack.sophos"}) } if p.TenantID == "" || p.DataRegion == "" { @@ -327,6 +334,7 @@ func (p *SophosCentralProcessor) getLogs(fromTime int64, nextKey string) ([]stri } _ = catcher.Error("error getting tenant info, retrying", err, map[string]any{ + "process": "plugin_com.utmstack.sophos", "retry": retry + 1, "maxRetries": maxRetries, }) @@ -339,7 +347,7 @@ func (p *SophosCentralProcessor) getLogs(fromTime int64, nextKey string) ([]stri } if err != nil { - return nil, "", catcher.Error("all retries failed when getting tenant info", err, nil) + return nil, "", catcher.Error("all retries failed when getting tenant info", err, map[string]any{"process": "plugin_com.utmstack.sophos"}) } } @@ -366,6 +374,7 @@ func (p *SophosCentralProcessor) getLogs(fromTime int64, nextKey string) ([]stri } _ = catcher.Error("error getting logs, retrying", err, map[string]any{ + "process": "plugin_com.utmstack.sophos", "retry": retry + 1, "maxRetries": maxRetries, }) @@ -378,13 +387,13 @@ func (p *SophosCentralProcessor) getLogs(fromTime int64, nextKey string) ([]stri } if err != nil { - return nil, "", catcher.Error("all retries failed when getting logs", err, nil) + return nil, "", catcher.Error("all retries failed when getting logs", err, map[string]any{"process": "plugin_com.utmstack.sophos"}) } for _, item := range response.Items { jsonItem, err := json.Marshal(item) if err != nil { - _ = catcher.Error("error marshalling content details", err, nil) + _ = catcher.Error("error marshalling content details", err, map[string]any{"process": "plugin_com.utmstack.sophos"}) continue } logs = append(logs, string(jsonItem)) @@ -404,7 +413,8 @@ func (p *SophosCentralProcessor) buildURL(fromTime int64, nextKey string) (*url. u, parseErr := url.Parse(baseURL) if parseErr != nil { return nil, catcher.Error("error parsing url", parseErr, map[string]any{ - "url": baseURL, + "process": "sophos-plugin", + "url": baseURL, }) } diff --git a/plugins/stats/go.mod b/plugins/stats/go.mod index 267917eec..d4e397d34 100644 --- a/plugins/stats/go.mod +++ b/plugins/stats/go.mod @@ -1,52 +1,56 @@ module github.com/utmstack/UTMStack/plugins/stats -go 1.24.2 +go 1.25.5 require ( github.com/google/uuid v1.6.0 - github.com/threatwinds/go-sdk v1.0.43 - google.golang.org/grpc v1.74.2 - google.golang.org/protobuf v1.36.6 + github.com/threatwinds/go-sdk v1.1.7 + google.golang.org/protobuf v1.36.11 ) require ( - cel.dev/expr v0.24.0 // indirect + cel.dev/expr v0.25.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/bytedance/sonic v1.14.0 // indirect - github.com/bytedance/sonic/loader v0.3.0 // indirect - github.com/cloudwego/base64x v0.1.5 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/bytedance/gopkg v0.1.3 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect github.com/gin-contrib/sse v1.1.0 // indirect - github.com/gin-gonic/gin v1.10.1 // indirect + github.com/gin-gonic/gin v1.11.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.27.0 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect github.com/goccy/go-json v0.10.5 // indirect - github.com/google/cel-go v0.26.0 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect + github.com/google/cel-go v0.26.1 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect - github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/opensearch-project/opensearch-go/v2 v2.3.0 // indirect + github.com/opensearch-project/opensearch-go/v4 v4.6.0 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect github.com/stoewer/go-strcase v1.3.1 // indirect github.com/tidwall/gjson v1.18.0 // indirect - github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.3.0 // indirect - go.yaml.in/yaml/v2 v2.4.2 // indirect - golang.org/x/arch v0.19.0 // indirect - golang.org/x/crypto v0.40.0 // indirect - golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 // indirect - golang.org/x/net v0.42.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/text v0.27.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 // indirect + github.com/ugorji/go/codec v1.3.1 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/grpc v1.78.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - sigs.k8s.io/yaml v1.5.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/plugins/stats/go.sum b/plugins/stats/go.sum index 76d128924..605fc201b 100644 --- a/plugins/stats/go.sum +++ b/plugins/stats/go.sum @@ -1,38 +1,25 @@ -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/aws/aws-sdk-go v1.44.263/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= -github.com/aws/aws-sdk-go-v2/config v1.18.25/go.mod h1:dZnYpD5wTW/dQF0rRNLVypB396zWCcPiBIvdvSWHEg4= -github.com/aws/aws-sdk-go-v2/credentials v1.13.24/go.mod h1:jYPYi99wUOPIFi0rhiOvXeSEReVOzBqFNOX5bXYoG2o= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34/go.mod h1:Etz2dj6UHYuw+Xw830KfzCfWGMzqvUTCjUj5b76GVDc= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw= -github.com/aws/aws-sdk-go-v2/service/sso v1.12.10/go.mod h1:ouy2P4z6sJN70fR3ka3wD3Ro3KezSxU6eKGQI2+2fjI= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk= -github.com/aws/aws-sdk-go-v2/service/sts v1.19.0/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8= -github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= -github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= -github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= +github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= -github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= -github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -43,28 +30,27 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= -github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -78,116 +64,97 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/opensearch-project/opensearch-go/v2 v2.3.0 h1:nQIEMr+A92CkhHrZgUhcfsrZjibvB3APXf2a1VwCmMQ= -github.com/opensearch-project/opensearch-go/v2 v2.3.0/go.mod h1:8LDr9FCgUTVoT+5ESjc2+iaZuldqE+23Iq0r1XeNue8= +github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc= +github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/threatwinds/go-sdk v1.0.43 h1:q2Pl0DvmFpeBCs5sZRcsG1oDn2zIoIB5vHwcJ/VDgD8= -github.com/threatwinds/go-sdk v1.0.43/go.mod h1:S0R7kQj2BsTgaYnX6eZ3keEFRy9yt4f9SCEKYMJzD6g= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo= +github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= +github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= -github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= -go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= -go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= -go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= -go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= -go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= -go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= -go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= -go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= -go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= -golang.org/x/arch v0.19.0 h1:LmbDQUodHThXE+htjrnmVD73M//D9GTH6wFZjyDkjyU= -golang.org/x/arch v0.19.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 h1:R9PFI6EUdfVKgwKjZef7QIwGcBKu86OEFpJ9nUEP2l4= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ= +github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 h1:mVXdvnmR3S3BQOqHECm9NGMjYiRtEvDYcqAqedTXY6s= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 h1:qJW29YvkiJmXOYMu5Tf8lyrTp3dOS+K4z6IixtLaCf8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ= -sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/plugins/stats/main.go b/plugins/stats/main.go index 0e5f0742d..54bb11e62 100644 --- a/plugins/stats/main.go +++ b/plugins/stats/main.go @@ -4,137 +4,37 @@ import ( "context" "encoding/json" "fmt" - "net" "os" - "os/signal" "runtime" "sync" - "syscall" "time" + "github.com/google/uuid" "github.com/threatwinds/go-sdk/catcher" + sdkos "github.com/threatwinds/go-sdk/os" "github.com/threatwinds/go-sdk/plugins" - "github.com/threatwinds/go-sdk/utils" - - "github.com/google/uuid" - "github.com/threatwinds/go-sdk/opensearch" - "google.golang.org/grpc" "google.golang.org/protobuf/types/known/emptypb" ) -type notificationServer struct { - plugins.UnimplementedNotificationServer -} - -var statisticsQueue chan map[string]plugins.DataProcessingMessage -var success map[string]map[string]int64 -var successLock sync.Mutex +var statisticsQueue chan map[plugins.Topic]plugins.DataProcessingMessage +var statsMap map[plugins.Topic]map[string]map[string]int64 +var statsLock sync.Mutex func main() { - ctx, cancel := context.WithCancel(context.Background()) - - // Retry logic for initialization - var filePath utils.Folder - var err error - var socketPath string - var unixAddress *net.UnixAddr - var listener *net.UnixListener - - // Retry logic for creating socket directory - maxRetries := 10 - retryDelay := 5 * time.Second - - for retry := 0; retry < maxRetries; retry++ { - filePath, err = utils.MkdirJoin(plugins.WorkDir, "sockets") - if err != nil { - _ = catcher.Error("cannot create directory, retrying", err, map[string]any{ - "retry": retry + 1, - "maxRetries": maxRetries, - }) - time.Sleep(retryDelay) - continue - } - - socketPath = filePath.FileJoin("com.utmstack.stats_notification.sock") - _ = os.Remove(socketPath) - - unixAddress, err = net.ResolveUnixAddr("unix", socketPath) - if err != nil { - _ = catcher.Error("cannot resolve unix address, retrying", err, map[string]any{ - "retry": retry + 1, - "maxRetries": maxRetries, - }) - time.Sleep(retryDelay) - continue - } - - listener, err = net.ListenUnix("unix", unixAddress) - if err != nil { - _ = catcher.Error("cannot listen to unix socket, retrying", err, map[string]any{ - "retry": retry + 1, - "maxRetries": maxRetries, - }) - time.Sleep(retryDelay) - continue - } - - // If we got here, initialization was successful - break - } - - // If all retries failed, log a final error and exit - if listener == nil { - _ = catcher.Error("all retries failed when initializing socket", nil, map[string]any{ - "maxRetries": maxRetries, - }) - os.Exit(1) - } + statisticsQueue = make(chan map[plugins.Topic]plugins.DataProcessingMessage, runtime.NumCPU()*100) + statsMap = make(map[plugins.Topic]map[string]map[string]int64) - statisticsQueue = make(chan map[string]plugins.DataProcessingMessage, runtime.NumCPU()*100) - success = make(map[string]map[string]int64) - - grpcServer := grpc.NewServer() - plugins.RegisterNotificationServer(grpcServer, ¬ificationServer{}) - - pCfg := plugins.PluginCfg("com.utmstack", false) + pCfg := plugins.PluginCfg("org.opensearch", false) osUrl := pCfg.Get("opensearch").String() - // Retry logic for connecting to OpenSearch - maxOSRetries := 10 - osRetryDelay := 5 * time.Second - var osConnected bool - - for retry := 0; retry < maxOSRetries; retry++ { - err := opensearch.Connect([]string{osUrl}) - if err == nil { - osConnected = true - break - } - _ = catcher.Error("cannot connect to ElasticSearch/OpenSearch, retrying", err, map[string]any{ - "retry": retry + 1, - "maxRetries": maxOSRetries, - }) - time.Sleep(osRetryDelay) - } - - // If all retries failed, log a final error and exit - if !osConnected { - _ = catcher.Error("all retries failed when connecting to OpenSearch", nil, map[string]any{ - "maxRetries": maxOSRetries, - }) + err := sdkos.Connect([]string{osUrl}, "", "") + if err != nil { + _ = catcher.Error("failed when connecting to OpenSearch", err, map[string]any{"process": "plugin_com.utmstack.stats"}) os.Exit(1) } var wg sync.WaitGroup - - wg.Add(1) - go func() { - defer wg.Done() - if err := grpcServer.Serve(listener); err != nil { - _ = catcher.Error("cannot serve grpc", err, nil) - // Instead of exiting, just log the error and let the main function handle it - } - }() + ctx, cancel := context.WithCancel(context.Background()) for i := 0; i < runtime.NumCPU(); i++ { wg.Add(1) @@ -150,19 +50,21 @@ func main() { saveToDB(ctx, "success") }() - signs := make(chan os.Signal, 1) - signal.Notify(signs, syscall.SIGINT, syscall.SIGTERM) - <-signs + err = plugins.InitNotificationPlugin("com.utmstack.stats", notify) + if err != nil { + _ = catcher.Error("failed to start notification plugin", err, map[string]any{ + "process": "plugin_com.utmstack.stats", + }) + os.Exit(1) + } - grpcServer.GracefulStop() cancel() - wg.Wait() } -func (p *notificationServer) Notify(_ context.Context, msg *plugins.Message) (*emptypb.Empty, error) { +func notify(_ context.Context, msg *plugins.Message) (*emptypb.Empty, error) { switch plugins.Topic(msg.Topic) { - case plugins.TopicEnqueueSuccess: + case plugins.TopicEnqueueSuccess, plugins.TopicParsingDropped, plugins.TopicAnalysisDropped, plugins.TopicCorrelationDropped: default: return &emptypb.Empty{}, nil } @@ -173,10 +75,10 @@ func (p *notificationServer) Notify(_ context.Context, msg *plugins.Message) (*e err := json.Unmarshal(messageBytes, &pMsg) if err != nil { - return &emptypb.Empty{}, catcher.Error("cannot unmarshal message", err, nil) + return &emptypb.Empty{}, catcher.Error("cannot unmarshal message", err, map[string]any{"process": "plugin_com.utmstack.stats"}) } - statisticsQueue <- map[string]plugins.DataProcessingMessage{msg.Topic: pMsg} + statisticsQueue <- map[plugins.Topic]plugins.DataProcessingMessage{plugins.Topic(msg.Topic): pMsg} return &emptypb.Empty{}, nil } @@ -185,16 +87,19 @@ func processStatistics(ctx context.Context) { for { select { case msg := <-statisticsQueue: - for _, v := range msg { - successLock.Lock() - if _, ok := success[v.DataSource]; !ok { - success[v.DataSource] = make(map[string]int64) + for topic, v := range msg { + statsLock.Lock() + if _, ok := statsMap[topic]; !ok { + statsMap[topic] = make(map[string]map[string]int64) + } + if _, ok := statsMap[topic][v.DataSource]; !ok { + statsMap[topic][v.DataSource] = make(map[string]int64) } - if _, ok := success[v.DataSource][v.DataType]; !ok { - success[v.DataSource][v.DataType] = 0 + if _, ok := statsMap[topic][v.DataSource][v.DataType]; !ok { + statsMap[topic][v.DataSource][v.DataType] = 0 } - success[v.DataSource][v.DataType]++ - successLock.Unlock() + statsMap[topic][v.DataSource][v.DataType]++ + statsLock.Unlock() } case <-ctx.Done(): return @@ -221,32 +126,34 @@ func saveToDB(ctx context.Context, t string) { } } -func extractSuccess() []Statistic { - successLock.Lock() - defer successLock.Unlock() +func extractStats() []Statistic { + statsLock.Lock() + defer statsLock.Unlock() var result []Statistic - for dataSource, dataTypes := range success { - for dataType, count := range dataTypes { - result = append(result, Statistic{ - Timestamp: time.Now().UTC().Format(time.RFC3339Nano), - DataSource: dataSource, - DataType: dataType, - Count: count, - Type: string(plugins.TopicEnqueueSuccess), - }) + for topic, sourceMap := range statsMap { + for dataSource, typeMap := range sourceMap { + for dataType, count := range typeMap { + result = append(result, Statistic{ + Timestamp: time.Now().UTC().Format(time.RFC3339Nano), + DataSource: dataSource, + DataType: dataType, + Count: count, + Type: string(topic), + }) + } } } - success = make(map[string]map[string]int64) + statsMap = make(map[plugins.Topic]map[string]map[string]int64) return result } func sendStatistic(t string) { - success := extractSuccess() - for _, s := range success { + stats := extractStats() + for _, s := range stats { saveToOpenSearch(s) } } @@ -259,7 +166,7 @@ func saveToOpenSearch[Data any](data Data) { for retry := 0; retry < maxRetries; retry++ { oCtx, cancel := context.WithTimeout(context.Background(), 15*time.Second) - err := opensearch.IndexDoc(oCtx, &data, fmt.Sprintf("v11-statistics-%s", time.Now().UTC().Format("2006.01")), uuid.NewString()) + err := sdkos.IndexDoc(oCtx, &data, fmt.Sprintf("v11-statistics-%s", time.Now().UTC().Format("2006.01")), uuid.NewString()) cancel() if err == nil { @@ -268,6 +175,7 @@ func saveToOpenSearch[Data any](data Data) { } _ = catcher.Error("cannot index document, retrying", err, map[string]any{ + "process": "plugin_com.utmstack.stats", "retry": retry + 1, "maxRetries": maxRetries, }) @@ -281,6 +189,7 @@ func saveToOpenSearch[Data any](data Data) { // After all retries, log a final error _ = catcher.Error("all retries failed when indexing document", nil, map[string]any{ + "process": "plugin_com.utmstack.stats", "maxRetries": maxRetries, }) } diff --git a/plugins/threadwinds-ingestion/README.md b/plugins/threadwinds-ingestion/README.md new file mode 100644 index 000000000..b8ddfc1cf --- /dev/null +++ b/plugins/threadwinds-ingestion/README.md @@ -0,0 +1,18 @@ +# UTMStack Plugin for ThreadWinds Ingestion + + +## Description + +UTMStack Plugin for ThreadWinds Ingestion is a connector developed in Golang that extracts security entities from `UTMStack incidents and alerts` and sends them to the `ThreadWinds` threat intelligence platform. + +This plugin processes incidents from UTMStack, extracts entities (IPs, domains, hashes, emails, etc.) from their associated alerts and events, and ingests them into ThreadWinds for global threat intelligence correlation and enrichment. + +The connector automatically registers with ThreadWinds services using the admin email from the UTMStack system. It periodically polls for recent incidents, extracts all relevant entities (network indicators, file hashes, user identities, etc.), builds associations between entities, and sends them to ThreadWinds for analysis. + +### Requirements +**ThreadWinds Credentials:** + +- API Key +- API Secret + +Please note that the connector automatically registers with ThreadWinds using the admin email if credentials are not already configured. The connector requires a valid admin email to run. diff --git a/plugins/threadwinds-ingestion/config/config.go b/plugins/threadwinds-ingestion/config/config.go new file mode 100644 index 000000000..c6fc63872 --- /dev/null +++ b/plugins/threadwinds-ingestion/config/config.go @@ -0,0 +1,31 @@ +package config + +type TWConfig struct { + InternalKey string + BackendURL string + ThreadWindsURL string + OpenSearchHost string + OpenSearchPort string + DBHost string + DBPort string + DBUser string + DBPassword string + DBName string +} + +func GetTWConfig() (*TWConfig, error) { + cfg := &TWConfig{ + InternalKey: GetInternalKey(), + BackendURL: GetBackendUrl(), + ThreadWindsURL: GetThreadWindsURL(), + OpenSearchHost: GetOpenSearchHost(), + OpenSearchPort: GetOpenSearchPort(), + DBHost: GetDBHost(), + DBPort: GetDBPort(), + DBUser: GetDBUser(), + DBPassword: GetDBPassword(), + DBName: GetDBName(), + } + + return cfg, nil +} diff --git a/plugins/threadwinds-ingestion/config/const.go b/plugins/threadwinds-ingestion/config/const.go new file mode 100644 index 000000000..25388bfd9 --- /dev/null +++ b/plugins/threadwinds-ingestion/config/const.go @@ -0,0 +1,64 @@ +package config + +import ( + "os" + "strings" + + "github.com/utmstack/UTMStack/threadwinds-ingestion/utils" +) + +func GetInternalKey() string { + return utils.Getenv("INTERNAL_KEY") +} + +func GetBackendUrl() string { + return utils.Getenv("BACKEND_URL") +} + +func GetThreadWindsURL() string { + if isDevEnvironment() { + return "https://apis.dev.threatwinds.com" + } + return "https://apis.threatwinds.com" +} + +func GetOpenSearchHost() string { + return utils.Getenv("OPENSEARCH_HOST") +} + +func GetOpenSearchPort() string { + return utils.Getenv("OPENSEARCH_PORT") +} + +func GetDBHost() string { + return utils.Getenv("DB_HOST") +} + +func GetDBPort() string { + return utils.Getenv("DB_PORT") +} + +func GetDBUser() string { + return utils.Getenv("DB_USER") +} + +func GetDBPassword() string { + return utils.Getenv("DB_PASS") +} + +func GetDBName() string { + return utils.Getenv("DB_NAME") +} + +func isDevEnvironment() bool { + env := os.Getenv("ENV") + if env != "" { + if strings.Contains(env, "-dev") || + strings.Contains(env, "-qa") || + strings.Contains(env, "-rc") { + return true + } + } + + return false +} diff --git a/plugins/threadwinds-ingestion/go.mod b/plugins/threadwinds-ingestion/go.mod new file mode 100644 index 000000000..34cdffb98 --- /dev/null +++ b/plugins/threadwinds-ingestion/go.mod @@ -0,0 +1,60 @@ +module github.com/utmstack/UTMStack/threadwinds-ingestion + +go 1.25.5 + +require ( + github.com/AtlasInsideCorp/AtlasInsideAES v1.0.0 + github.com/opensearch-project/opensearch-go/v2 v2.3.0 + github.com/threatwinds/go-sdk v1.1.7 + golang.org/x/sync v0.19.0 + gopkg.in/yaml.v2 v2.4.0 +) + +require ( + cel.dev/expr v0.25.1 // indirect + github.com/antlr4-go/antlr/v4 v4.13.1 // indirect + github.com/bytedance/gopkg v0.1.3 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect + github.com/gin-contrib/sse v1.1.0 // indirect + github.com/gin-gonic/gin v1.11.0 // indirect + github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect + github.com/goccy/go-json v0.10.5 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect + github.com/google/cel-go v0.26.1 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/cpuid/v2 v2.3.0 // indirect + github.com/leodido/go-urn v1.4.0 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/opensearch-project/opensearch-go/v4 v4.6.0 // indirect + github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect + github.com/stoewer/go-strcase v1.3.1 // indirect + github.com/tidwall/gjson v1.18.0 // indirect + github.com/tidwall/match v1.2.0 // indirect + github.com/tidwall/pretty v1.2.1 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect + github.com/ugorji/go/codec v1.3.1 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/grpc v1.78.0 // indirect + google.golang.org/protobuf v1.36.11 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect +) diff --git a/plugins/threadwinds-ingestion/go.sum b/plugins/threadwinds-ingestion/go.sum new file mode 100644 index 000000000..2bf07c72f --- /dev/null +++ b/plugins/threadwinds-ingestion/go.sum @@ -0,0 +1,218 @@ +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= +github.com/AtlasInsideCorp/AtlasInsideAES v1.0.0 h1:TBiBl9KCa4i4epY0/q9WSC4ugavL6+6JUkOXWDnMM6I= +github.com/AtlasInsideCorp/AtlasInsideAES v1.0.0/go.mod h1:cRhQ3TS/VEfu/z+qaciyuDZdtxgaXgaX8+G6Wa5NzBk= +github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= +github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= +github.com/aws/aws-sdk-go v1.44.263/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= +github.com/aws/aws-sdk-go-v2/config v1.18.25/go.mod h1:dZnYpD5wTW/dQF0rRNLVypB396zWCcPiBIvdvSWHEg4= +github.com/aws/aws-sdk-go-v2/credentials v1.13.24/go.mod h1:jYPYi99wUOPIFi0rhiOvXeSEReVOzBqFNOX5bXYoG2o= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34/go.mod h1:Etz2dj6UHYuw+Xw830KfzCfWGMzqvUTCjUj5b76GVDc= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw= +github.com/aws/aws-sdk-go-v2/service/sso v1.12.10/go.mod h1:ouy2P4z6sJN70fR3ka3wD3Ro3KezSxU6eKGQI2+2fjI= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk= +github.com/aws/aws-sdk-go-v2/service/sts v1.19.0/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8= +github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= +github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= +github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= +github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= +github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= +github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= +github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= +github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/opensearch-project/opensearch-go/v2 v2.3.0 h1:nQIEMr+A92CkhHrZgUhcfsrZjibvB3APXf2a1VwCmMQ= +github.com/opensearch-project/opensearch-go/v2 v2.3.0/go.mod h1:8LDr9FCgUTVoT+5ESjc2+iaZuldqE+23Iq0r1XeNue8= +github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc= +github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ= +github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= +github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= +github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo= +github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw= +github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= +github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= +github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= +github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ= +github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/plugins/threadwinds-ingestion/internal/association/association_builder.go b/plugins/threadwinds-ingestion/internal/association/association_builder.go new file mode 100644 index 000000000..389718622 --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/association/association_builder.go @@ -0,0 +1,144 @@ +package association + +import ( + "sync" + + "github.com/threatwinds/go-sdk/catcher" + "github.com/threatwinds/go-sdk/entities" +) + +type AssociationBuilder struct { + rules []*AssociationRule + entityRegistry *sync.Map + seenHashes *sync.Map + mu sync.RWMutex +} + +func NewAssociationBuilder() *AssociationBuilder { + builder := &AssociationBuilder{ + rules: GetEnabledRules(), + entityRegistry: &sync.Map{}, + seenHashes: &sync.Map{}, + } + catcher.Info("association builder initialized", map[string]any{ + "total_rules": len(builder.rules), + }) + return builder +} + +func (b *AssociationBuilder) RegisterEntity(entity *entities.Entity, entityID, sourcePath string, ctx AssociationContext) { + ref := &EntityReference{ + Entity: entity, + EntityID: entityID, + EntityType: entity.Type, + SourcePath: sourcePath, + Context: ctx, + } + b.entityRegistry.Store(entityID, ref) +} + +func (b *AssociationBuilder) BuildAssociations() []*entities.Entity { + contextGroups := b.groupByContext() + for _, refs := range contextGroups { + b.detectAssociationsInContext(refs) + } + result := make([]*entities.Entity, 0, 256) + b.entityRegistry.Range(func(key, value any) bool { + if ref, ok := value.(*EntityReference); ok { + if entity, ok := ref.Entity.(*entities.Entity); ok { + result = append(result, entity) + } + } + return true + }) + return result +} + +func (b *AssociationBuilder) groupByContext() map[string][]*EntityReference { + groups := make(map[string][]*EntityReference) + b.entityRegistry.Range(func(key, value any) bool { + if ref, ok := value.(*EntityReference); ok { + contextKey := ref.Context.AlertID + if contextKey != "" { + groups[contextKey] = append(groups[contextKey], ref) + } + } + return true + }) + return groups +} + +func (b *AssociationBuilder) detectAssociationsInContext(refs []*EntityReference) { + for _, rule := range b.rules { + if !rule.Enabled { + continue + } + for i, sourceRef := range refs { + if sourceRef.EntityType != rule.SourceType { + continue + } + for j, targetRef := range refs { + if i == j { + continue + } + if targetRef.EntityType != rule.TargetType { + continue + } + if b.shouldCreateAssociation(sourceRef, targetRef) { + b.createAssociation(sourceRef, targetRef, rule) + } + } + } + } +} + +func (b *AssociationBuilder) shouldCreateAssociation(source, target *EntityReference) bool { + if source.Context.SameEvent(target.Context) { + return true + } + + if source.Context.IsOriginToTarget(target.Context) { + return true + } + + if source.Context.CrossEventAssociation(target.Context) { + return true + } + + return false +} + +func (b *AssociationBuilder) createAssociation(source, target *EntityReference, rule *AssociationRule) { + sourceEntity, ok := source.Entity.(*entities.Entity) + if !ok { + return + } + targetEntity, ok := target.Entity.(*entities.Entity) + if !ok { + return + } + associatedEntity := entities.EntityAssociation{ + Mode: string(rule.Mode), + Entity: entities.Entity{ + Type: targetEntity.Type, + Attributes: targetEntity.Attributes, + }, + } + if sourceEntity.Associations == nil { + sourceEntity.Associations = make([]entities.EntityAssociation, 0, 50) + } + sourceEntity.Associations = append(sourceEntity.Associations, associatedEntity) +} + +func (b *AssociationBuilder) CountAssociations(entities []*entities.Entity) int { + count := 0 + for _, entity := range entities { + count += len(entity.Associations) + } + return count +} + +func (b *AssociationBuilder) ClearRegistry() { + b.entityRegistry = &sync.Map{} + b.seenHashes = &sync.Map{} +} diff --git a/plugins/threadwinds-ingestion/internal/association/association_context.go b/plugins/threadwinds-ingestion/internal/association/association_context.go new file mode 100644 index 000000000..8121f8c38 --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/association/association_context.go @@ -0,0 +1,40 @@ +package association + +type AssociationContext struct { + AlertID string + EventID string + IncidentID string + SourceField string +} + +type EntityReference struct { + Entity any + EntityID string + EntityType string + SourcePath string + Context AssociationContext +} + +func (ctx *AssociationContext) IsOrigin() bool { + return ctx.SourceField == "origin" +} + +func (ctx *AssociationContext) IsTarget() bool { + return ctx.SourceField == "target" +} + +func (ctx *AssociationContext) SameAlert(other AssociationContext) bool { + return ctx.AlertID != "" && ctx.AlertID == other.AlertID +} + +func (ctx *AssociationContext) SameEvent(other AssociationContext) bool { + return ctx.EventID != "" && ctx.EventID == other.EventID +} + +func (ctx *AssociationContext) IsOriginToTarget(other AssociationContext) bool { + return ctx.SameEvent(other) && ctx.IsOrigin() && other.IsTarget() +} + +func (ctx *AssociationContext) CrossEventAssociation(other AssociationContext) bool { + return ctx.SameAlert(other) && ctx.EventID != "" && other.EventID != "" && ctx.EventID != other.EventID +} diff --git a/plugins/threadwinds-ingestion/internal/association/association_rules.go b/plugins/threadwinds-ingestion/internal/association/association_rules.go new file mode 100644 index 000000000..0a657c6ed --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/association/association_rules.go @@ -0,0 +1,524 @@ +package association + +type AssociationMode string + +const ( + Association AssociationMode = "association" + Aggregation AssociationMode = "aggregation" +) + +type AssociationRule struct { + Name string + SourceType string + TargetType string + Mode AssociationMode + Enabled bool +} + +var DefaultRules = []*AssociationRule{ + // ==================== Network Associations ==================== + // Bidirectional IP-Domain relationships + { + Name: "ip-to-domain", + SourceType: "ip", + TargetType: "domain", + Mode: Association, + Enabled: true, + }, + { + Name: "domain-to-ip", + SourceType: "domain", + TargetType: "ip", + Mode: Association, + Enabled: true, + }, + + // Bidirectional IP-Hostname relationships + { + Name: "hostname-to-ip", + SourceType: "hostname", + TargetType: "ip", + Mode: Association, + Enabled: true, + }, + { + Name: "ip-to-hostname", + SourceType: "ip", + TargetType: "hostname", + Mode: Association, + Enabled: true, + }, + + // IP Network Infrastructure + { + Name: "ip-to-port", + SourceType: "ip", + TargetType: "port", + Mode: Aggregation, + Enabled: true, + }, + { + Name: "ip-to-mac", + SourceType: "ip", + TargetType: "mac-address", + Mode: Association, + Enabled: true, + }, + { + Name: "mac-to-ip", + SourceType: "mac-address", + TargetType: "ip", + Mode: Association, + Enabled: true, + }, + { + Name: "ip-to-asn", + SourceType: "ip", + TargetType: "asn", + Mode: Association, + Enabled: true, + }, + + // URL relationships + { + Name: "url-to-domain", + SourceType: "url", + TargetType: "domain", + Mode: Association, + Enabled: true, + }, + { + Name: "url-to-ip", + SourceType: "url", + TargetType: "ip", + Mode: Association, + Enabled: true, + }, + + // ==================== Email Associations ==================== + { + Name: "email-to-emailaddress", + SourceType: "email", + TargetType: "email-address", + Mode: Aggregation, + Enabled: true, + }, + { + Name: "email-to-domain", + SourceType: "email", + TargetType: "domain", + Mode: Association, + Enabled: true, + }, + { + Name: "email-to-ip", + SourceType: "email", + TargetType: "ip", + Mode: Association, + Enabled: true, + }, + { + Name: "emailaddress-to-domain", + SourceType: "email-address", + TargetType: "domain", + Mode: Association, + Enabled: true, + }, + { + Name: "domain-to-emailaddress", + SourceType: "domain", + TargetType: "email-address", + Mode: Association, + Enabled: true, + }, + { + Name: "dkim-to-domain", + SourceType: "dkim", + TargetType: "domain", + Mode: Association, + Enabled: true, + }, + { + Name: "dkim-signature-to-email", + SourceType: "dkim-signature", + TargetType: "email", + Mode: Aggregation, + Enabled: true, + }, + + // ==================== File Associations ==================== + { + Name: "file-to-path", + SourceType: "file", + TargetType: "path", + Mode: Association, + Enabled: true, + }, + { + Name: "file-to-mimetype", + SourceType: "file", + TargetType: "mime-type", + Mode: Association, + Enabled: true, + }, + { + Name: "file-to-ip", + SourceType: "file", + TargetType: "ip", + Mode: Association, + Enabled: true, + }, + { + Name: "file-to-url", + SourceType: "file", + TargetType: "url", + Mode: Association, + Enabled: true, + }, + { + Name: "file-to-domain", + SourceType: "file", + TargetType: "domain", + Mode: Association, + Enabled: true, + }, + + // File Hash Associations + { + Name: "file-to-md5", + SourceType: "file", + TargetType: "md5", + Mode: Aggregation, + Enabled: true, + }, + { + Name: "file-to-sha1", + SourceType: "file", + TargetType: "sha1", + Mode: Aggregation, + Enabled: true, + }, + { + Name: "file-to-sha256", + SourceType: "file", + TargetType: "sha256", + Mode: Aggregation, + Enabled: true, + }, + + // ==================== Malware Associations ==================== + { + Name: "malware-to-domain", + SourceType: "malware", + TargetType: "domain", + Mode: Association, + Enabled: true, + }, + { + Name: "malware-to-ip", + SourceType: "malware", + TargetType: "ip", + Mode: Association, + Enabled: true, + }, + { + Name: "malware-to-file", + SourceType: "malware", + TargetType: "file", + Mode: Aggregation, + Enabled: true, + }, + { + Name: "file-to-malware", + SourceType: "file", + TargetType: "malware", + Mode: Association, + Enabled: true, + }, + { + Name: "malware-to-url", + SourceType: "malware", + TargetType: "url", + Mode: Association, + Enabled: true, + }, + { + Name: "malware-to-process", + SourceType: "malware", + TargetType: "process", + Mode: Association, + Enabled: true, + }, + { + Name: "process-to-malware", + SourceType: "process", + TargetType: "malware", + Mode: Association, + Enabled: true, + }, + + // ==================== Certificate and Fingerprint Associations ==================== + { + Name: "certificate-to-domain", + SourceType: "certificate-fingerprint", + TargetType: "domain", + Mode: Association, + Enabled: true, + }, + { + Name: "domain-to-certificate", + SourceType: "domain", + TargetType: "certificate-fingerprint", + Mode: Association, + Enabled: true, + }, + { + Name: "certificate-to-ip", + SourceType: "certificate-fingerprint", + TargetType: "ip", + Mode: Association, + Enabled: true, + }, + { + Name: "ja3-to-ip", + SourceType: "ja3-fingerprint", + TargetType: "ip", + Mode: Association, + Enabled: true, + }, + { + Name: "jarm-to-ip", + SourceType: "jarm-fingerprint", + TargetType: "ip", + Mode: Association, + Enabled: true, + }, + { + Name: "jarm-to-domain", + SourceType: "jarm-fingerprint", + TargetType: "domain", + Mode: Association, + Enabled: true, + }, + { + Name: "ssh-fingerprint-to-ip", + SourceType: "ssh-fingerprint", + TargetType: "ip", + Mode: Association, + Enabled: true, + }, + { + Name: "ssh-banner-to-ip", + SourceType: "ssh-banner", + TargetType: "ip", + Mode: Association, + Enabled: true, + }, + + // ==================== System and Process Associations ==================== + { + Name: "process-to-ip", + SourceType: "process", + TargetType: "ip", + Mode: Association, + Enabled: true, + }, + { + Name: "ip-to-process", + SourceType: "ip", + TargetType: "process", + Mode: Association, + Enabled: true, + }, + { + Name: "process-to-file", + SourceType: "process", + TargetType: "file", + Mode: Association, + Enabled: true, + }, + { + Name: "file-to-process", + SourceType: "file", + TargetType: "process", + Mode: Association, + Enabled: true, + }, + { + Name: "process-to-command", + SourceType: "process", + TargetType: "command", + Mode: Aggregation, + Enabled: true, + }, + { + Name: "process-to-user", + SourceType: "process", + TargetType: "username", + Mode: Association, + Enabled: true, + }, + { + Name: "user-to-process", + SourceType: "username", + TargetType: "process", + Mode: Association, + Enabled: true, + }, + { + Name: "command-to-user", + SourceType: "command", + TargetType: "username", + Mode: Association, + Enabled: true, + }, + { + Name: "user-to-command", + SourceType: "username", + TargetType: "command", + Mode: Association, + Enabled: true, + }, + { + Name: "windows-task-to-user", + SourceType: "windows-scheduled-task", + TargetType: "username", + Mode: Association, + Enabled: true, + }, + { + Name: "windows-service-to-file", + SourceType: "windows-service-name", + TargetType: "file", + Mode: Association, + Enabled: true, + }, + { + Name: "hostname-to-user", + SourceType: "hostname", + TargetType: "username", + Mode: Association, + Enabled: true, + }, + + // ==================== Vulnerability Associations ==================== + { + Name: "cve-to-cpe", + SourceType: "cve", + TargetType: "cpe", + Mode: Association, + Enabled: true, + }, + { + Name: "cpe-to-cve", + SourceType: "cpe", + TargetType: "cve", + Mode: Association, + Enabled: true, + }, + { + Name: "cve-to-file", + SourceType: "cve", + TargetType: "file", + Mode: Association, + Enabled: true, + }, + { + Name: "file-to-cve", + SourceType: "file", + TargetType: "cve", + Mode: Association, + Enabled: true, + }, + { + Name: "cve-to-ip", + SourceType: "cve", + TargetType: "ip", + Mode: Association, + Enabled: true, + }, + { + Name: "ip-to-cve", + SourceType: "ip", + TargetType: "cve", + Mode: Association, + Enabled: true, + }, + + // ==================== Web Associations ==================== + { + Name: "cookie-to-domain", + SourceType: "cookie", + TargetType: "domain", + Mode: Association, + Enabled: true, + }, + { + Name: "domain-to-cookie", + SourceType: "domain", + TargetType: "cookie", + Mode: Association, + Enabled: true, + }, + + // ==================== Identity Associations ==================== + { + Name: "user-to-ip", + SourceType: "username", + TargetType: "ip", + Mode: Association, + Enabled: true, + }, + { + Name: "ip-to-user", + SourceType: "ip", + TargetType: "username", + Mode: Association, + Enabled: true, + }, + { + Name: "user-to-group", + SourceType: "username", + TargetType: "group", + Mode: Association, + Enabled: true, + }, + { + Name: "group-to-user", + SourceType: "group", + TargetType: "username", + Mode: Association, + Enabled: true, + }, + { + Name: "user-to-hostname", + SourceType: "username", + TargetType: "hostname", + Mode: Association, + Enabled: true, + }, + { + Name: "hostname-to-group", + SourceType: "hostname", + TargetType: "group", + Mode: Association, + Enabled: true, + }, + { + Name: "jabber-to-ip", + SourceType: "jabber-id", + TargetType: "ip", + Mode: Association, + Enabled: true, + }, +} + +func GetEnabledRules() []*AssociationRule { + rules := make([]*AssociationRule, 0, len(DefaultRules)) + for _, rule := range DefaultRules { + if rule.Enabled { + rules = append(rules, rule) + } + } + return rules +} diff --git a/plugins/threadwinds-ingestion/internal/client/backend_client.go b/plugins/threadwinds-ingestion/internal/client/backend_client.go new file mode 100644 index 000000000..39ad2085a --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/client/backend_client.go @@ -0,0 +1,232 @@ +package client + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "net/http" + "time" + + "github.com/threatwinds/go-sdk/catcher" + "github.com/utmstack/UTMStack/threadwinds-ingestion/config" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/models" + "github.com/utmstack/UTMStack/threadwinds-ingestion/utils" +) + +const ( + threadwindsSectionID = 10 +) + +type BackendClient struct { + baseURL string + internalKey string + httpClient *http.Client +} + +func NewBackendClient(cfg *config.TWConfig) *BackendClient { + return &BackendClient{ + baseURL: cfg.BackendURL, + internalKey: cfg.InternalKey, + httpClient: &http.Client{ + Timeout: 30 * time.Second, + }, + } +} + +func (c *BackendClient) GetRecentIncidents(ctx context.Context) ([]*models.Incident, error) { + url := fmt.Sprintf("%s/api/utm-incidents?incidentStatus.in=OPEN,IN_REVIEW&sort=incidentCreatedDate,desc&size=100", c.baseURL) + + req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + if err != nil { + return nil, catcher.Error("failed to create request", err, nil) + } + + req.Header.Set("Utm-Internal-Key", c.internalKey) + + resp, err := c.httpClient.Do(req) + if err != nil { + return nil, catcher.Error("request failed", err, nil) + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + body, _ := io.ReadAll(resp.Body) + return nil, catcher.Error("unexpected status from backend", nil, map[string]any{ + "status": resp.StatusCode, + "body": string(body), + }) + } + + var incidents []*models.Incident + if err := json.NewDecoder(resp.Body).Decode(&incidents); err != nil { + return nil, catcher.Error("failed to decode response", err, nil) + } + + return incidents, nil +} + +func (c *BackendClient) GetIncidentAlerts(ctx context.Context, incidentID int64) ([]*models.IncidentAlert, error) { + url := fmt.Sprintf("%s/api/utm-incident-alerts?incidentId.equals=%d", c.baseURL, incidentID) + + req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + if err != nil { + return nil, catcher.Error("failed to create request", err, nil) + } + + req.Header.Set("Utm-Internal-Key", c.internalKey) + + resp, err := c.httpClient.Do(req) + if err != nil { + return nil, catcher.Error("request failed", err, nil) + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + body, _ := io.ReadAll(resp.Body) + return nil, catcher.Error("unexpected status from backend", nil, map[string]any{ + "status": resp.StatusCode, + "body": string(body), + }) + } + + var alerts []*models.IncidentAlert + if err := json.NewDecoder(resp.Body).Decode(&alerts); err != nil { + return nil, catcher.Error("failed to decode response", err, nil) + } + + return alerts, nil +} + +type ThreadWindsConfig struct { + APIKey string + APISecret string + Enabled string + KeyID int64 + SecretID int64 +} + +type ConfigParameter struct { + ID int64 `json:"id"` + SectionID int64 `json:"sectionId"` + ConfParamShort string `json:"confParamShort"` + ConfParamLarge string `json:"confParamLarge,omitempty"` + ConfParamDescription string `json:"confParamDescription,omitempty"` + ConfParamValue string `json:"confParamValue"` + ConfParamRequired bool `json:"confParamRequired,omitempty"` + ConfParamDatatype string `json:"confParamDatatype,omitempty"` +} + +func (c *BackendClient) GetThreadWindsConfig(ctx context.Context) (*ThreadWindsConfig, error) { + url := fmt.Sprintf("%s/api/utm-configuration-parameters?sectionId.equals=%d&size=100", c.baseURL, threadwindsSectionID) + + req, err := http.NewRequestWithContext(ctx, "GET", url, nil) + if err != nil { + return nil, catcher.Error("failed to create request", err, nil) + } + + req.Header.Set("Utm-Internal-Key", c.internalKey) + + resp, err := c.httpClient.Do(req) + if err != nil { + return nil, catcher.Error("request failed", err, nil) + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + body, _ := io.ReadAll(resp.Body) + return nil, catcher.Error("unexpected status from backend", nil, map[string]any{ + "status": resp.StatusCode, + "body": string(body), + }) + } + + var params []ConfigParameter + if err := json.NewDecoder(resp.Body).Decode(¶ms); err != nil { + return nil, catcher.Error("failed to decode response", err, nil) + } + + config := &ThreadWindsConfig{} + + for _, param := range params { + switch param.ConfParamShort { + case "utmstack.tw.enabled": + config.Enabled = param.ConfParamValue + case "utmstack.tw.apiKey": + config.APIKey = param.ConfParamValue + config.KeyID = param.ID + case "utmstack.tw.apiSecret": + if param.ConfParamDatatype == "password" && param.ConfParamValue != "" { + decrypted, err := utils.DecryptValue(param.ConfParamValue) + if err != nil { + return nil, catcher.Error("failed to decrypt API Secret", err, nil) + } + config.APISecret = decrypted + } else { + config.APISecret = param.ConfParamValue + } + config.SecretID = param.ID + } + } + + return config, nil +} + +func (c *BackendClient) SaveThreadWindsCredentials(ctx context.Context, apiKey, apiSecret string, keyID, secretID int64) error { + const threadwindsSectionID = 6 + url := fmt.Sprintf("%s/api/utm-configuration-parameters", c.baseURL) + + params := []ConfigParameter{ + { + ID: keyID, + SectionID: threadwindsSectionID, + ConfParamShort: "utmstack.tw.apiKey", + ConfParamLarge: "ThreatWinds API Key", + ConfParamDescription: "API Key for ThreatWinds integration.", + ConfParamValue: apiKey, + ConfParamRequired: true, + ConfParamDatatype: "text", + }, + { + ID: secretID, + SectionID: threadwindsSectionID, + ConfParamShort: "utmstack.tw.apiSecret", + ConfParamLarge: "ThreatWinds API Secret", + ConfParamDescription: "API Secret for ThreatWinds integration.", + ConfParamValue: apiSecret, + ConfParamRequired: true, + ConfParamDatatype: "password", + }, + } + + payload, err := json.Marshal(params) + if err != nil { + return catcher.Error("failed to marshal parameters", err, nil) + } + + req, err := http.NewRequestWithContext(ctx, "PUT", url, bytes.NewReader(payload)) + if err != nil { + return catcher.Error("failed to create request", err, nil) + } + + req.Header.Set("Content-Type", "application/json") + req.Header.Set("Utm-Internal-Key", c.internalKey) + + resp, err := c.httpClient.Do(req) + if err != nil { + return catcher.Error("request failed", err, nil) + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + body, _ := io.ReadAll(resp.Body) + return catcher.Error("unexpected status from backend", nil, map[string]any{ + "status": resp.StatusCode, + "body": string(body), + }) + } + + catcher.Info("ThreadWinds credentials saved successfully", nil) + return nil +} diff --git a/plugins/threadwinds-ingestion/internal/client/cm_client.go b/plugins/threadwinds-ingestion/internal/client/cm_client.go new file mode 100644 index 000000000..565ba39a6 --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/client/cm_client.go @@ -0,0 +1,78 @@ +package client + +import ( + "fmt" + "net/http" + "time" + + "github.com/threatwinds/go-sdk/catcher" + + sdkutils "github.com/threatwinds/go-sdk/utils" + "github.com/utmstack/UTMStack/threadwinds-ingestion/utils" +) + +const ( + instanceConfigPath = "/updates/instance-config.yml" +) + +type CustomersManagerClient struct { + Server string `yaml:"server"` + InstanceID string `yaml:"instance_id"` + InstanceKey string `yaml:"instance_key"` +} + +type RegistrationResponse struct { + APIKey string `json:"api_key"` + APISecret string `json:"api_secret"` +} + +func (c *CustomersManagerClient) LoadInstanceConfig() error { + time.Sleep(10 * time.Second) + + loadFunc := func() error { + if !utils.CheckIfPathExist(instanceConfigPath) { + return catcher.Error("config file not found", nil, nil) + } + + if err := utils.ReadYAML(instanceConfigPath, c); err != nil { + return catcher.Error("failed to read or parse YAML config", err, nil) + } + + if c.Server == "" || c.InstanceID == "" || c.InstanceKey == "" { + return catcher.Error("missing required fields in config", nil, nil) + } + + return nil + } + + return utils.Retry(loadFunc, "instance config loading", utils.DefaultRetryConfig()) +} + +func (c *CustomersManagerClient) RegisterUserReporter() (*RegistrationResponse, error) { + if c.Server == "" || c.InstanceID == "" || c.InstanceKey == "" { + return nil, catcher.Error("instance configuration not loaded", nil, nil) + } + + endpoint := fmt.Sprintf("%s/api/v1/intelligence/register", c.Server) + + headers := map[string]string{ + "accept": "application/json", + "id": c.InstanceID, + "Key": c.InstanceKey, + } + + credentials, _, err := sdkutils.DoReq[RegistrationResponse]( + endpoint, + nil, + http.MethodPost, + headers, + ) + + if err != nil { + return nil, err + } + + catcher.Info("Successfully registered ThreadWinds intelligence reporter", nil) + + return &credentials, nil +} diff --git a/plugins/threadwinds-ingestion/internal/client/dependencies.go b/plugins/threadwinds-ingestion/internal/client/dependencies.go new file mode 100644 index 000000000..bed701cce --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/client/dependencies.go @@ -0,0 +1,30 @@ +package client + +import ( + "github.com/threatwinds/go-sdk/catcher" + "github.com/utmstack/UTMStack/threadwinds-ingestion/config" +) + +type ClientDependencies struct { + Backend *BackendClient + CM *CustomersManagerClient + ThreadWinds *ThreadWindsClient + OpenSearch *OpenSearchClient +} + +func NewClientDependencies(cfg *config.TWConfig) (*ClientDependencies, error) { + catcher.Info("initializing client dependencies", nil) + + opensearch, err := NewOpenSearchClient(cfg) + if err != nil { + return nil, catcher.Error("failed to initialize opensearch client", err, nil) + } + + deps := &ClientDependencies{ + Backend: NewBackendClient(cfg), + ThreadWinds: NewThreadWindsClient(cfg), + OpenSearch: opensearch, + } + + return deps, nil +} diff --git a/plugins/threadwinds-ingestion/internal/client/opensearch_client.go b/plugins/threadwinds-ingestion/internal/client/opensearch_client.go new file mode 100644 index 000000000..21fa571e3 --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/client/opensearch_client.go @@ -0,0 +1,96 @@ +package client + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + + opensearch "github.com/opensearch-project/opensearch-go/v2" + "github.com/threatwinds/go-sdk/catcher" + "github.com/utmstack/UTMStack/threadwinds-ingestion/config" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/models" +) + +type OpenSearchClient struct { + client *opensearch.Client +} + +func NewOpenSearchClient(cfg *config.TWConfig) (*OpenSearchClient, error) { + osConfig := opensearch.Config{ + Addresses: []string{ + fmt.Sprintf("http://%s:%s", cfg.OpenSearchHost, cfg.OpenSearchPort), + }, + } + + client, err := opensearch.NewClient(osConfig) + if err != nil { + return nil, catcher.Error("failed to create opensearch client", err, nil) + } + + info, err := client.Info() + if err != nil { + return nil, catcher.Error("opensearch connection failed", err, nil) + } + defer info.Body.Close() + + catcher.Info("opensearch client connected successfully", nil) + + return &OpenSearchClient{client: client}, nil +} + +func (c *OpenSearchClient) GetAlertByID(ctx context.Context, alertID string) (*models.Alert, error) { + query := map[string]any{ + "query": map[string]any{ + "term": map[string]any{ + "id.keyword": alertID, + }, + }, + } + + return c.searchSingleAlert(ctx, "v11-alert-*", query) +} + +func (c *OpenSearchClient) searchSingleAlert(ctx context.Context, index string, query map[string]any) (*models.Alert, error) { + var buf bytes.Buffer + if err := json.NewEncoder(&buf).Encode(query); err != nil { + return nil, catcher.Error("failed to encode query", err, nil) + } + + res, err := c.client.Search( + c.client.Search.WithContext(ctx), + c.client.Search.WithIndex(index), + c.client.Search.WithBody(&buf), + ) + if err != nil { + return nil, catcher.Error("search failed", err, nil) + } + defer res.Body.Close() + + if res.IsError() { + body, _ := io.ReadAll(res.Body) + return nil, catcher.Error("search error", nil, map[string]any{ + "status": res.StatusCode, + "body": string(body), + }) + } + + var result struct { + Hits struct { + Hits []struct { + Source models.Alert `json:"_source"` + } `json:"hits"` + } `json:"hits"` + } + + if err := json.NewDecoder(res.Body).Decode(&result); err != nil { + return nil, catcher.Error("failed to decode response", err, nil) + } + + if len(result.Hits.Hits) == 0 { + return nil, catcher.Error("alert not found", nil, nil) + } + + return &result.Hits.Hits[0].Source, nil +} diff --git a/plugins/threadwinds-ingestion/internal/client/threadwinds_client.go b/plugins/threadwinds-ingestion/internal/client/threadwinds_client.go new file mode 100644 index 000000000..a3c8476c5 --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/client/threadwinds_client.go @@ -0,0 +1,170 @@ +package client + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "net/http" + "sync" + "time" + + "github.com/threatwinds/go-sdk/catcher" + "github.com/threatwinds/go-sdk/entities" + "github.com/utmstack/UTMStack/threadwinds-ingestion/config" +) + +type ThreadWindsClient struct { + baseURL string + apiKey string + apiSecret string + httpClient *http.Client + mu sync.RWMutex +} + +func NewThreadWindsClient(cfg *config.TWConfig) *ThreadWindsClient { + return &ThreadWindsClient{ + baseURL: cfg.ThreadWindsURL, + httpClient: &http.Client{ + Timeout: 30 * time.Second, + }, + } +} + +func (c *ThreadWindsClient) UpdateCredentials(apiKey, apiSecret string) { + c.mu.Lock() + defer c.mu.Unlock() + + c.apiKey = apiKey + c.apiSecret = apiSecret + + catcher.Info("ThreadWinds credentials updated", nil) +} + +func (c *ThreadWindsClient) ingestEntity(ctx context.Context, entity *entities.Entity) error { + url := fmt.Sprintf("%s/api/ingest/v1/entity", c.baseURL) + + payload, err := json.Marshal(entity) + if err != nil { + return catcher.Error("failed to marshal entity", err, map[string]any{ + "entity_type": entity.Type, + }) + } + + req, err := http.NewRequestWithContext(ctx, "POST", url, bytes.NewBuffer(payload)) + if err != nil { + return catcher.Error("failed to create request", err, map[string]any{ + "entity_type": entity.Type, + }) + } + + req.Header.Set("Content-Type", "application/json") + req.Header.Set("api-key", c.apiKey) + req.Header.Set("api-secret", c.apiSecret) + + return c.executeWithRetry(req, entity.Type) +} + +func (c *ThreadWindsClient) executeWithRetry(req *http.Request, entityType string) error { + maxRetries := 3 + backoff := time.Second + + for attempt := 1; attempt <= maxRetries; attempt++ { + resp, err := c.httpClient.Do(req) + if err != nil { + catcher.Error("http request failed", err, map[string]any{ + "attempt": attempt, + "entity_type": entityType, + }) + if attempt < maxRetries { + time.Sleep(backoff) + backoff *= 2 + continue + } + return catcher.Error("failed after max attempts", err, map[string]any{ + "max_retries": maxRetries, + "entity_type": entityType, + }) + } + + body, err := io.ReadAll(resp.Body) + if err != nil { + return catcher.Error("failed to read response body", err, map[string]any{ + "entity_type": entityType, + }) + } + resp.Body.Close() + + if resp.StatusCode == http.StatusAccepted { + return nil + } + + if resp.StatusCode >= 400 && resp.StatusCode < 500 { + return catcher.Error("client error from ThreadWinds", nil, map[string]any{ + "status": resp.StatusCode, + }) + } + + if resp.StatusCode >= 500 && attempt < maxRetries { + catcher.Error("server error, retrying", fmt.Errorf("server error %d", resp.StatusCode), map[string]any{ + "attempt": attempt, + "entity_type": entityType, + "response": string(body), + }) + time.Sleep(backoff) + backoff *= 2 + continue + } + + return catcher.Error("unexpected status code from ThreadWinds", nil, map[string]any{ + "status": resp.StatusCode, + }) + } + + return catcher.Error("max retries exceeded", nil, map[string]any{ + "entity_type": entityType, + }) +} + +func (c *ThreadWindsClient) IngestBatch(ctx context.Context, entityBatch []*entities.Entity) error { + successCount := 0 + errorCount := 0 + + for i, entity := range entityBatch { + select { + case <-ctx.Done(): + return catcher.Error("batch ingestion cancelled", ctx.Err(), map[string]any{ + "processed": successCount, + }) + default: + } + + err := c.ingestEntity(ctx, entity) + if err != nil { + errorCount++ + catcher.Error("failed to ingest entity", err, map[string]any{ + "entity_type": entity.Type, + "batch_index": i, + "success_count": successCount, + "error_count": errorCount, + }) + continue + } + successCount++ + + if i < len(entityBatch)-1 { + time.Sleep(100 * time.Millisecond) + } + } + + if errorCount > 0 { + return catcher.Error("batch completed with errors", nil, map[string]any{ + "error_count": errorCount, + "success_count": successCount, + "total_count": len(entityBatch), + }) + } + + return nil +} diff --git a/plugins/threadwinds-ingestion/internal/client/threadwinds_setup.go b/plugins/threadwinds-ingestion/internal/client/threadwinds_setup.go new file mode 100644 index 000000000..b6c6b1e44 --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/client/threadwinds_setup.go @@ -0,0 +1,58 @@ +package client + +import ( + "context" + + "github.com/threatwinds/go-sdk/catcher" + "github.com/utmstack/UTMStack/threadwinds-ingestion/utils" +) + +func ConfigureThreadWindsCredentials(ctx context.Context, deps *ClientDependencies, twConfig *ThreadWindsConfig) error { + if twConfig.APIKey == "" || twConfig.APISecret == "" { + catcher.Info("ThreadWinds not configured, will attempt registration with retry...", nil) + + if err := deps.CM.LoadInstanceConfig(); err != nil { + return catcher.Error("failed to load instance configuration", err, nil) + } + + regResp, err := registerWithRetry(deps.CM) + if err != nil { + return catcher.Error("failed to register after all retry attempts", err, nil) + } + + if err := deps.Backend.SaveThreadWindsCredentials(ctx, + regResp.APIKey, + regResp.APISecret, + twConfig.KeyID, + twConfig.SecretID); err != nil { + return catcher.Error("failed to save ThreadWinds credentials", err, nil) + } + + deps.ThreadWinds.UpdateCredentials(regResp.APIKey, regResp.APISecret) + catcher.Info("ThreadWinds configured successfully with new credentials", nil) + } else { + catcher.Info("ThreadWinds already configured", nil) + deps.ThreadWinds.UpdateCredentials(twConfig.APIKey, twConfig.APISecret) + } + + return nil +} + +func registerWithRetry(cm *CustomersManagerClient) (*RegistrationResponse, error) { + var regResp *RegistrationResponse + + registerFunc := func() error { + resp, err := cm.RegisterUserReporter() + if err != nil { + return err + } + regResp = resp + return nil + } + + if err := utils.Retry(registerFunc, "ThreadWinds registration", utils.DefaultRetryConfig()); err != nil { + return nil, err + } + + return regResp, nil +} diff --git a/plugins/threadwinds-ingestion/internal/extractor/field_extractor.go b/plugins/threadwinds-ingestion/internal/extractor/field_extractor.go new file mode 100644 index 000000000..d063a9afa --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/extractor/field_extractor.go @@ -0,0 +1,535 @@ +package extractor + +import ( + "fmt" + + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/models" +) + +type FieldExtractor struct{} + +func NewFieldExtractor() *FieldExtractor { + return &FieldExtractor{} +} + +func (e *FieldExtractor) ExtractFromEvent(event *models.Event) []*models.FlattenedField { + fields := make([]*models.FlattenedField, 0, 50) + + if event.Origin != nil { + fields = append(fields, e.extractFromSide(event.Origin, fmt.Sprintf("event.%s.origin", event.ID))...) + } + + if event.Target != nil { + fields = append(fields, e.extractFromSide(event.Target, fmt.Sprintf("event.%s.target", event.ID))...) + } + + return fields +} + +func (e *FieldExtractor) extractFromSide(side *models.Side, prefix string) []*models.FlattenedField { + fields := make([]*models.FlattenedField, 0, 60) + + // ==================== Network Identification ==================== + if side.IP != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".ip", + Key: "ip", + Value: side.IP, + }) + } + + if side.Port != 0 { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".port", + Key: "port", + Value: side.Port, + }) + } + + if side.Host != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".host", + Key: "hostname", + Value: side.Host, + }) + } + + if side.Domain != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".domain", + Key: "domain", + Value: side.Domain, + }) + } + + if side.Mac != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".mac", + Key: "mac-address", + Value: side.Mac, + }) + } + + if side.URL != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".url", + Key: "url", + Value: side.URL, + }) + } + + if side.Cidr != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".cidr", + Key: "cidr", + Value: side.Cidr, + }) + } + + // ==================== Geolocation ==================== + if side.Geolocation != nil && side.Geolocation.ASN != 0 { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".geolocation.asn", + Key: "asn", + Value: side.Geolocation.ASN, + }) + } + + // ==================== Certificates & Fingerprints ==================== + if side.CertificateFingerprint != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".certificateFingerprint", + Key: "certificate-fingerprint", + Value: side.CertificateFingerprint, + }) + } + + if side.Ja3Fingerprint != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".ja3Fingerprint", + Key: "ja3-fingerprint", + Value: side.Ja3Fingerprint, + }) + } + + if side.JarmFingerprint != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".jarmFingerprint", + Key: "jarm-fingerprint", + Value: side.JarmFingerprint, + }) + } + + if side.SshBanner != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".sshBanner", + Key: "ssh-banner", + Value: side.SshBanner, + }) + } + + if side.SshFingerprint != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".sshFingerprint", + Key: "ssh-fingerprint", + Value: side.SshFingerprint, + }) + } + + // ==================== Web Attributes ==================== + if side.Cookie != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".cookie", + Key: "cookie", + Value: side.Cookie, + }) + } + + if side.JabberId != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".jabberId", + Key: "jabber-id", + Value: side.JabberId, + }) + } + + // ==================== Email Attributes ==================== + if side.EmailAddress != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".emailAddress", + Key: "email-address", + Value: side.EmailAddress, + }) + } + + if side.EmailBody != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".emailBody", + Key: "email-body", + Value: side.EmailBody, + }) + } + + if side.EmailDisplayName != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".emailDisplayName", + Key: "email-display-name", + Value: side.EmailDisplayName, + }) + } + + if side.EmailSubject != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".emailSubject", + Key: "email-subject", + Value: side.EmailSubject, + }) + } + + if side.EmailThreadIndex != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".emailThreadIndex", + Key: "email-thread-index", + Value: side.EmailThreadIndex, + }) + } + + if side.EmailXMailer != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".emailXMailer", + Key: "email-x-mailer", + Value: side.EmailXMailer, + }) + } + + if side.Dkim != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".dkim", + Key: "dkim", + Value: side.Dkim, + }) + } + + if side.DkimSignature != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".dkimSignature", + Key: "dkim-signature", + Value: side.DkimSignature, + }) + } + + // ==================== WHOIS Attributes ==================== + if side.WhoisRegistrant != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".whoisRegistrant", + Key: "whois-registrant", + Value: side.WhoisRegistrant, + }) + } + + if side.WhoisRegistrar != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".whoisRegistrar", + Key: "whois-registrar", + Value: side.WhoisRegistrar, + }) + } + + // ==================== Identity Attributes ==================== + if side.User != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".user", + Key: "username", + Value: side.User, + }) + } + + // ==================== Process Attributes ==================== + if side.Process != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".process", + Key: "process", + Value: side.Process, + }) + } + + if side.ProcessState != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".processState", + Key: "process-state", + Value: side.ProcessState, + }) + } + + if side.WindowsScheduledTask != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".windowsScheduledTask", + Key: "windows-scheduled-task", + Value: side.WindowsScheduledTask, + }) + } + + if side.WindowsServiceDisplayName != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".windowsServiceDisplayName", + Key: "windows-service-display-name", + Value: side.WindowsServiceDisplayName, + }) + } + + if side.WindowsServiceName != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".windowsServiceName", + Key: "windows-service-name", + Value: side.WindowsServiceName, + }) + } + + // ==================== File Attributes ==================== + if side.File != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".file", + Key: "file", + Value: side.File, + }) + } + + if side.Path != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".path", + Key: "path", + Value: side.Path, + }) + } + + if side.Filename != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".filename", + Key: "filename", + Value: side.Filename, + }) + } + + if side.SizeInBytes != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".sizeInBytes", + Key: "size-in-bytes", + Value: side.SizeInBytes, + }) + } + + if side.MimeType != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".mimeType", + Key: "mime-type", + Value: side.MimeType, + }) + } + + // ==================== Hash Attributes ==================== + if side.Authentihash != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".authentihash", + Key: "authentihash", + Value: side.Authentihash, + }) + } + + if side.Cdhash != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".cdhash", + Key: "cdhash", + Value: side.Cdhash, + }) + } + + if side.MD5 != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".md5", + Key: "md5", + Value: side.MD5, + }) + } + + if side.SHA1 != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".sha1", + Key: "sha1", + Value: side.SHA1, + }) + } + + if side.SHA224 != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".sha224", + Key: "sha224", + Value: side.SHA224, + }) + } + + if side.SHA256 != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".sha256", + Key: "sha256", + Value: side.SHA256, + }) + } + + if side.SHA384 != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".sha384", + Key: "sha384", + Value: side.SHA384, + }) + } + + if side.SHA3224 != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".sha3224", + Key: "sha3-224", + Value: side.SHA3224, + }) + } + + if side.SHA3256 != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".sha3256", + Key: "sha3-256", + Value: side.SHA3256, + }) + } + + if side.SHA3384 != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".sha3384", + Key: "sha3-384", + Value: side.SHA3384, + }) + } + + if side.SHA3512 != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".sha3512", + Key: "sha3-512", + Value: side.SHA3512, + }) + } + + if side.SHA512 != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".sha512", + Key: "sha512", + Value: side.SHA512, + }) + } + + if side.SHA512224 != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".sha512224", + Key: "sha512-224", + Value: side.SHA512224, + }) + } + + if side.SHA512256 != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".sha512256", + Key: "sha512-256", + Value: side.SHA512256, + }) + } + + if side.Hex != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".hex", + Key: "hex", + Value: side.Hex, + }) + } + + if side.Base64 != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".base64", + Key: "base64", + Value: side.Base64, + }) + } + + // ==================== System Attributes ==================== + if side.ChromeExtension != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".chromeExtension", + Key: "chrome-extension-id", + Value: side.ChromeExtension, + }) + } + + if side.MobileAppId != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".mobileAppId", + Key: "mobile-app-id", + Value: side.MobileAppId, + }) + } + + // ==================== Vulnerability Attributes ==================== + if side.Cpe != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".cpe", + Key: "cpe", + Value: side.Cpe, + }) + } + + if side.Cve != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".cve", + Key: "cve", + Value: side.Cve, + }) + } + + // ==================== Malware Attributes ==================== + if side.Malware != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".malware", + Key: "malware", + Value: side.Malware, + }) + } + + if side.MalwareFamily != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".malwareFamily", + Key: "malware-family", + Value: side.MalwareFamily, + }) + } + + if side.MalwareType != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".malwareType", + Key: "malware-type", + Value: side.MalwareType, + }) + } + + // ==================== Key Attributes ==================== + if side.PgpPrivateKey != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".pgpPrivateKey", + Key: "pgp-private-key", + Value: side.PgpPrivateKey, + }) + } + + if side.PgpPublicKey != "" { + fields = append(fields, &models.FlattenedField{ + Path: prefix + ".pgpPublicKey", + Key: "pgp-public-key", + Value: side.PgpPublicKey, + }) + } + + return fields +} diff --git a/plugins/threadwinds-ingestion/internal/initializer/app.go b/plugins/threadwinds-ingestion/internal/initializer/app.go new file mode 100644 index 000000000..7e17115ff --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/initializer/app.go @@ -0,0 +1,72 @@ +package initializer + +import ( + "context" + + "github.com/threatwinds/go-sdk/catcher" + "github.com/utmstack/UTMStack/threadwinds-ingestion/config" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/client" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/scheduler" + "golang.org/x/sync/errgroup" +) + +type App struct { + config *config.TWConfig + clients *client.ClientDependencies + scheduler *scheduler.IngestionScheduler + eg *errgroup.Group + egCtx context.Context +} + +func NewApp(ctx context.Context) (*App, error) { + app := &App{} + + if err := app.loadConfiguration(); err != nil { + return nil, err + } + + if err := app.initializeClients(); err != nil { + return nil, err + } + + if err := app.configureThreadWinds(ctx); err != nil { + return nil, err + } + + if err := app.buildProcessingPipeline(); err != nil { + return nil, err + } + + return app, nil +} + +func (a *App) Run(ctx context.Context) error { + a.eg, a.egCtx = errgroup.WithContext(ctx) + a.eg.Go(func() error { + a.scheduler.Start(a.egCtx) + return nil + }) + return nil +} + +func (a *App) Shutdown(ctx context.Context) error { + catcher.Info("shutting down application", nil) + + done := make(chan error, 1) + go func() { + done <- a.eg.Wait() + }() + + select { + case err := <-done: + if err != nil { + catcher.Error("scheduler stopped with error", err, nil) + return err + } + catcher.Info("scheduler stopped gracefully", nil) + return nil + case <-ctx.Done(): + catcher.Info("shutdown timeout exceeded, forcing shutdown", nil) + return ctx.Err() + } +} diff --git a/plugins/threadwinds-ingestion/internal/initializer/clients.go b/plugins/threadwinds-ingestion/internal/initializer/clients.go new file mode 100644 index 000000000..7a19fa47a --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/initializer/clients.go @@ -0,0 +1,33 @@ +package initializer + +import ( + "github.com/threatwinds/go-sdk/catcher" + "github.com/utmstack/UTMStack/threadwinds-ingestion/config" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/client" +) + +func (a *App) loadConfiguration() error { + catcher.Info("loading configuration", nil) + + cfg, err := config.GetTWConfig() + if err != nil { + return catcher.Error("failed to load configuration", err, nil) + } + + a.config = cfg + return nil +} + +func (a *App) initializeClients() error { + catcher.Info("initializing clients", nil) + + clients, err := client.NewClientDependencies(a.config) + if err != nil { + return catcher.Error("failed to initialize clients", err, nil) + } + + a.clients = clients + + catcher.Info("all client dependencies initialized successfully", nil) + return nil +} diff --git a/plugins/threadwinds-ingestion/internal/initializer/pipeline.go b/plugins/threadwinds-ingestion/internal/initializer/pipeline.go new file mode 100644 index 000000000..7b2c97b2e --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/initializer/pipeline.go @@ -0,0 +1,41 @@ +package initializer + +import ( + "github.com/threatwinds/go-sdk/catcher" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/association" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/extractor" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/mapper" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/scheduler" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/service" +) + +func (a *App) buildProcessingPipeline() error { + catcher.Info("building processing pipeline", nil) + + fieldExtractor := extractor.NewFieldExtractor() + entityMapper := mapper.NewEntityMapper() + associationBuilder := association.NewAssociationBuilder() + + entityBuilder := service.NewEntityBuilder(entityMapper) + + alertProcessor := service.NewAlertProcessor( + a.clients.OpenSearch, + fieldExtractor, + entityBuilder, + ) + + incidentProcessor := service.NewIncidentProcessor( + a.clients, + alertProcessor, + associationBuilder, + ) + + a.scheduler = scheduler.NewIngestionScheduler( + a.config, + a.clients, + incidentProcessor, + ) + + catcher.Info("processing pipeline built successfully", nil) + return nil +} diff --git a/plugins/threadwinds-ingestion/internal/initializer/setup.go b/plugins/threadwinds-ingestion/internal/initializer/setup.go new file mode 100644 index 000000000..18f001cb0 --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/initializer/setup.go @@ -0,0 +1,25 @@ +package initializer + +import ( + "context" + + "github.com/threatwinds/go-sdk/catcher" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/client" +) + +func (a *App) configureThreadWinds(ctx context.Context) error { + catcher.Info("configuring ThreadWinds credentials", nil) + + twConfig, err := a.clients.Backend.GetThreadWindsConfig(ctx) + if err != nil { + return catcher.Error("failed to check ThreadWinds configuration", err, nil) + } + + err = client.ConfigureThreadWindsCredentials(ctx, a.clients, twConfig) + if err != nil { + return catcher.Error("failed to configure ThreadWinds", err, nil) + } + + catcher.Info("ThreadWinds configured successfully", nil) + return nil +} diff --git a/plugins/threadwinds-ingestion/internal/mapper/entity_mapper.go b/plugins/threadwinds-ingestion/internal/mapper/entity_mapper.go new file mode 100644 index 000000000..7fda4372c --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/mapper/entity_mapper.go @@ -0,0 +1,140 @@ +package mapper + +import ( + "fmt" + "strings" + + "github.com/threatwinds/go-sdk/catcher" + "github.com/threatwinds/go-sdk/entities" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/models" +) + +type EntityMapper struct { + entityTypes map[string]bool +} + +func NewEntityMapper() *EntityMapper { + mapper := &EntityMapper{ + entityTypes: make(map[string]bool), + } + + for _, def := range entities.Definitions { + mapper.entityTypes[def.Type] = true + } + + catcher.Info("entity mapper initialized", map[string]any{ + "total_entity_types": len(mapper.entityTypes), + }) + + return mapper +} + +func (m *EntityMapper) MapFieldToEntityType(field *models.FlattenedField) (string, bool) { + leafKey := normalizeKey(field.Key) + + if m.entityTypes[leafKey] { + return leafKey, true + } + + return "", false +} + +func normalizeKey(key string) string { + key = strings.ToLower(key) + key = strings.ReplaceAll(key, "_", "-") + return key +} + +func (m *EntityMapper) BuildEntity(entityType string, value any, context EntityEnrichmentContext) (*entities.Entity, string, error) { + validatedValue, hash, err := entities.ValidateValue(value, entityType) + if err != nil { + return nil, "", catcher.Error("validation failed for entity type", err, map[string]any{ + "entity_type": entityType, + }) + } + + attrs := entities.Attributes{} + if !attrs.SetAttribute(entityType, validatedValue) { + return nil, "", catcher.Error("failed to set attribute for entity type", nil, map[string]any{ + "entity_type": entityType, + }) + } + + if context.Country != "" { + attrs.Country = &context.Country + } + if context.City != "" { + attrs.City = &context.City + } + if context.ASO != "" { + attrs.Aso = &context.ASO + } + if context.Latitude != nil { + attrs.Latitude = context.Latitude + } + if context.Longitude != nil { + attrs.Longitude = context.Longitude + } + if context.AccuracyRadius != nil { + attrs.AccuracyRadius = context.AccuracyRadius + } + + reputation := calculateReputation(context.Severity) + + tags := buildEntityTags(context) + + entity := &entities.Entity{ + Type: entityType, + Attributes: attrs, + Reputation: reputation, + Tags: tags, + Associations: nil, + } + + entityID := fmt.Sprintf("%s-%s", entityType, hash) + + return entity, entityID, nil +} + +func buildEntityTags(context EntityEnrichmentContext) []string { + tags := []string{"utmstack"} + + if context.IncidentID != "" { + tags = append(tags, "incident-"+context.IncidentID) + } + + if context.DataType != "" { + tags = append(tags, "datasource-"+context.DataType) + } + + return tags +} + +type EntityEnrichmentContext struct { + IncidentID string + AlertID string + EventID string + + Severity int + DataType string + + SourceType string + + Country string + City string + Latitude *float64 + Longitude *float64 + ASO string + AccuracyRadius *float64 +} + +func calculateReputation(severity int) int { + switch { + case severity >= 7: + return -3 + case severity >= 4: + return -1 + default: + return 0 + } +} diff --git a/plugins/threadwinds-ingestion/internal/models/alert.go b/plugins/threadwinds-ingestion/internal/models/alert.go new file mode 100644 index 000000000..fe732b4b0 --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/models/alert.go @@ -0,0 +1,8 @@ +package models + +type Alert struct { + ID string `json:"id"` + Name string `json:"name"` + DataType string `json:"dataType"` + Events []*Event `json:"events"` +} diff --git a/plugins/threadwinds-ingestion/internal/models/event.go b/plugins/threadwinds-ingestion/internal/models/event.go new file mode 100644 index 000000000..7e1465df7 --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/models/event.go @@ -0,0 +1,112 @@ +package models + +type Event struct { + ID string `json:"id"` + Origin *Side `json:"origin,omitempty"` + Target *Side `json:"target,omitempty"` +} + +type Side struct { + // Network identification attributes + IP string `json:"ip,omitempty"` + Port int `json:"port,omitempty"` + Host string `json:"host,omitempty"` + Domain string `json:"domain,omitempty"` + Mac string `json:"mac,omitempty"` + Geolocation *Geolocation `json:"geolocation,omitempty"` + URL string `json:"url,omitempty"` + Cidr string `json:"cidr,omitempty"` + + // Certificate and fingerprint attributes + CertificateFingerprint string `json:"certificateFingerprint,omitempty"` + Ja3Fingerprint string `json:"ja3Fingerprint,omitempty"` + JarmFingerprint string `json:"jarmFingerprint,omitempty"` + SshBanner string `json:"sshBanner,omitempty"` + SshFingerprint string `json:"sshFingerprint,omitempty"` + + // Web attributes + Cookie string `json:"cookie,omitempty"` + JabberId string `json:"jabberId,omitempty"` + + // Email attributes + EmailAddress string `json:"emailAddress,omitempty"` + EmailBody string `json:"emailBody,omitempty"` + EmailDisplayName string `json:"emailDisplayName,omitempty"` + EmailSubject string `json:"emailSubject,omitempty"` + EmailThreadIndex string `json:"emailThreadIndex,omitempty"` + EmailXMailer string `json:"emailXMailer,omitempty"` + Dkim string `json:"dkim,omitempty"` + DkimSignature string `json:"dkimSignature,omitempty"` + + // WHOIS attributes + WhoisRegistrant string `json:"whoisRegistrant,omitempty"` + WhoisRegistrar string `json:"whoisRegistrar,omitempty"` + + // Identity attributes + User string `json:"user,omitempty"` + + // Process-related attributes + Process string `json:"process,omitempty"` + ProcessState string `json:"processState,omitempty"` + WindowsScheduledTask string `json:"windowsScheduledTask,omitempty"` + WindowsServiceDisplayName string `json:"windowsServiceDisplayName,omitempty"` + WindowsServiceName string `json:"windowsServiceName,omitempty"` + + // File-related attributes + File string `json:"file,omitempty"` + Path string `json:"path,omitempty"` + Filename string `json:"filename,omitempty"` + SizeInBytes string `json:"sizeInBytes,omitempty"` + MimeType string `json:"mimeType,omitempty"` + + // Hash-related attributes + Authentihash string `json:"authentihash,omitempty"` + Cdhash string `json:"cdhash,omitempty"` + MD5 string `json:"md5,omitempty"` + SHA1 string `json:"sha1,omitempty"` + SHA224 string `json:"sha224,omitempty"` + SHA256 string `json:"sha256,omitempty"` + SHA384 string `json:"sha384,omitempty"` + SHA3224 string `json:"sha3224,omitempty"` + SHA3256 string `json:"sha3256,omitempty"` + SHA3384 string `json:"sha3384,omitempty"` + SHA3512 string `json:"sha3512,omitempty"` + SHA512 string `json:"sha512,omitempty"` + SHA512224 string `json:"sha512224,omitempty"` + SHA512256 string `json:"sha512256,omitempty"` + Hex string `json:"hex,omitempty"` + Base64 string `json:"base64,omitempty"` + + // System-related attributes + ChromeExtension string `json:"chromeExtension,omitempty"` + MobileAppId string `json:"mobileAppId,omitempty"` + + // Vulnerability-related attributes + Cpe string `json:"cpe,omitempty"` + Cve string `json:"cve,omitempty"` + + // Malware-related attributes + Malware string `json:"malware,omitempty"` + MalwareFamily string `json:"malwareFamily,omitempty"` + MalwareType string `json:"malwareType,omitempty"` + + // Key-related attributes + PgpPrivateKey string `json:"pgpPrivateKey,omitempty"` + PgpPublicKey string `json:"pgpPublicKey,omitempty"` +} + +type FlattenedField struct { + Path string + Key string + Value any +} + +type Geolocation struct { + Country string `json:"country,omitempty"` + City string `json:"city,omitempty"` + Latitude float64 `json:"latitude,omitempty"` + Longitude float64 `json:"longitude,omitempty"` + ASN int `json:"asn,omitempty"` + ASO string `json:"aso,omitempty"` + Accuracy int `json:"accuracy,omitempty"` +} diff --git a/plugins/threadwinds-ingestion/internal/models/incident.go b/plugins/threadwinds-ingestion/internal/models/incident.go new file mode 100644 index 000000000..3e513fd45 --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/models/incident.go @@ -0,0 +1,21 @@ +package models + +import "time" + +type Incident struct { + ID int64 `json:"id"` + Name string `json:"incidentName"` + Description string `json:"incidentDescription"` + Status string `json:"incidentStatus"` + Severity int `json:"incidentSeverity"` + CreatedDate time.Time `json:"incidentCreatedDate"` +} + +type IncidentAlert struct { + ID int64 `json:"id"` + IncidentID int64 `json:"incidentId"` + AlertID string `json:"alertId"` + AlertName string `json:"alertName"` + AlertStatus int `json:"alertStatus"` + AlertSeverity int `json:"alertSeverity"` +} diff --git a/plugins/threadwinds-ingestion/internal/scheduler/ingestion_scheduler.go b/plugins/threadwinds-ingestion/internal/scheduler/ingestion_scheduler.go new file mode 100644 index 000000000..fee9c9168 --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/scheduler/ingestion_scheduler.go @@ -0,0 +1,121 @@ +package scheduler + +import ( + "context" + "time" + + "github.com/threatwinds/go-sdk/catcher" + "github.com/utmstack/UTMStack/threadwinds-ingestion/config" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/client" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/service" +) + +const ( + pollInterval = 5 * time.Minute +) + +type IngestionScheduler struct { + cfg *config.TWConfig + backendClient *client.BackendClient + threadwindsClient *client.ThreadWindsClient + incidentProcessor *service.IncidentProcessor +} + +func NewIngestionScheduler( + cfg *config.TWConfig, + deps *client.ClientDependencies, + incidentProcessor *service.IncidentProcessor, +) *IngestionScheduler { + return &IngestionScheduler{ + cfg: cfg, + backendClient: deps.Backend, + threadwindsClient: deps.ThreadWinds, + incidentProcessor: incidentProcessor, + } +} + +func (s *IngestionScheduler) Start(ctx context.Context) { + ticker := time.NewTicker(pollInterval) + defer ticker.Stop() + + catcher.Info("ingestion scheduler started", map[string]any{ + "poll_interval": pollInterval, + }) + + s.runIngestionCycle(ctx) + + for { + select { + case <-ctx.Done(): + catcher.Info("scheduler received shutdown signal, stopping gracefully", nil) + return + case <-ticker.C: + s.runIngestionCycle(ctx) + } + } +} + +func (s *IngestionScheduler) runIngestionCycle(ctx context.Context) { + startTime := time.Now() + + cycleTimeout := time.Duration(float64(pollInterval) * 0.9) + cycleCtx, cancel := context.WithTimeout(ctx, cycleTimeout) + defer cancel() + + twConfig, err := s.backendClient.GetThreadWindsConfig(cycleCtx) + if err != nil { + catcher.Error("failed to get ThreadWinds configuration", err, nil) + return + } + + if twConfig.Enabled != "true" { + catcher.Info("ThreadWinds is disabled, skipping ingestion cycle", nil) + return + } + + if twConfig.APIKey != "" && twConfig.APISecret != "" { + s.threadwindsClient.UpdateCredentials(twConfig.APIKey, twConfig.APISecret) + } + + incidents, err := s.backendClient.GetRecentIncidents(cycleCtx) + if err != nil { + catcher.Error("failed to fetch incidents", err, nil) + return + } + + if len(incidents) == 0 { + catcher.Info("no recent incidents to process", nil) + return + } + + totalEntities := 0 + for i, incident := range incidents { + select { + case <-cycleCtx.Done(): + catcher.Info("cycle timeout or cancellation, stopping", map[string]any{ + "processed_incidents": i, + "total_incidents": len(incidents), + "reason": cycleCtx.Err().Error(), + }) + return + default: + } + + entitiesCount, err := s.incidentProcessor.ProcessIncident(cycleCtx, incident) + if err != nil { + catcher.Error("failed to process incident", err, map[string]any{ + "incident_id": incident.ID, + "incident_name": incident.Name, + }) + continue + } + totalEntities += entitiesCount + } + + duration := time.Since(startTime) + catcher.Info("ingestion cycle completed", map[string]any{ + "duration_seconds": duration.Seconds(), + "incidents_processed": len(incidents), + "total_entities": totalEntities, + }) +} diff --git a/plugins/threadwinds-ingestion/internal/service/alert_processor.go b/plugins/threadwinds-ingestion/internal/service/alert_processor.go new file mode 100644 index 000000000..aaf867f57 --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/service/alert_processor.go @@ -0,0 +1,58 @@ +package service + +import ( + "context" + + "github.com/threatwinds/go-sdk/catcher" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/association" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/client" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/extractor" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/models" +) + +type AlertProcessor struct { + opensearchClient *client.OpenSearchClient + fieldExtractor *extractor.FieldExtractor + entityBuilder *EntityBuilder +} + +func NewAlertProcessor( + opensearchClient *client.OpenSearchClient, + fieldExtractor *extractor.FieldExtractor, + entityBuilder *EntityBuilder, +) *AlertProcessor { + return &AlertProcessor{ + opensearchClient: opensearchClient, + fieldExtractor: fieldExtractor, + entityBuilder: entityBuilder, + } +} + +func (p *AlertProcessor) ProcessAlertWithAssociations( + ctx context.Context, + incidentAlert *models.IncidentAlert, + incident *models.Incident, + associationBuilder *association.AssociationBuilder, +) error { + alert, err := p.opensearchClient.GetAlertByID(ctx, incidentAlert.AlertID) + if err != nil { + return catcher.Error("failed to get alert", err, map[string]any{ + "alert_id": incidentAlert.AlertID, + "incident_id": incident.ID, + }) + } + + for _, event := range alert.Events { + eventFields := p.fieldExtractor.ExtractFromEvent(event) + + p.entityBuilder.MapAndRegisterFieldsToEntities( + eventFields, + incident, + alert, + event, + associationBuilder, + ) + } + + return nil +} diff --git a/plugins/threadwinds-ingestion/internal/service/entity_builder.go b/plugins/threadwinds-ingestion/internal/service/entity_builder.go new file mode 100644 index 000000000..db8c071d4 --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/service/entity_builder.go @@ -0,0 +1,105 @@ +package service + +import ( + "fmt" + "strings" + + "github.com/threatwinds/go-sdk/catcher" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/association" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/mapper" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/models" +) + +type EntityBuilder struct { + entityMapper *mapper.EntityMapper +} + +func NewEntityBuilder(entityMapper *mapper.EntityMapper) *EntityBuilder { + return &EntityBuilder{ + entityMapper: entityMapper, + } +} + +func (b *EntityBuilder) MapAndRegisterFieldsToEntities( + fields []*models.FlattenedField, + incident *models.Incident, + alert *models.Alert, + event *models.Event, + associationBuilder *association.AssociationBuilder, +) { + for _, field := range fields { + entityType, matched := b.entityMapper.MapFieldToEntityType(field) + if !matched { + continue + } + + sourceField := "" + var sideContext *models.Side + var sourceType string + + if strings.Contains(field.Path, ".origin") { + sourceField = "origin" + sourceType = "event.origin" + sideContext = event.Origin + } else if strings.Contains(field.Path, ".target") { + sourceField = "target" + sourceType = "event.target" + sideContext = event.Target + } + + enrichmentCtx := b.buildEnrichmentContext(incident, alert, sideContext, event.ID, sourceType) + entity, entityID, err := b.entityMapper.BuildEntity(entityType, field.Value, enrichmentCtx) + if err != nil { + catcher.Error("failed to build entity", err, map[string]any{ + "entity_type": entityType, + "field_path": field.Path, + "event_id": event.ID, + }) + continue + } + + assocContext := association.AssociationContext{ + AlertID: alert.ID, + EventID: event.ID, + IncidentID: fmt.Sprintf("%d", incident.ID), + SourceField: sourceField, + } + associationBuilder.RegisterEntity(entity, entityID, field.Path, assocContext) + } +} + +func (b *EntityBuilder) buildEnrichmentContext( + incident *models.Incident, + alert *models.Alert, + side *models.Side, + eventID string, + sourceType string, +) mapper.EntityEnrichmentContext { + ctx := mapper.EntityEnrichmentContext{ + IncidentID: fmt.Sprintf("%d", incident.ID), + AlertID: alert.ID, + EventID: eventID, + Severity: incident.Severity, + DataType: alert.DataType, + SourceType: sourceType, + } + + if side != nil && side.Geolocation != nil { + geo := side.Geolocation + ctx.Country = geo.Country + ctx.City = geo.City + ctx.ASO = geo.ASO + + if geo.Latitude != 0.0 || geo.Longitude != 0.0 { + ctx.Latitude = &geo.Latitude + ctx.Longitude = &geo.Longitude + } + + if geo.Accuracy > 0 { + accuracy := float64(geo.Accuracy) + ctx.AccuracyRadius = &accuracy + } + } + + return ctx +} diff --git a/plugins/threadwinds-ingestion/internal/service/incident_processor.go b/plugins/threadwinds-ingestion/internal/service/incident_processor.go new file mode 100644 index 000000000..620bd8293 --- /dev/null +++ b/plugins/threadwinds-ingestion/internal/service/incident_processor.go @@ -0,0 +1,69 @@ +package service + +import ( + "context" + + "github.com/threatwinds/go-sdk/catcher" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/association" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/client" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/models" +) + +type IncidentProcessor struct { + backendClient *client.BackendClient + opensearchClient *client.OpenSearchClient + threadwindsClient *client.ThreadWindsClient + alertProcessor *AlertProcessor + associationBuilder *association.AssociationBuilder +} + +func NewIncidentProcessor( + deps *client.ClientDependencies, + alertProcessor *AlertProcessor, + associationBuilder *association.AssociationBuilder, +) *IncidentProcessor { + return &IncidentProcessor{ + backendClient: deps.Backend, + opensearchClient: deps.OpenSearch, + threadwindsClient: deps.ThreadWinds, + alertProcessor: alertProcessor, + associationBuilder: associationBuilder, + } +} + +func (p *IncidentProcessor) ProcessIncident(ctx context.Context, incident *models.Incident) (int, error) { + p.associationBuilder.ClearRegistry() + + incidentAlerts, err := p.backendClient.GetIncidentAlerts(ctx, incident.ID) + if err != nil { + return 0, catcher.Error("failed to get incident alerts", err, nil) + } + + if len(incidentAlerts) == 0 { + return 0, nil + } + + for _, incidentAlert := range incidentAlerts { + err := p.alertProcessor.ProcessAlertWithAssociations(ctx, incidentAlert, incident, p.associationBuilder) + if err != nil { + catcher.Error("failed to process alert", err, map[string]any{ + "alert_id": incidentAlert.AlertID, + "incident_id": incident.ID, + }) + continue + } + } + + allEntities := p.associationBuilder.BuildAssociations() + + if len(allEntities) > 0 { + if err := p.threadwindsClient.IngestBatch(ctx, allEntities); err != nil { + return 0, catcher.Error("failed to ingest batch", err, map[string]any{ + "incident_id": incident.ID, + "entity_count": len(allEntities), + }) + } + } + + return len(allEntities), nil +} diff --git a/plugins/threadwinds-ingestion/main.go b/plugins/threadwinds-ingestion/main.go new file mode 100644 index 000000000..091e018ea --- /dev/null +++ b/plugins/threadwinds-ingestion/main.go @@ -0,0 +1,67 @@ +package main + +import ( + "context" + "os" + "os/signal" + "syscall" + + "time" + + "github.com/threatwinds/go-sdk/catcher" + "github.com/threatwinds/go-sdk/plugins" + "github.com/utmstack/UTMStack/threadwinds-ingestion/internal/initializer" + "github.com/utmstack/UTMStack/threadwinds-ingestion/utils" +) + +const ( + urlCheckConnection = "https://apis.threatwinds.com" +) + +func main() { + mode := plugins.GetCfg("plugin_com.utmstack.threadwinds-ingestion").Env.Mode + if mode != "manager" { + return + } + + catcher.Info("Starting ThreadWinds Ingestion Service", nil) + + for { + if err := utils.ConnectionChecker(urlCheckConnection); err != nil { + _ = catcher.Error("External connection failure detected", err, nil) + continue + } + break + } + + ctx := context.Background() + app, err := initializer.NewApp(ctx) + if err != nil { + catcher.Error("failed to initialize application", err, nil) + os.Exit(1) + } + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + sigChan := make(chan os.Signal, 1) + signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM) + + go app.Run(ctx) + + sig := <-sigChan + catcher.Info("received shutdown signal, initiating graceful shutdown", map[string]any{ + "signal": sig.String(), + }) + + cancel() + + shutdownCtx, shutdownCancel := context.WithTimeout(context.Background(), 5*time.Second) + defer shutdownCancel() + + if err := app.Shutdown(shutdownCtx); err != nil { + catcher.Error("error during shutdown", err, nil) + } + + catcher.Info("ThreadWinds Ingestion Service stopped", nil) +} diff --git a/plugins/threadwinds-ingestion/utils/aes.go b/plugins/threadwinds-ingestion/utils/aes.go new file mode 100644 index 000000000..3b355aa7b --- /dev/null +++ b/plugins/threadwinds-ingestion/utils/aes.go @@ -0,0 +1,10 @@ +package utils + +import ( + "github.com/AtlasInsideCorp/AtlasInsideAES" +) + +func DecryptValue(encryptedValue string) (string, error) { + passphrase := Getenv("ENCRYPTION_KEY") + return AtlasInsideAES.AESDecrypt(encryptedValue, []byte(passphrase)) +} diff --git a/plugins/threadwinds-ingestion/utils/env.go b/plugins/threadwinds-ingestion/utils/env.go new file mode 100644 index 000000000..779b3dc6a --- /dev/null +++ b/plugins/threadwinds-ingestion/utils/env.go @@ -0,0 +1,20 @@ +package utils + +import ( + "os" + + "github.com/threatwinds/go-sdk/catcher" +) + +func Getenv(key string) string { + value, defined := os.LookupEnv(key) + if !defined { + catcher.Error("Error loading environment variable, environment variable does not exist", nil, map[string]any{"key": key}) + os.Exit(1) + } + if (value == "") || (value == " ") { + catcher.Error("Error loading environment variable, empty environment variable", nil, map[string]any{"key": key}) + os.Exit(1) + } + return value +} diff --git a/plugins/threadwinds-ingestion/utils/files.go b/plugins/threadwinds-ingestion/utils/files.go new file mode 100644 index 000000000..793b943d5 --- /dev/null +++ b/plugins/threadwinds-ingestion/utils/files.go @@ -0,0 +1,29 @@ +package utils + +import ( + "os" + + "gopkg.in/yaml.v2" +) + +func ReadYAML(path string, result interface{}) error { + file, err := os.Open(path) + if err != nil { + return err + } + defer func() { _ = file.Close() }() + + d := yaml.NewDecoder(file) + if err := d.Decode(result); err != nil { + return err + } + + return nil +} + +func CheckIfPathExist(path string) bool { + if _, err := os.Stat(path); os.IsNotExist(err) { + return false + } + return true +} diff --git a/plugins/threadwinds-ingestion/utils/retry.go b/plugins/threadwinds-ingestion/utils/retry.go new file mode 100644 index 000000000..dc523a7df --- /dev/null +++ b/plugins/threadwinds-ingestion/utils/retry.go @@ -0,0 +1,156 @@ +package utils + +import ( + "context" + "fmt" + "net/http" + "strings" + "time" + + "github.com/threatwinds/go-sdk/catcher" +) + +type RetryConfig struct { + MaxRetries int // Maximum number of retry attempts (-1 for unlimited) + InitialBackoff time.Duration // Initial wait time before the first retry attempt + MaxBackoff time.Duration // Maximum wait time between retry attempts (upper limit for exponential backoff) + BackoffMultiplier float64 // Growth factor for exponential backoff (0 = fixed wait, >1 = exponential growth) + LogInterval int // Log every N attempts (0 = log only once, >0 = log periodically) + ErrorFilter []string // List of error message substrings to match for retry (nil = retry all errors) + StopOnMismatch bool // If true, return error when it doesn't match ErrorFilter; if false, continue without retrying +} + +func DefaultRetryConfig() RetryConfig { + return RetryConfig{ + MaxRetries: -1, + InitialBackoff: 5 * time.Second, + MaxBackoff: 2 * time.Minute, + BackoffMultiplier: 2.0, + LogInterval: 10, + ErrorFilter: nil, + StopOnMismatch: false, + } +} + +func ConnectionRetryConfig() RetryConfig { + return RetryConfig{ + MaxRetries: -1, + InitialBackoff: 3 * time.Second, + MaxBackoff: 3 * time.Second, + BackoffMultiplier: 0, + LogInterval: 0, + ErrorFilter: []string{"connection failed"}, + StopOnMismatch: true, + } +} + +func Retry(f func() error, operationName string, config RetryConfig) error { + attempt := 0 + currentBackoff := config.InitialBackoff + errorLogged := false + + retryType := "infinite retry" + if config.MaxRetries >= 0 { + retryType = fmt.Sprintf("max %d retries", config.MaxRetries) + } + + if config.LogInterval > 0 { + catcher.Info(fmt.Sprintf("Starting %s with %s", operationName, retryType), map[string]any{ + "initial_backoff": config.InitialBackoff.String(), + "max_backoff": config.MaxBackoff.String(), + }) + } + + for { + attempt++ + err := f() + + if err == nil { + return nil + } + + if len(config.ErrorFilter) > 0 && !matchesErrorFilter(err, config.ErrorFilter) { + if config.StopOnMismatch { + return err + } + continue + } + + if config.MaxRetries >= 0 && attempt > config.MaxRetries { + _ = catcher.Error(fmt.Sprintf("%s failed after %d attempts", operationName, attempt-1), err, map[string]any{ + "max_retries": config.MaxRetries, + }) + return err + } + + shouldLog := config.LogInterval == 0 && !errorLogged || + config.LogInterval > 0 && (attempt == 1 || attempt%config.LogInterval == 0) + + if shouldLog { + logMsg := fmt.Sprintf("%s failed, will retry...", operationName) + if config.MaxRetries < 0 { + logMsg = fmt.Sprintf("%s failed, will retry indefinitely...", operationName) + } + _ = catcher.Error(logMsg, err, map[string]any{ + "attempt": attempt, + "next_retry_in": currentBackoff.String(), + }) + errorLogged = true + } + + time.Sleep(currentBackoff) + + if config.BackoffMultiplier > 0 { + nextBackoff := time.Duration(float64(currentBackoff) * config.BackoffMultiplier) + currentBackoff = min(nextBackoff, config.MaxBackoff) + } + } +} + +func matchesErrorFilter(err error, filters []string) bool { + if err == nil { + return false + } + errMsg := err.Error() + for _, filter := range filters { + if strings.Contains(errMsg, filter) { + return true + } + } + return false +} + +func ConnectionChecker(url string) error { + checkConn := func() error { + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + + if err := checkConnection(url, ctx); err != nil { + return fmt.Errorf("connection failed") + } + return nil + } + + return Retry(checkConn, "connection check", ConnectionRetryConfig()) +} + +func checkConnection(url string, ctx context.Context) error { + client := &http.Client{} + + req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil) + if err != nil { + return err + } + + resp, err := client.Do(req) + if err != nil { + return err + } + defer func() { + if closeErr := resp.Body.Close(); closeErr != nil { + _ = catcher.Error("error closing response body", closeErr, nil) + } + }() + + return nil +} diff --git a/rules/README.md b/rules/README.md deleted file mode 100644 index 13467347a..000000000 --- a/rules/README.md +++ /dev/null @@ -1 +0,0 @@ -# UTMStack Rules diff --git a/utmstack-collector/collector/docker.go b/utmstack-collector/collector/docker.go index 2f2569d97..43f6650b6 100644 --- a/utmstack-collector/collector/docker.go +++ b/utmstack-collector/collector/docker.go @@ -8,7 +8,7 @@ import ( "sync" "time" - "github.com/docker/docker/api/types" + dockercontainer "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/events" "github.com/docker/docker/client" "github.com/google/uuid" @@ -124,7 +124,7 @@ func (d *DockerCollector) Stop() { } func (d *DockerCollector) discoverContainers() error { - containers, err := d.client.ContainerList(d.ctx, types.ContainerListOptions{All: true}) + containers, err := d.client.ContainerList(d.ctx, dockercontainer.ListOptions{All: true}) if err != nil { return err } @@ -144,7 +144,7 @@ func (d *DockerCollector) discoverContainers() error { func (d *DockerCollector) monitorEvents() { utils.Logger.Info("Starting Docker events monitoring") - eventChan, errChan := d.client.Events(d.ctx, types.EventsOptions{}) + eventChan, errChan := d.client.Events(d.ctx, events.ListOptions{}) for { select { @@ -170,7 +170,7 @@ func (d *DockerCollector) handleDockerEvent(event events.Message) { containerEvent := models.ContainerEvent{ ID: uuid.New().String(), ContainerID: event.Actor.ID, - Action: event.Action, + Action: string(event.Action), Timestamp: time.Unix(event.Time, 0), Attributes: event.Actor.Attributes, } @@ -229,7 +229,7 @@ func (d *DockerCollector) handleContainerDestroy(containerID string) { func (d *DockerCollector) streamContainerLogs(container models.Container) { utils.Logger.Info("Starting log stream for container: %s", container.Name) - options := types.ContainerLogsOptions{ + options := dockercontainer.LogsOptions{ ShowStdout: true, ShowStderr: true, Follow: true, @@ -300,7 +300,7 @@ func (d *DockerCollector) retryLogStream(container models.Container) { utils.Logger.Info("Container %s with ID %s not found, searching by name for Swarm replacement", container.Name, container.ID[:12]) - containers, err := d.client.ContainerList(d.ctx, types.ContainerListOptions{All: false}) + containers, err := d.client.ContainerList(d.ctx, dockercontainer.ListOptions{All: false}) if err != nil { utils.Logger.ErrorF("Failed to list containers while searching for %s: %v", container.Name, err) return @@ -381,7 +381,7 @@ func (d *DockerCollector) sendToUTMStack(utmLog *plugins.Log) { } } -func (d *DockerCollector) convertContainer(c types.Container) models.Container { +func (d *DockerCollector) convertContainer(c dockercontainer.Summary) models.Container { name := "" if len(c.Names) > 0 { name = strings.TrimPrefix(c.Names[0], "/") @@ -398,7 +398,7 @@ func (d *DockerCollector) convertContainer(c types.Container) models.Container { } } -func (d *DockerCollector) convertContainerJSON(c types.ContainerJSON) models.Container { +func (d *DockerCollector) convertContainerJSON(c dockercontainer.InspectResponse) models.Container { var created time.Time if c.Created != "" { if parsedTime, err := time.Parse(time.RFC3339Nano, c.Created); err == nil { @@ -434,7 +434,7 @@ func (d *DockerCollector) periodicRediscovery() { } func (d *DockerCollector) rediscoverContainers() error { - containers, err := d.client.ContainerList(d.ctx, types.ContainerListOptions{All: true}) + containers, err := d.client.ContainerList(d.ctx, dockercontainer.ListOptions{All: true}) if err != nil { return utils.Logger.ErrorF("failed to list containers: %v", err) } diff --git a/utmstack-collector/go.mod b/utmstack-collector/go.mod index cf0e5d24f..19b737397 100644 --- a/utmstack-collector/go.mod +++ b/utmstack-collector/go.mod @@ -1,84 +1,104 @@ module github.com/utmstack/UTMStack/utmstack-collector -go 1.25.0 +go 1.25.5 require ( github.com/AtlasInsideCorp/AtlasInsideAES v1.0.0 - github.com/docker/docker v24.0.7+incompatible + github.com/docker/docker v28.5.2+incompatible github.com/elastic/go-sysinfo v1.15.4 github.com/glebarez/sqlite v1.11.0 github.com/google/uuid v1.6.0 github.com/kardianos/service v1.2.4 - github.com/threatwinds/go-sdk v1.0.45 - github.com/threatwinds/logger v1.2.2 - google.golang.org/grpc v1.75.1 - google.golang.org/protobuf v1.36.9 + github.com/threatwinds/go-sdk v1.1.7 + github.com/threatwinds/logger v1.2.3 + google.golang.org/grpc v1.78.0 + google.golang.org/protobuf v1.36.11 gopkg.in/yaml.v2 v2.4.0 - gorm.io/gorm v1.31.0 + gorm.io/gorm v1.31.1 ) require ( - cel.dev/expr v0.24.0 // indirect + cel.dev/expr v0.25.1 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/bytedance/sonic v1.14.0 // indirect - github.com/bytedance/sonic/loader v0.3.0 // indirect - github.com/cloudwego/base64x v0.1.5 // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect + github.com/bytedance/gopkg v0.1.3 // indirect + github.com/bytedance/sonic v1.14.2 // indirect + github.com/bytedance/sonic/loader v0.4.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cloudwego/base64x v0.1.6 // indirect + github.com/containerd/errdefs v1.0.0 // indirect + github.com/containerd/errdefs/pkg v0.3.0 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/elastic/go-windows v1.0.2 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect github.com/gin-contrib/sse v1.1.0 // indirect - github.com/gin-gonic/gin v1.10.1 // indirect - github.com/glebarez/go-sqlite v1.21.2 // indirect + github.com/gin-gonic/gin v1.11.0 // indirect + github.com/glebarez/go-sqlite v1.22.0 // indirect + github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.27.0 // indirect + github.com/go-playground/validator/v10 v10.30.1 // indirect github.com/goccy/go-json v0.10.5 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/google/cel-go v0.26.0 // indirect + github.com/goccy/go-yaml v1.19.2 // indirect + github.com/google/cel-go v0.26.1 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect - github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/sys/atomicwriter v0.1.0 // indirect github.com/moby/term v0.5.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/morikuni/aec v1.0.0 // indirect + github.com/morikuni/aec v1.1.0 // indirect + github.com/ncruces/go-strftime v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect + github.com/opensearch-project/opensearch-go/v4 v4.6.0 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/procfs v0.15.1 // indirect + github.com/prometheus/procfs v0.19.2 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/stoewer/go-strcase v1.3.1 // indirect github.com/tidwall/gjson v1.18.0 // indirect - github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.3.0 // indirect - go.yaml.in/yaml/v2 v2.4.2 // indirect - golang.org/x/arch v0.19.0 // indirect - golang.org/x/crypto v0.40.0 // indirect - golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 // indirect - golang.org/x/net v0.42.0 // indirect - golang.org/x/sys v0.34.0 // indirect - golang.org/x/text v0.27.0 // indirect - golang.org/x/time v0.11.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 // indirect + github.com/ugorji/go/codec v1.3.1 // indirect + go.opentelemetry.io/auto/sdk v1.2.1 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0 // indirect + go.opentelemetry.io/otel v1.39.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.39.0 // indirect + go.opentelemetry.io/otel/metric v1.39.0 // indirect + go.opentelemetry.io/otel/trace v1.39.0 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + golang.org/x/arch v0.23.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + golang.org/x/time v0.14.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.2 // indirect - howett.net/plist v0.0.0-20181124034731-591f970eefbb // indirect - modernc.org/libc v1.22.5 // indirect - modernc.org/mathutil v1.5.0 // indirect - modernc.org/memory v1.5.0 // indirect - modernc.org/sqlite v1.23.1 // indirect - sigs.k8s.io/yaml v1.5.0 // indirect + howett.net/plist v1.0.1 // indirect + modernc.org/libc v1.67.6 // indirect + modernc.org/mathutil v1.7.1 // indirect + modernc.org/memory v1.11.0 // indirect + modernc.org/sqlite v1.44.2 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/utmstack-collector/go.sum b/utmstack-collector/go.sum index 34cbcc7d8..fe5d69021 100644 --- a/utmstack-collector/go.sum +++ b/utmstack-collector/go.sum @@ -1,5 +1,5 @@ -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= github.com/AtlasInsideCorp/AtlasInsideAES v1.0.0 h1:TBiBl9KCa4i4epY0/q9WSC4ugavL6+6JUkOXWDnMM6I= github.com/AtlasInsideCorp/AtlasInsideAES v1.0.0/go.mod h1:cRhQ3TS/VEfu/z+qaciyuDZdtxgaXgaX8+G6Wa5NzBk= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= @@ -8,22 +8,32 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ= -github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA= -github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA= -github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= -github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4= -github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M= +github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM= +github.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE= +github.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980= +github.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o= +github.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo= +github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= +github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M= +github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU= +github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= +github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= +github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE= +github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v28.5.2+incompatible h1:DBX0Y0zAjZbSrm1uzOkdr1onVghKaftjlSWt4AFexzM= +github.com/docker/docker v28.5.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= github.com/docker/go-connections v0.6.0/go.mod h1:AahvXYshr6JgfUJGdDCs2b5EZG/vmaMAntpSFH5BFKE= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -34,16 +44,19 @@ github.com/elastic/go-sysinfo v1.15.4 h1:A3zQcunCxik14MgXu39cXFXcIw2sFXZ0zL886ey github.com/elastic/go-sysinfo v1.15.4/go.mod h1:ZBVXmqS368dOn/jvijV/zHLfakWTYHBZPk3G244lHrU= github.com/elastic/go-windows v1.0.2 h1:yoLLsAsV5cfg9FLhZ9EXZ2n2sQFKeDYrHenkcivY4vI= github.com/elastic/go-windows v1.0.2/go.mod h1:bGcDpBzXgYSqM0Gx3DM4+UxFj300SZLixie9u9ixLM8= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w= github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM= -github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= -github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= -github.com/glebarez/go-sqlite v1.21.2 h1:3a6LFC4sKahUunAmynQKLZceZCOzUthkRkEAl9gAXWo= -github.com/glebarez/go-sqlite v1.21.2/go.mod h1:sfxdZyhQjTM2Wry3gVYWaW072Ri1WMdWJi0k6+3382k= +github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= +github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= +github.com/glebarez/go-sqlite v1.22.0 h1:uAcMJhaA6r3LHMTFgP0SifzgXg46yJkgxqyuyec+ruQ= +github.com/glebarez/go-sqlite v1.22.0/go.mod h1:PlBIdHe0+aUEFn+r2/uthrWq4FxbzugL0L8Li6yQJbc= github.com/glebarez/sqlite v1.11.0 h1:wSG0irqzP6VurnMEpFGer5Li19RpIRi2qvQz++w0GMw= github.com/glebarez/sqlite v1.11.0/go.mod h1:h8/o8j5wiAsqSPoWELDUdJXhjAhsVliSn7bWZjOhrgQ= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -54,23 +67,27 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= -github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ= -github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= +github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e h1:ijClszYn+mADRFY17kjQEVQ1XRhq2/JR1M3sGqeJoxs= +github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 h1:NmZ1PKzSTQbuGHw9DGPFomqkkLWMC+vZCkfs+FHv1Vg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3/go.mod h1:zQrxl1YP88HQlA6i9c63DSVPFklWpGX4OWAc9bFuaH4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= @@ -80,23 +97,22 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kardianos/service v1.2.4 h1:XNlGtZOYNx2u91urOdg/Kfmc+gfmuIo1Dd3rEi2OgBk= github.com/kardianos/service v1.2.4/go.mod h1:E4V9ufUuY82F7Ztlu1eN9VXWIQxg8NoLQlmFe0MtrXc= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= -github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/sys/atomicwriter v0.1.0 h1:kw5D/EqkBwsBFi0ss9v1VG3wIkVhzGvLklJ+w3A14Sw= +github.com/moby/sys/atomicwriter v0.1.0/go.mod h1:Ul8oqv2ZMNHOceF643P6FKPXeCmYtlQMvpizfsSoaWs= +github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU= +github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko= github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -104,25 +120,35 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/morikuni/aec v1.1.0 h1:vBBl0pUnvi/Je71dsRrhMBtreIqNMYErSAbEeb8jrXQ= +github.com/morikuni/aec v1.1.0/go.mod h1:xDRgiq/iw5l+zkao76YTKzKttOp2cwPEne25HDkJnBw= +github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w= +github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= +github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc= +github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= -github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/procfs v0.19.2 h1:zUMhqEW66Ex7OXIiDkll3tl9a1ZdilUOd/F6ZXw4Vws= +github.com/prometheus/procfs v0.19.2/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -131,121 +157,134 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/threatwinds/go-sdk v1.0.45 h1:KZ3s3HviNRrOkg5EqjFnoauANFFzTqjNFyshPLY2SoI= -github.com/threatwinds/go-sdk v1.0.45/go.mod h1:tcWn6r6vqID/W/nL3UKfc5NafA3V/cSkiLvfJnwB58c= -github.com/threatwinds/logger v1.2.2 h1:sVuT8yhbecPqP4tT8EwHfp1czNC6e1wdkE1ihNnuBdA= -github.com/threatwinds/logger v1.2.2/go.mod h1:Amq0QI1y7fkTpnBUgeGVu2Z/C4u4ys2pNLUOuj3UAAU= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo= +github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw= +github.com/threatwinds/logger v1.2.3 h1:V2SVAXzbq+/huCvIWOfqzMTH+WBHJxankyBgVG2hy1Y= +github.com/threatwinds/logger v1.2.3/go.mod h1:N+bJKvF4FQNJZLfQpVYWpr6D8iEAFnAQfHYqH5iR1TI= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= +github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= -github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= -go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= -go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= -go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= -go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI= -go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg= -go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc= -go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= -go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= -go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= -go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= -go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= -go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= -go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= -golang.org/x/arch v0.19.0 h1:LmbDQUodHThXE+htjrnmVD73M//D9GTH6wFZjyDkjyU= -golang.org/x/arch v0.19.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= -golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 h1:R9PFI6EUdfVKgwKjZef7QIwGcBKu86OEFpJ9nUEP2l4= -golang.org/x/exp v0.0.0-20250718183923-645b1fa84792/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY= +github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ= +github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0 h1:ssfIgGNANqpVFCndZvcuyKbl0g+UAVcbBcqGkG28H0Y= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0/go.mod h1:GQ/474YrbE4Jx8gZ4q5I4hrhUzM6UPzyrqJYV2AqPoQ= +go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48= +go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0 h1:f0cb2XPmrqn4XMy9PNliTgRKJgS5WcL/u0/WRYGz4t0= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0/go.mod h1:vnakAaFckOMiMtOIhFI2MNH4FYrZzXCYxmb1LlhoGz8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.39.0 h1:Ckwye2FpXkYgiHX7fyVrN1uA/UYd9ounqqTuSNAv0k4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.39.0/go.mod h1:teIFJh5pW2y+AN7riv6IBPX2DuesS3HgP39mwOspKwU= +go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0= +go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs= +go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18= +go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE= +go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8= +go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew= +go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI= +go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA= +go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A= +go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/arch v0.23.0 h1:lKF64A2jF6Zd8L0knGltUnegD62JMFBiCPBmQpToHhg= +golang.org/x/arch v0.23.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= +golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c= +golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= -golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= -golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0= -golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= +golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= +golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc= +golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg= gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 h1:mVXdvnmR3S3BQOqHECm9NGMjYiRtEvDYcqAqedTXY6s= -google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:vYFwMYFbmA8vl6Z/krj/h7+U/AqpHknwJX4Uqgfyc7I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 h1:qJW29YvkiJmXOYMu5Tf8lyrTp3dOS+K4z6IixtLaCf8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.75.1 h1:/ODCNEuf9VghjgO3rqLcfg8fiOP0nSluljWFlDxELLI= -google.golang.org/grpc v1.75.1/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ= -google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw= -google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3 h1:X9z6obt+cWRX8XjDVOn+SZWhWe5kZHm46TThU9j+jss= +google.golang.org/genproto/googleapis/api v0.0.0-20260114163908-3f89685c29c3/go.mod h1:dd646eSK+Dk9kxVBl1nChEOhJPtMXriCcVb4x3o6J+E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/gorm v1.31.0 h1:0VlycGreVhK7RF/Bwt51Fk8v0xLiiiFdbGDPIZQ7mJY= -gorm.io/gorm v1.31.0/go.mod h1:XyQVbO2k6YkOis7C2437jSit3SsDK72s7n7rsSHd+Gs= +gorm.io/gorm v1.31.1 h1:7CA8FTFz/gRfgqgpeKIBcervUn3xSyPUmr6B2WXJ7kg= +gorm.io/gorm v1.31.1/go.mod h1:XyQVbO2k6YkOis7C2437jSit3SsDK72s7n7rsSHd+Gs= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= -howett.net/plist v0.0.0-20181124034731-591f970eefbb h1:jhnBjNi9UFpfpl8YZhA9CrOqpnJdvzuiHsl/dnxl11M= -howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= -modernc.org/libc v1.22.5 h1:91BNch/e5B0uPbJFgqbxXuOnxBQjlS//icfQEGmvyjE= -modernc.org/libc v1.22.5/go.mod h1:jj+Z7dTNX8fBScMVNRAYZ/jF91K8fdT2hYMThc3YjBY= -modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= -modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds= -modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/sqlite v1.23.1 h1:nrSBg4aRQQwq59JpvGEQ15tNxoO5pX/kUjcRNwSAGQM= -modernc.org/sqlite v1.23.1/go.mod h1:OrDj17Mggn6MhE+iPbBNf7RGKODDE9NFT0f3EwDzJqk= -nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ= -sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4= +howett.net/plist v1.0.1 h1:37GdZ8tP09Q35o9ych3ehygcsL+HqKSwzctveSlarvM= +howett.net/plist v1.0.1/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= +modernc.org/cc/v4 v4.27.1 h1:9W30zRlYrefrDV2JE2O8VDtJ1yPGownxciz5rrbQZis= +modernc.org/cc/v4 v4.27.1/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0= +modernc.org/ccgo/v4 v4.30.1 h1:4r4U1J6Fhj98NKfSjnPUN7Ze2c6MnAdL0hWw6+LrJpc= +modernc.org/ccgo/v4 v4.30.1/go.mod h1:bIOeI1JL54Utlxn+LwrFyjCx2n2RDiYEaJVSrgdrRfM= +modernc.org/fileutil v1.3.40 h1:ZGMswMNc9JOCrcrakF1HrvmergNLAmxOPjizirpfqBA= +modernc.org/fileutil v1.3.40/go.mod h1:HxmghZSZVAz/LXcMNwZPA/DRrQZEVP9VX0V4LQGQFOc= +modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI= +modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito= +modernc.org/gc/v3 v3.1.1 h1:k8T3gkXWY9sEiytKhcgyiZ2L0DTyCQ/nvX+LoCljoRE= +modernc.org/gc/v3 v3.1.1/go.mod h1:HFK/6AGESC7Ex+EZJhJ2Gni6cTaYpSMmU/cT9RmlfYY= +modernc.org/goabi0 v0.2.0 h1:HvEowk7LxcPd0eq6mVOAEMai46V+i7Jrj13t4AzuNks= +modernc.org/goabi0 v0.2.0/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI= +modernc.org/libc v1.67.6 h1:eVOQvpModVLKOdT+LvBPjdQqfrZq+pC39BygcT+E7OI= +modernc.org/libc v1.67.6/go.mod h1:JAhxUVlolfYDErnwiqaLvUqc8nfb2r6S6slAgZOnaiE= +modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= +modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= +modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI= +modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw= +modernc.org/opt v0.1.4 h1:2kNGMRiUjrp4LcaPuLY2PzUfqM/w9N23quVwhKt5Qm8= +modernc.org/opt v0.1.4/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns= +modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w= +modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE= +modernc.org/sqlite v1.44.2 h1:EdYqXeBpKFJjg8QYnw6E71MpANkoxyuYi+g68ugOL8g= +modernc.org/sqlite v1.44.2/go.mod h1:CzbrU2lSB1DKUusvwGz7rqEKIq+NUd8GWuBBZDs9/nA= +modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0= +modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A= +modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= +modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/web-pdf/src/main/java/com/utmstack/webtopdf/config/WebDriverConfig.java b/web-pdf/src/main/java/com/utmstack/webtopdf/config/WebDriverConfig.java index 2d3faca02..940283631 100644 --- a/web-pdf/src/main/java/com/utmstack/webtopdf/config/WebDriverConfig.java +++ b/web-pdf/src/main/java/com/utmstack/webtopdf/config/WebDriverConfig.java @@ -4,29 +4,48 @@ import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeOptions; import org.openqa.selenium.remote.RemoteWebDriver; +import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; import java.net.MalformedURLException; import java.net.URL; +import java.time.Duration; @Configuration @Slf4j public class WebDriverConfig { + @Value("${selenium.grid.url:http://localhost:4444/wd/hub}") + private String seleniumGridUrl; + public WebDriver createWebDriver() { try { + WebDriver driver = getWebDriver(); - URL serverUrl = new URL("http://localhost:4444/wd/hub"); + driver.manage().timeouts().pageLoadTimeout(Duration.ofSeconds(60)); + driver.manage().timeouts().scriptTimeout(Duration.ofSeconds(30)); - ChromeOptions options = new ChromeOptions(); - options.addArguments("--headless"); - options.addArguments("--no-sandbox"); - options.setAcceptInsecureCerts(true); + return driver; - return new RemoteWebDriver(serverUrl, options); - } catch (MalformedURLException | RuntimeException exception) { - log.error(exception.getMessage()); + } catch (Exception exception) { + log.error("Failed to initialize RemoteWebDriver", exception); throw new RuntimeException("Failed to initialize RemoteWebDriver", exception); } } -} \ No newline at end of file + + private WebDriver getWebDriver() throws MalformedURLException { + URL serverUrl = new URL(seleniumGridUrl); + + ChromeOptions options = new ChromeOptions(); + options.addArguments("--headless=new"); + options.addArguments("--no-sandbox"); + options.addArguments("--disable-dev-shm-usage"); + options.addArguments("--disable-gpu"); + options.addArguments("--disable-software-rasterizer"); + options.addArguments("--window-size=1920,1080"); + options.addArguments("--remote-allow-origins=*"); + options.setAcceptInsecureCerts(true); + + return new RemoteWebDriver(serverUrl, options); + } +} diff --git a/web-pdf/src/main/java/com/utmstack/webtopdf/config/enums/AccessType.java b/web-pdf/src/main/java/com/utmstack/webtopdf/config/enums/AccessType.java index b535e79a3..2469b29b7 100644 --- a/web-pdf/src/main/java/com/utmstack/webtopdf/config/enums/AccessType.java +++ b/web-pdf/src/main/java/com/utmstack/webtopdf/config/enums/AccessType.java @@ -2,6 +2,9 @@ import lombok.Getter; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; + public enum AccessType { UTM_TOKEN("Utm_Token", "?token=", "&url="), UTM_INTERNAL_KEY("Utm_Internal_Key", "?key=", "&url="); @@ -18,6 +21,7 @@ public enum AccessType { } public String buildUrlPart(String accessKey, String route) { - return accessType + accessKey + url + route; + String encodedRoute = URLEncoder.encode(route, StandardCharsets.UTF_8); + return accessType + accessKey + url + encodedRoute; } } diff --git a/web-pdf/src/main/java/com/utmstack/webtopdf/controller/WebPdfController.java b/web-pdf/src/main/java/com/utmstack/webtopdf/controller/WebPdfController.java index f2a393bcb..1d355f39e 100644 --- a/web-pdf/src/main/java/com/utmstack/webtopdf/controller/WebPdfController.java +++ b/web-pdf/src/main/java/com/utmstack/webtopdf/controller/WebPdfController.java @@ -22,15 +22,33 @@ public class WebPdfController { private final PdfGenerationService pdfGenerationService; @GetMapping("/generate-pdf") - public ResponseEntity generatePdf(@RequestParam String baseUrl, @RequestParam String url, @RequestParam String accessType, @RequestParam String accessKey) { - try { - byte[] pdfBytes = pdfGenerationService.generatePdf(baseUrl, url, accessKey, AccessType.valueOf(accessType.toUpperCase())); + public ResponseEntity generatePdf(@RequestParam String baseUrl, + @RequestParam String url, + @RequestParam String accessType, + @RequestParam String accessKey) { - return ResponseEntity.ok().body(ResponseDto.builder().pdfBytes(pdfBytes).build()); - } catch (Exception e) { - log.error("Error generating the PDF for the URL: {}", url, e); - return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(ResponseDto.builder().message("Error generating the PDF for the URL").build()); + byte[] pdfBytes = pdfGenerationService.generatePdf(baseUrl, + url, + accessKey, + AccessType.valueOf(accessType.toUpperCase())); + + if (pdfBytes == null || pdfBytes.length == 0) { + log.error("PDF generation returned empty bytes for URL: {}", url); + + return ResponseEntity + .status(HttpStatus.BAD_REQUEST) + .body(ResponseDto.builder() + .error(true) + .message("Failed to generate PDF: No content returned") + .build()); } + + return ResponseEntity.ok( + ResponseDto.builder() + .pdfBytes(pdfBytes) + .error(false) + .message("PDF generated successfully") + .build()); } } diff --git a/web-pdf/src/main/java/com/utmstack/webtopdf/dto/ErrorResponse.java b/web-pdf/src/main/java/com/utmstack/webtopdf/dto/ErrorResponse.java new file mode 100644 index 000000000..a1afaadb5 --- /dev/null +++ b/web-pdf/src/main/java/com/utmstack/webtopdf/dto/ErrorResponse.java @@ -0,0 +1,13 @@ +package com.utmstack.webtopdf.dto; + +import lombok.Builder; +import lombok.Data; + +@Data +@Builder +public class ErrorResponse { + private boolean error; + private String message; + private String details; +} + diff --git a/web-pdf/src/main/java/com/utmstack/webtopdf/dto/ResponseDto.java b/web-pdf/src/main/java/com/utmstack/webtopdf/dto/ResponseDto.java index 41e85b8ba..c46c649e7 100644 --- a/web-pdf/src/main/java/com/utmstack/webtopdf/dto/ResponseDto.java +++ b/web-pdf/src/main/java/com/utmstack/webtopdf/dto/ResponseDto.java @@ -10,4 +10,5 @@ public class ResponseDto { private byte[] pdfBytes; private String message; + private boolean error; } diff --git a/web-pdf/src/main/java/com/utmstack/webtopdf/exception/GlobalExceptionHandler.java b/web-pdf/src/main/java/com/utmstack/webtopdf/exception/GlobalExceptionHandler.java new file mode 100644 index 000000000..666e0b3ff --- /dev/null +++ b/web-pdf/src/main/java/com/utmstack/webtopdf/exception/GlobalExceptionHandler.java @@ -0,0 +1,51 @@ +package com.utmstack.webtopdf.exception; + +import com.utmstack.webtopdf.dto.ErrorResponse; +import lombok.extern.slf4j.Slf4j; +import org.openqa.selenium.TimeoutException; +import org.openqa.selenium.NoSuchElementException; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ExceptionHandler; + +@Slf4j +@ControllerAdvice +public class GlobalExceptionHandler { + + @ExceptionHandler(TimeoutException.class) + public ResponseEntity handleTimeout(TimeoutException ex) { + log.error("Timeout while waiting for Selenium condition: {}", ex.getMessage()); + + return ResponseEntity.status(HttpStatus.REQUEST_TIMEOUT) + .body(ErrorResponse.builder() + .error(true) + .message("The report took too long to load.") + .details(ex.getMessage()) + .build()); + } + + @ExceptionHandler(NoSuchElementException.class) + public ResponseEntity handleNoSuchElement(NoSuchElementException ex) { + log.error("Required element not found in Selenium: {}", ex.getMessage()); + + return ResponseEntity.status(HttpStatus.BAD_REQUEST) + .body(ErrorResponse.builder() + .error(true) + .message("A required element was not found while generating the PDF.") + .details(ex.getMessage()) + .build()); + } + + @ExceptionHandler(Exception.class) + public ResponseEntity handleGeneral(Exception ex) { + log.error("Unexpected error: {}", ex.getMessage(), ex); + + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) + .body(ErrorResponse.builder() + .error(true) + .message("An unexpected error occurred while generating the PDF.") + .details(ex.getMessage()) + .build()); + } +} diff --git a/web-pdf/src/main/java/com/utmstack/webtopdf/service/PdfGenerationService.java b/web-pdf/src/main/java/com/utmstack/webtopdf/service/PdfGenerationService.java index 7d9033194..b02d1f4de 100644 --- a/web-pdf/src/main/java/com/utmstack/webtopdf/service/PdfGenerationService.java +++ b/web-pdf/src/main/java/com/utmstack/webtopdf/service/PdfGenerationService.java @@ -37,16 +37,37 @@ public byte[] generatePdf(String url, String route, String accessKey, AccessType try { webDriver.get(reportUrl); - WebDriverWait wait = new WebDriverWait(webDriver, Duration.ofSeconds(10)); - wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector(".report-loading"))); + + WebDriverWait wait = new WebDriverWait(webDriver, Duration.ofSeconds(5)); + + wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("app-root"))); + wait.until(ExpectedConditions.invisibilityOfElementLocated(By.id("app-loading"))); + wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector(".report-loaded"))); + + Thread.sleep(1000); Pdf print = ((PrintsPage) webDriver).print(printOptions); - webDriver.quit(); return OutputType.BYTES.convertFromBase64Png(print.getContent()); + + } catch (TimeoutException e) { + log.error("Timeout waiting for report to load: {}", e.getMessage()); + throw new TimeoutException("The report took too long to load."); + + } catch (NoSuchElementException e) { + log.error("Required element not found: {}", e.getMessage()); + throw new NoSuchElementException("A required element was not found while generating the PDF."); + } catch (Exception e) { - log.error("Error generating PDF report: {}", e.getMessage(), e); - webDriver.quit(); - return new byte[0]; + log.error("Unexpected error generating PDF: {}", e.getMessage(), e); + throw new RuntimeException("Unexpected error generating the PDF."); + + } finally { + try { + webDriver.quit(); + } catch (Exception ex) { + log.warn("Error closing WebDriver: {}", ex.getMessage()); + } } } + } \ No newline at end of file