AI multi-dimensional security detection method for kubernetes cluster

By initiating orchestrated API call sequences in the Kubernetes cluster, collecting multi-dimensional status data and performing parallel correlation analysis, the fragmentation and single-dimensionality issues of Kubernetes cluster security detection tools are resolved, achieving comprehensive security situation awareness and standardized report output.

CN123184879APending Publication Date: 2026-11-27SHANG FEI ZHI NENG JI SHU YOU XIAN GONG SI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611210833.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-11
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies for Kubernetes cluster security detection suffer from problems such as severe tool fragmentation, isolated and single detection dimensions, lack of automatic attack path deduction capabilities, lack of cloud identity context awareness, non-standardized report output, and lack of integrated operation interface.

Method used

By initiating an orchestrated sequence of read-only API calls to the target Kubernetes cluster, multi-dimensional state data is collected, a scan snapshot is constructed, and a multi-dimensional detector array and AI decision engine are invoked for parallel correlation analysis to generate a security discovery set and attack path inference results.

Benefits of technology

It achieves read-only multi-dimensional security detection and automatic attack path inference for Kubernetes clusters, and achieves the technical effects of unified detection process, comprehensive security dimension coverage, risk correlation and causation, cloud identity awareness across clouds, standardized report output and unified protocol call.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123184879A_ABST
    Figure CN123184879A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of Kubernetes cluster security detection, and provides an AI multidimensional security detection method for a Kubernetes cluster, which comprises the following steps: initiating an arranged read-only API calling sequence to a target Kubernetes cluster, collecting multidimensional state data of the target cluster; constructing the multidimensional state data into a scanning snapshot; based on the scanning snapshot, calling a multidimensional detector array and an AI decision engine to perform parallel correlation analysis on the multidimensional state data; and based on the parallel correlation analysis result, generating a security discovery set and an attack path deduction result of the target cluster. The method realizes read-only multidimensional security detection and automatic deduction of an attack path for the target Kubernetes cluster, and achieves the technical effects of unified detection process, comprehensive security dimension coverage, risk correlation causation, cloud identity perception across clouds, report output standardization and protocol calling unification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Kubernetes cluster security detection technology, and in particular to an AI multidimensional security detection method for Kubernetes clusters. Background Technology

[0002] With container orchestration technology becoming the de facto standard for cloud computing infrastructure, Kubernetes (hereinafter referred to as K8s) has assumed a core scheduling role in global enterprise-level containerized deployments. However, the security configuration of Kubernetes clusters is extremely complex, involving multiple security dimensions such as API Server authentication, Role-Based Access Control (RBAC) authorization policies, Pod security contexts, network policies, Secret credential management, and cloud provider identity federation. Against this backdrop, conducting security assessments of Kubernetes clusters has become a critical step in cloud-native security operations and maintenance.

[0003] Currently, the industry typically employs a fragmented, multi-stage, multi-tool approach for security assessments of Kubernetes clusters. Specifically, assessors need to go through the following stages sequentially: In the information gathering stage, they manually execute Linux commands within the target Pod to identify the container environment, kernel version, mount points, and available capability sets, while simultaneously using independent port scanning tools to probe open ports of K8s components; in the initial access detection stage, they use command-line tools to probe the unauthorized access surface of the API Server, the availability of port 10250 for kubelet, the exposure of port 2379 for etcd, and unauthorized logins to the Dashboard, and parse the kubeconfig file; in the command execution verification stage, they execute commands in the target Pod via kubectl or by directly calling the kubelet exec interface over HTTP, manually construct a reverse shell payload, and write YAML to deploy the backdoor Pod; in the persistence detection stage, they manually write YAML manifests for high-privilege ServiceAccount, CronJob, DaemonSet, and other K8s resources, deploy them one by one, and verify the persistence effect; in the privilege escalation and lateral movement stage, they manually check the container privilege mode, hostPath mounts, and Docker... Escape conditions such as socket exposure were identified by enumerating Secrets one by one using kubectl and manually decoding them using Base64. Network topology analysis was performed by examining each Service, Endpoint, Node, and NetworkPolicy. Finally, in the comprehensive report stage, the assessment personnel manually summarized the findings from each stage and compiled them into a security assessment report.

[0004] The aforementioned existing technical solutions have the following shortcomings: First, the tools are severely fragmented. Each of the above stages relies on at least five to eight independent tools (including but not limited to kubectl, curl, nmap, ncat, base64 decoder, YAML editor, and report writing tools). Operators need to frequently switch between multiple tool windows, which seriously reduces work efficiency and makes it difficult to ensure the completeness of detection coverage.

[0005] Second, there is a lack of multi-dimensional unified detection capabilities. Existing tools operate independently, lacking a unified detection platform that can perform cluster profiling analysis, identity and RBAC analysis, workload security analysis, secret credential exposure analysis, network exposure surface analysis, and cloud identity context analysis in a single engine. This results in fragmented security assessment results and makes it difficult to form a global perspective.

[0006] Third, there is a lack of automated attack path deduction capabilities. Existing tools can only generate isolated vulnerability discovery lists and cannot automatically link multiple risk discoveries into attack path chains with causal logic (e.g., "anonymous API access → cluster enumeration → RBAC sensitive combination → credential theft → cloud role privilege escalation"). Assessors must rely on their own experience to manually connect the discrete discoveries, making it difficult to demonstrate the complete kill chain path from the attacker's perspective.

[0007] Fourth, cloud identity context detection is lacking. Existing general-purpose Kubernetes security tools (such as kube-bench, kube-hunter, Falco, etc.) do not have the ability to perceive Pod cloud identities across cloud providers. They cannot identify the risk of credential leakage under multi-cloud federated identity mechanisms such as AWS EKS IRSA, GCPPKE Workload Identity, Azure AKS Workload Identity, and Alibaba Cloud ACK RRSA, resulting in blind spots in identity security assessment in cloud-native environments.

[0008] Fifth, report output is not standardized. Existing tools have various output formats (including JSON lines, plain text, various logs, etc.), lacking a unified HTML, JSON, or Markdown standardized report output mechanism, which cannot meet the needs of compliance auditing and enterprise-level reporting.

[0009] Sixth, there is a lack of an integrated user interface. Security assessors need to master the use of more than ten command-line tools, which is costly to learn. Existing technology lacks a unified graphical user interface to integrate the functions of each stage into a single workbench, which is not conducive to the standardization and large-scale implementation of security assessment work.

[0010] In addition, among the known related tools, kube-bench is an open-source CIS Benchmark compliance check tool from Aqua Security, which only covers configuration compliance checks and does not have attack path analysis and cloud identity detection capabilities; kube-hunter is an open-source Kubernetes penetration testing tool from Aqua Security, which only provides basic passive / active discovery, without a graphical interface, attack path deduction, or report generation; Falco is a CNCF project that focuses on runtime threat detection and does not provide proactive security assessment and attack path analysis; Kubescape is an open-source security posture management tool from ARMO that focuses on compliance scoring and lacks attack exploitation verification from a red team perspective and cloud identity context awareness.

[0011] In summary, existing technical solutions have significant shortcomings in terms of tool integration, uniformity of detection dimensions, intelligent inference of attack paths, multi-cloud identity awareness, standardization of reports, and integration of user interfaces. There is an urgent need for a new technical solution that can unify and integrate the above capabilities and perform multi-dimensional security detection and attack path analysis on Kubernetes clusters in a read-only manner. Summary of the Invention

[0012] This invention provides an AI-powered multidimensional security detection method for Kubernetes clusters, addressing the shortcomings of existing technologies in Kubernetes cluster security detection, such as fragmented tools, isolated detection dimensions, lack of automatic attack path deduction capabilities, lack of cloud identity context awareness, non-standardized report output, and lack of integrated operation interfaces. It achieves read-only multidimensional security detection and automatic attack path deduction of target Kubernetes clusters, resulting in a unified detection process, comprehensive security dimension coverage, causal risk correlation, cross-cloud cloud identity awareness, standardized report output, and unified protocol calls.

[0013] This invention provides an AI multidimensional security detection method for Kubernetes clusters, including: Initiate an orchestrated sequence of read-only API calls to the target Kubernetes cluster and collect multi-dimensional state data of the target Kubernetes cluster; The multi-dimensional state data is used to construct a scan snapshot; Based on the scan snapshot, a multi-dimensional detector array and an AI decision engine are invoked to perform parallel correlation analysis on the multi-dimensional state data; Based on the results of parallel correlation analysis, a security discovery set and attack path inference results for the target Kubernetes cluster are generated.

[0014] In one possible implementation, the method further includes: The orchestrated read-only API call sequence is initiated through a unified Kubernetes REST API abstraction layer. This unified Kubernetes REST API abstraction layer supports anonymous request mode and Bearer token authentication mode within the same framework. The caller completes the protocol switching from unauthorized to authorized detection through a single parameter switch, in order to collect the API Server authentication and resource enumeration status data of the target Kubernetes cluster. The orchestrated read-only API call sequence is controlled to contain only GET requests to the Kubernetes REST API endpoint, and no write operations are performed on the target Kubernetes cluster, so as to collect the full multi-dimensional state data of the target Kubernetes cluster in a read-only manner; The orchestrated read-only API call sequence is executed through a dual-channel heterogeneous protocol call architecture, which includes a first channel based on HTTP REST direct connection and a second channel based on kubectl subprocess call. The first channel performs read-only throughput detection above a threshold, and the second channel performs operations requiring advanced kubectl functions to collect kubectl-accessible multi-dimensional state data of the target Kubernetes cluster.

[0015] In one possible implementation, the method further includes: The endpoints included in the API call sequence are dynamically determined based on the detection dimensions to be enabled. When only some detection dimensions are enabled, API endpoint calls unrelated to the enabled detection dimensions are automatically skipped in order to collect multi-dimensional status data related to the enabled detection dimensions.

[0016] In one possible implementation, the method further includes: The API protocol version of the etcd key-value storage system of the target Kubernetes cluster is automatically identified. When it is identified as version v2, a GET request is used to access the / v2 / keys / endpoint. When it is identified as version v3, a POST request is used to access the / v3 / kv / range endpoint and a JSON request body containing a Base64 encoded key range is constructed to collect the etcd key-value status data of the target Kubernetes cluster. The kubelet's WebSocket subprotocol is simplified to an HTTP POST FORM request to perform unauthenticated probing of the / pods endpoint on kubelet port 10250. The risk of unauthorized access to kubelet is assessed based on the response status code in order to collect kubelet container status data of the target Kubernetes cluster.

[0017] In one possible implementation, the method further includes: The system simultaneously maintains a raw response text cache layer and a pre-parsed JSON object cache layer in memory. The raw response text cache layer is used for evidence tracing and auditing, while the pre-parsed JSON object cache layer is available for direct querying in subsequent analysis. This cache method is used to collect and store multi-dimensional state data of the target Kubernetes cluster.

[0018] In one possible implementation, the method further includes: The multi-dimensional state data is stored in an immutable memory mapping; The immutable memory mapping is used as a scan snapshot for all detectors to share and read.

[0019] In one possible implementation, the method further includes: The cluster profile detector is invoked to generate cluster topology security findings based on the cluster version information, node list, and node tag information in the scan snapshot. Invoke the identity and RBAC detector, and generate permission configuration security discovery based on the ClusterRoleBinding list, ServiceAccount list and SelfSubjectRulesReview results in the scan snapshot; The workload security detector is invoked to parse the Pod security context based on the Pod list in the scan snapshot and generate workload security discoveries. The Secret credential exposure detector is invoked to detect the Secret access status based on the Secret list in the scan snapshot and generate a credential exposure security discovery. The network exposure surface detector is invoked, and based on the Service list, Endpoint list, and NetworkPolicy list in the scan snapshot, network reachability is analyzed to generate network exposure security findings. The cloud identity context detector is invoked to identify the cloud provider type based on at least one of the node tag information, Pod annotations, environment variables and metadata server reachability in the scan snapshot. Based on the identified cloud provider type, the corresponding cloud identity protocol detector is invoked to detect the cloud identity context and generate cloud identity security discovery. The AI ​​decision engine is invoked to establish a communication connection with the main scanning process through a subprocess and the JSON-RPC 2.0 protocol. Based on the various security discoveries generated, at least one of the following is performed: intelligent target analysis, vulnerability template suggestion, exploit chain construction, penetration test report generation, and security assistant dialogue.

[0020] In one possible implementation, the method further includes: The various security discoveries generated by the cluster profiling detector, identity and RBAC detector, workload security detector, secret credential exposure detector, network exposure surface detector, and cloud identity context detector are aggregated into the security discovery set. Each security discovery in the security discovery set is assigned a risk level, and the source of the original API response value of the security discovery is recorded as evidence tracing information; Using discrete discoveries from the security discovery set as input, and performing precondition matching and evidence citation association based on preset attack path rules, an attack path chain with causal order is constructed. The attack path chain is represented as a three-node graph structure, wherein the three nodes include an identity node, an authorization node, and a resource node. The identity node and the authorization node are connected by a relation, and the authorization node and the resource node are connected by a reachability relation.

[0021] This invention also provides an AI multidimensional security detection device for Kubernetes clusters, comprising the following modules: The acquisition module is used to initiate an orchestrated read-only API call sequence to the target Kubernetes cluster and acquire multi-dimensional status data of the target Kubernetes cluster. A construction module is used to construct the multi-dimensional state data into a scan snapshot; The analysis module is used to perform parallel correlation analysis on the multi-dimensional state data by calling a multi-dimensional detector array and an AI decision engine based on the scan snapshot; The generation module is used to generate a security discovery set and attack path inference results for the target Kubernetes cluster based on the results of parallel correlation analysis.

[0022] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the AI ​​multidimensional security detection method for Kubernetes clusters as described above.

[0023] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the AI ​​multidimensional security detection method for Kubernetes clusters as described above.

[0024] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the AI ​​multidimensional security detection method for Kubernetes clusters as described above.

[0025] The AI-powered multi-dimensional security detection method for Kubernetes clusters provided by this invention collects multi-dimensional state data of the target Kubernetes cluster by initiating an orchestrated read-only API call sequence to the target Kubernetes cluster; constructs a scan snapshot from the multi-dimensional state data; and, based on the scan snapshot, invokes a multi-dimensional detector array and an AI decision engine to perform parallel correlation analysis on the multi-dimensional state data; based on the results of the parallel correlation analysis, generates a security discovery set and attack path inference results for the target Kubernetes cluster. Compared with the shortcomings of existing technologies for Kubernetes cluster security detection, such as severe tool fragmentation, isolated detection dimensions, lack of automatic attack path inference capabilities, lack of cloud identity context awareness, non-standardized report output, and lack of integrated operation interface, this solution achieves read-only multi-dimensional security detection and automatic attack path inference for target Kubernetes clusters, achieving the technical effects of unified detection process, comprehensive security dimension coverage, risk correlation and causation, cross-cloud cloud identity awareness, standardized report output, and unified protocol calls. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0027] Figure 1 This is a flowchart illustrating the AI ​​multidimensional security detection method for Kubernetes clusters provided by this invention.

[0028] Figure 2 This is a schematic diagram of the AI ​​multidimensional security detection software architecture and specific implementation process for Kubernetes clusters provided by this invention.

[0029] Figure 3 This is a schematic diagram of the structure of the AI ​​multidimensional security detection device for Kubernetes clusters provided by the present invention.

[0030] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0032] To facilitate understanding of the embodiments of the present invention, further explanations and descriptions will be provided below with reference to the accompanying drawings and specific embodiments. These embodiments do not constitute a limitation on the embodiments of the present invention.

[0033] Figure 1 This is a flowchart illustrating the AI ​​multidimensional security detection method for Kubernetes clusters provided by this invention, as shown below. Figure 1 As shown, the method includes the following: S11. Initiate an orchestrated read-only API call sequence to the target Kubernetes cluster to collect multi-dimensional status data of the target Kubernetes cluster.

[0034] In this embodiment, the computer or server acts as the execution entity, first initiating an orchestrated read-only API call sequence to the target Kubernetes cluster. This call sequence is initiated through a unified Kubernetes REST API abstraction layer, supporting anonymous request mode and Bearer token authentication mode within the same framework. The caller only needs to switch between unauthorized and authorized detection protocols with a single parameter. The call sequence only contains GET requests to the Kubernetes REST API endpoints and does not perform any write operations on the target cluster, thus minimizing interference with the target cluster. The above call sequence is executed through a dual-channel heterogeneous protocol call architecture. The first channel, based on direct HTTP REST connection, is used to perform high-throughput (throughput exceeding a threshold, which can be set according to actual conditions) read-only detection, while the second channel, based on kubectl subprocess calls, is used to perform operations requiring advanced kubectl functions. The collected multi-dimensional status data includes, but is not limited to, cluster version information, node list, Pod list, Secret list, Service list, Endpoint list, NetworkPolicy list, ClusterRoleBinding list, ServiceAccount list, SelfSubjectRulesReview results, and node tag information.

[0035] S12. Construct the multi-dimensional state data into a scan snapshot.

[0036] The multi-dimensional state data collected in step S11 is stored in an immutable memory map, forming a scan snapshot. A raw response text cache layer and a pre-parsed JSON object cache layer are maintained simultaneously in memory. The raw response text is used for evidence tracing and auditing, while the pre-parsed JSON object is available for direct querying and analysis by all subsequent detectors. All detectors share the same scan snapshot, avoiding duplicate requests to the API Server.

[0037] S13. Based on the scan snapshot, invoke the multi-dimensional detector array and AI decision engine to perform parallel correlation analysis on the multi-dimensional state data.

[0038] Based on the scan snapshot constructed in step S12, a multi-dimensional detector array and an AI decision engine are invoked in parallel. The multi-dimensional detector array includes a cluster profiling detector, an identity and RBAC detector, a workload security detector, a secret credential exposure detector, a network exposure surface detector, and a cloud identity context detector. Each detector implements a unified ScanDetector interface; adding a new detection dimension only requires implementing this interface to be inserted into the detection pipeline. The AI ​​decision engine establishes a communication connection with the main scanning process through a subprocess and the JSON-RPC 2.0 protocol. Based on the various security discoveries generated, it performs at least one of the following: intelligent target analysis, vulnerability template suggestion, exploit chain construction, penetration test report generation, and security assistant dialogue.

[0039] S14. Based on the results of parallel correlation analysis, generate the security discovery set and attack path inference results of the target Kubernetes cluster.

[0040] In this embodiment, the various security discoveries generated by each detector are aggregated into a security discovery set (FindingSet). A risk level is assigned to each security discovery, and the source of the original API response value is recorded as evidence tracing information. Further, discrete discoveries in the security discovery set are used as input, and precondition matching and evidence citation association are performed based on preset attack path rules to construct an attack path chain with causal order. The attack path chain is represented by a three-node graph structure, with three nodes including an identity node, a permission node, and a resource node. The identity node and permission node are connected through a relationship, and the permission node and resource node are connected through a reachability relationship, forming a causal chain of "identity → possession → permission → reachability → resource".

[0041] The AI-powered multidimensional security detection method for Kubernetes clusters provided by this invention collects multidimensional state data of the target Kubernetes cluster by initiating an orchestrated read-only API call sequence to the target Kubernetes cluster; constructs a scan snapshot from the multidimensional state data; and, based on the scan snapshot, invokes a multidimensional detector array and an AI decision engine to perform parallel correlation analysis on the multidimensional state data; and generates a security discovery set and attack path inference results for the target Kubernetes cluster based on the results of the parallel correlation analysis. Compared with the shortcomings of existing technologies for Kubernetes cluster security detection, such as severe tool fragmentation, isolated detection dimensions, lack of automatic attack path inference capabilities, lack of cloud identity context awareness, non-standardized report output, and lack of integrated operation interface, this method achieves read-only multidimensional security detection and automatic attack path inference for target Kubernetes clusters, achieving the technical effects of unified detection process, comprehensive security dimension coverage, causal risk correlation, cross-cloud cloud identity awareness, standardized report output, and unified protocol calls.

[0042] Figure 2 This is a schematic diagram of the AI ​​multidimensional security detection software architecture and specific implementation process for Kubernetes clusters provided by this invention. The following is in conjunction with... Figure 2 The technical solution of the present invention will be described in detail below.

[0043] like Figure 2 As shown, this invention proposes a five-layer architecture for a multi-dimensional security detection platform for Kubernetes. The overall architecture, from bottom to top, consists of: an infrastructure layer, a core engine layer, a detector array layer, an interaction processing layer, and a user interface layer. The infrastructure layer is responsible for the underlying protocol interaction with the Kubernetes cluster and cloud provider metadata services; the core engine layer is responsible for scanning snapshot construction, vulnerability verification, attack path deduction, and protocol abstraction; the detector array layer is responsible for six-dimensional parallel security detection; the interaction processing layer is responsible for AI Agent intelligent decision-making and multi-format report generation; and the user interface layer provides a unified operation entry point and result display.

[0044] System entry and initialization process: In this embodiment, the system entry point is located at cmd / clawsec / main.go. The root command is initialized using the Cobra framework, and all product adapters are automatically registered using Go's init() mechanism. The initialization process includes the following steps: First, the structured logging system is initialized, supporting level control, color output, and JSON format; then, the YAML configuration file ( / .clawsec / config.yaml) is loaded; next, the .env environment variable file is loaded; and then... Environment variable overriding (highest priority); verification of the `--authorized` security authorization flag; finally, setting the output format and output file. Configuration loading priority is: environment variables > .env files > YAML configuration files > system defaults. This mechanism automatically maps configurations to Config structure fields via reflection.

[0045] Port scanning engine implementation: In this embodiment, the scanning engine (pkg / engine / scanner / ) implements the core port scanning function. The port parsing module (ports.go) has built-in Top 100 and Top 1000 commonly used port lists (based on Nmap statistics), supports flexible port representations (such as 80,443, 1-65535, top100, top1000, all), and supports automatic deduplication and range expansion. The port range is generated as a continuous integer sequence using the makeRange() function, and the dedupPorts() function uses a hash table for deduplication.

[0046] Vulnerability verification engine implementation: The vulnerability verification engine is a key innovation of this invention, achieving a complete Nuclei YAML template compatibility solution.

[0047] The template parsing module (parser.go + template.go) uses gopkg.in / yaml.v3 for YAML deserialization. A custom StringOrSlice type supports automatic compatibility parsing of single strings and string arrays in YAML. The template structure includes ID, Info (name, author, severity level, description, reference, tag, CVSS category), Variables (variable definitions), HTTP / TCP / DNS / SSL request blocks, and Workflow (workflow steps), supporting automatic default of MatchersCondition to OR (or logical OR).

[0048] The HTTP request execution module (http.go) is a custom HTTPClient wrapper around the standard Go net / http library, supporting custom headers, bodies, and request methods. Connection pool optimization parameters include: MaxIdleConns: 100, MaxIdleConnsPerHost: 10, and IdleConnTimeout: 30s. URL construction supports both relative and absolute paths, automatically resolving the baseURL. The response body has a maximum read limit of 10MB to prevent memory overflow.

[0049] The matcher engine (matcher.go) implements six matching types: word (string matching, searching for a specified string in the response body / header / raw data), regex (regular expression matching, using the Go regexp package), status (HTTP status code matching), binary (binary matching, matching hexadecimal encoded binary data), dsl (expression matching, evaluating DSL expressions, supporting Boolean logic operations), and size (response size matching, matching the size of the response body in bytes).

[0050] The DSL expression engine (dsl.go) implements a recursive expression evaluation engine, supporting five core expression types: contains(data, "string") (contains checking), status_code == 200 (status code comparison, supporting ==, !=, >=, <=, >, <), regex(data, "pattern") (regular expression matching), size >= 100 or size < 1024 (response size comparison), and expr1 && expr2 / expr1 || expr2 (logical AND / OR combination). It supports substitution of response variables such as body, headers, raw, size, and duration.

[0051] In the variable system (variables.go), template variables use the `{{var_name}}` syntax and support recursive expansion; DSL functions use the `{{function(args)}}` syntax. It includes over 25 built-in DSL functions, covering cryptographic hashing (md5 / sha1 / sha256), encoding / decoding (base64 / hex / url), string manipulation (trim / reverse / replace / concat / contains), random generation (rand_base / rand_text / rand_int / rand_ip), HTML escaping, and more. Template context variables are automatically initialized: `BaseURL`, `Hostname`, `Host`, `Port`, `Path`, `Scheme`, and pre-generated random values. The variable merging mechanism `MergeVariables()` supports the combination of variables from multiple sources.

[0052] The data extractor implements five extractors: regex (regular expression extraction, extracting matching text fragments from the response), json (JSON path extraction, extracting fields from the JSON response via dot paths, such as data.items[0].id), kval (key-value pair extraction, extracting the value of a specified header from the HTTP response header), xpath (XPath extraction, simplified extraction of XML / HTML tag content), and dsl (expression extraction, extracting calculation results via DSL expressions).

[0053] The executor (executor.go) employs a two-tier concurrency model: the outer layer concurrently executes multiple templates, while the inner layer, each template, concurrently scans multiple targets. Each template execution automatically initializes its variable context, executes the HTTP request chain, and matches and extracts the responses. It supports the StopAtFirstMatch (stop when a match is found) optimization strategy.

[0054] Implementation of AI Agent Communication Mechanism: In this embodiment, the AI ​​subsystem (pkg / ai / ) adopts a subprocess plus JSON-RPC 2.0 communication architecture. The Agent startup process is as follows: First, it searches for the AI ​​Brain entry file (supporting multiple paths such as ai-brain / src / main.ts, ai-brain / dist / main.js, ai-brain / dist / main); it selects the execution method according to the file extension (.ts is executed directly using Bun, .exe is executed directly, others are executed as executable files); it creates standard input and output pipes (cmd.StdinPipe() / cmd.StdoutPipe()); it uses bufio.Scanner to read the JSON-RPC response line by line; and it polls and waits for the Agent to be ready using the ping method (maximum wait time 30 seconds).

[0055] In the JSON-RPC 2.0 protocol, the request structure is {"jsonrpc":"2.0","method":"analyze","params":{...},"id":"req_123"}, and the response structure is {"jsonrpc":"2.0","result":{...},"error":null,"id":"req_123"}. It supports five remote access methods (RPC Methods): analyze (intelligent target analysis), suggest (vulnerability template suggestion), chain (exploitation chain construction), report (penetration test report generation), and chat (AI security assistant dialogue).

[0056] Implementation of the K8s API protocol call layer: The system encapsulates a unified Kubernetes API protocol call client using the Go standard net / http library, supporting both BearerToken authentication and anonymous access modes. The client implements connection pool optimization (MaxIdleConns: 100, MaxIdleConnsPerHost: 10, IdleConnTimeout: 30s) to ensure protocol call efficiency in large-scale concurrent scanning scenarios orchestrated by the AI ​​Agent. After port discovery, the port scanning engine automatically maps open ports to the corresponding Kubernetes component protocols (e.g., 6443 → API Server, 10250 → Kubelet, 2379 → etcd) and calls the corresponding protocol detection functions for in-depth probing. The vulnerability verification engine's Nuclei YAML template can directly construct HTTP probe requests to Kubernetes API endpoints, and the matcher supports six modes for analyzing API responses: word, regex, status, binary, dsl, and size.

[0057] Multi-channel coordination protocol call: The AI ​​Agent's four RPC methods—analyze, suggest, chain, and report—correspond to different protocol call strategies: analyze calls an HTTP REST channel to perform read-only information collection; suggest recommends vulnerability templates based on existing data; chain orchestrates multi-step protocol calls to build an exploit chain; and report summarizes all protocol call results to generate a standardized report. The JSON-RPC 2.0 communication protocol ensures asynchronous decoupling between the AI ​​subsystem and the scanning engine, preventing the AI ​​Agent's decision loop from blocking data collection at the protocol call layer.

[0058] Implementation of the scan snapshot mechanism: In this embodiment, the ScanSnapshot mechanism collects a complete state snapshot of the target cluster through a single API call sequence (more than 12 Kubernetes REST API endpoints) before starting detection. This snapshot includes version information, node list, Pod list, Secret list, Service list, Endpoint list, NetworkPolicy list, ClusterRoleBinding list, ServiceAccount list, SelfSubjectRulesReview results, node labels, etc., and stores all responses in an immutable memory mapping. All detectors share the same snapshot, avoiding duplicate requests to the API Server and achieving the principle of minimal interference to the target cluster during the detection process.

[0059] The ScanSnapshot Protocol Cache maintains two layers of caching in memory: the original response text and a pre-parsed JSON object. The original text is used for evidence tracing and auditing, while the JSON object is directly queried and analyzed by all subsequent detectors. The vulnerability verification engine's matcher can directly read the response body from the cache for multi-pattern matching such as word, regex, status, and DSL. The system dynamically determines the protocol call path based on the enabled detection modules; for example, when only identity RBAC detection is enabled, calls to irrelevant endpoints such as Secret and NetworkPolicy are automatically skipped. All calls are read-only GET operations, without any writes to the target cluster, ensuring from an architectural perspective that the security assessment process does not introduce additional risks.

[0060] Implementation of a dual-channel heterogeneous protocol call architecture: This invention integrates two heterogeneous Kubernetes cluster interaction protocols—HTTP REST direct connection and kubectl subprocess—on the same platform. The HTTP REST channel is implemented based on the standard Go net / http library, directly constructing requests to interact with components such as the API Server, Kubelet, and etcd. Connection pool optimization (MaxIdleConns: 100, MaxIdleConnsPerHost: 10) ensures high-concurrency scanning efficiency. The kubectl subprocess channel executes kubectl commands via Go's os / exec package, automatically truncating long tokens to the first 20 characters in the logs to prevent credential leakage. The two channels work collaboratively: first, high-throughput read-only detection is performed via the HTTP REST channel, followed by operations requiring advanced kubectl functionality via the kubectl channel. The AI ​​Agent's suggest method automatically recommends which protocol channel to use for the next operation based on the current detection results.

[0061] Multi-cloud identity protocol distribution framework implementation: This invention employs a strategy pattern to design an automatic identification and distribution mechanism for cloud provider protocols. The system automatically determines the target's cloud environment through multi-dimensional protocol feature fingerprints, including node tags (kubernetes.io / cloud-provider), Pod annotations (eks.amazonaws.com / role-arn for IRSA identification, iam.gke.io / gcp-service-account for GKE Workload Identity identification), environment variables (such as GOOGLE_CLOUD_PROJECT), and metadata server (169.254.169.254) reachability. Based on the identified cloud provider type, the system distributes the detection task to the corresponding protocol detection implementation: AWS scenarios detect IAM Role and IRSA annotations; GCP scenarios detect Workload Identity and service accounts; Azure scenarios detect AD Pod Identity and AKS WorkloadIdentity; Alibaba Cloud scenarios detect ACK RRSA annotations and RAM roles; and general scenarios are detected through metadata IP and cloud SDK environment variables.

[0062] etcd v2 / v3 dual-protocol adaptive implementation: This invention achieves automatic compatibility with both v2 and v3 API protocols of the etcd key-value store system. The system selects the appropriate protocol for communication based on the version characteristics of the target etcd: the v2 protocol uses a GET request to access the / v2 / keys / endpoint to retrieve the key tree, while the v3 protocol uses a POST request to access the / v3 / kv / range endpoint and constructs a JSON request body containing a Base64-encoded key range. For operations with the same semantics, such as key lookup and key search, the request parameters and authentication methods are automatically adjusted under different protocol versions, so the caller does not need to be aware of the underlying protocol differences. In the v3 protocol, the Base64-encoded key and range_end parameters are used to perform key space range scanning, which can accurately locate the Kubernetes Secrets data stored in etcd.

[0063] Simplified HTTP FORM adaptation implementation for the kubelet exec WebSocket protocol: This invention simplifies the kubelet's ` / run / {namespace} / {pod} / {container}` WebSocket subprotocol into an HTTP POST FORM request, enabling the system to complete the protocol interaction for command execution within containers using only a standard HTTP client, without relying on any WebSocket library. The system performs unauthenticated probing of the ` / pods` endpoint on kubelet port 10250, quickly assessing the risk of unauthorized access by analyzing the response status code. Utilizing this simplified protocol, the system can automatically construct the ` / run / {ns} / {pod} / {container}` path by traversing the list of all Pods and containers, enabling batch command execution across namespaces, including large-scale SA token enumeration (reading tokens from ` / var / run / secrets / kubernetes.io / serviceaccount / token` in the container) and automatic SSH key injection (traversing and detecting SSH services within containers and automatically writing public keys). The AI ​​Agent's chain method can automatically orchestrate this process, automating what would otherwise be a manual process.

[0064] Attack path rule engine implementation: This invention implements an attack path inference mechanism based on rule matching, automatically linking discrete security discoveries into a graph-structured attack chain with causal logic. Each attack path adopts a three-node graph pattern: identity nodes (e.g., anonymous, workload, serviceaccount), permission nodes (e.g., api-discovery, pods+secrets, host-surface), and resource nodes (e.g., apiserver, secrets, node), connected by "possible" and "reachable" edge relationships, forming a causal chain of "identity → possession → permission → reachability → resource". The inference rules are defined as a four-tuple structure of "triggering condition → attack operation → security impact → remediation suggestion", with eight built-in rules linking discrete risks discovered by a single detector into a complete attack path. The AI ​​Agent's chain method utilizes this graph structure to automatically construct the exploit chain, displaying the complete kill chain path from the attacker's perspective.

[0065] Implementation of the full evidence reporting system: This invention provides standardized report output in HTML, JSON, and Markdown formats, including risk classification cards, layered evidence tracing (original API response value source annotation), attack path text and graph structure visualization, a separate section for cloud identity context, and a "full evidence mode" declaration. The evidence values ​​in the report retain the original credential data (tokens, certificates, keys, cloud credentials, etc.), enabling assessors to directly trace and verify each finding.

[0066] Implementation of multi-format protocol adaptation for report output: This invention renders the same dataset of detection results into three structured report formats: an HTML dark-themed visualization report (displaying severity in the form of risk cards, with attack paths rendered as text graphs), a JSON structured data report (containing metadata, a discovery list, and an array of attack paths, suitable for CI / CD pipelines and automated tool consumption), and a GitHub-style Markdown document (including a risk summary table, detailed discovery records, and attack path text graphs, suitable for Git repository commits and team collaboration). The AI ​​Agent's `report` method automatically outputs the detection results into a report in the specified format using this protocol.

[0067] Compared with existing technologies, the AI ​​multidimensional security detection method and apparatus for Kubernetes clusters provided in this embodiment of the invention have at least the following beneficial effects: First, it achieves a unified detection process. By initiating an orchestrated sequence of read-only API calls to the target Kubernetes cluster and using a unified scan snapshot to call a multi-dimensional detector array and an AI decision engine for parallel correlation analysis, it integrates the fragmented six-stage workflow that relies on five to eight independent tools and requires frequent switching between multiple windows in existing technologies into an automated detection process within a single platform. This significantly improves the efficiency of security assessment and reduces operational complexity.

[0068] Second, it achieves comprehensive security coverage. Through a multi-dimensional detector array consisting of a cluster profile detector, an identity and RBAC detector, a workload security detector, a secret credential exposure detector, a network exposure surface detector, and a cloud identity context detector, the scattered and independent detection dimensions in existing technologies are unified into one engine, realizing comprehensive security situation awareness of Kubernetes clusters and avoiding the fragmentation of security assessment results.

[0069] Third, it achieves the causalization of risk correlation. Through the attack path rule engine, discrete security discoveries are matched with preconditions and correlated with evidence references based on preset rules to construct an attack path chain with causal order, represented by a three-node graph structure. This solves the shortcomings of existing technologies that can only produce isolated vulnerability lists and cannot automatically correlate attack paths, enabling assessors to understand the complete kill chain path from the attacker's perspective.

[0070] Fourth, it achieves cross-cloud cloud identity awareness. Through a multi-cloud identity protocol distribution framework, it automatically identifies cloud provider types based on node tags, Pod annotations, environment variables, and metadata server reachability, and calls the corresponding cloud identity protocol detector for detection. This fills the gap in existing general-purpose Kubernetes security tools for detecting credential leakage risks under multi-cloud federated identity mechanisms such as AWS EKS IRSA, GCP GKE WorkloadIdentity, Azure AKS Workload Identity, and Alibaba Cloud ACK RRSA.

[0071] Fifth, it standardizes report output. The full evidence reporting system renders the same set of test results into structured reports in HTML, JSON, and Markdown formats, solving the problem of inconsistent output formats of existing tools that cannot meet the needs of compliance audits and enterprise-level reporting. It supports risk classification, evidence tracing, attack path visualization, and independent display of cloud identity context.

[0072] Sixth, it achieves unified protocol calls. Through a unified Kubernetes REST API abstraction layer, a dual-channel heterogeneous protocol call architecture, etcd v2 / v3 dual-protocol adaptation, and kubelet exec WebSocket simplified adaptation, it unifies the abstraction and orchestration of various heterogeneous protocol interfaces of Kubernetes, enabling each stage of security assessment to work collaboratively on a unified protocol call layer, and reducing the learning cost for security assessment personnel to master more than ten command-line tools.

[0073] Seventh, it achieves minimal interference in the detection process. Through the scanning snapshot mechanism, a complete state snapshot is collected through a one-time read-only API call when detection starts. All detectors share the same snapshot, avoiding duplicate requests. All calls are read-only GET operations, without any writes to the target cluster. This ensures at the architectural level that the security assessment process does not introduce additional risks and meets the compliance requirements for security assessment in the production environment.

[0074] The AI ​​multidimensional security detection device for Kubernetes clusters provided by this invention will be described below. The AI ​​multidimensional security detection device for Kubernetes clusters described below can be referred to in correspondence with the AI ​​multidimensional security detection method for Kubernetes clusters described above.

[0075] Figure 3 This is a schematic diagram of the structure of the AI ​​multidimensional security detection device for Kubernetes clusters provided by the present invention, specifically including: The acquisition module 301 is used to initiate an orchestrated read-only API call sequence to the target Kubernetes cluster to collect multi-dimensional status data of the target Kubernetes cluster. For detailed explanations, please refer to the relevant descriptions in the above method embodiments; they will not be repeated here.

[0076] The construction module 302 is used to construct a scan snapshot from the multi-dimensional state data. For detailed explanations, please refer to the relevant descriptions in the above method embodiments; they will not be repeated here.

[0077] Analysis module 303 is used to perform parallel correlation analysis on the multi-dimensional state data based on the scan snapshot, invoking a multi-dimensional detector array and an AI decision engine. For detailed explanations, please refer to the relevant descriptions in the above method embodiments; they will not be repeated here.

[0078] The generation module 304 is used to generate a security discovery set and attack path inference results for the target Kubernetes cluster based on the results of parallel correlation analysis. For detailed explanations, please refer to the relevant descriptions in the above method embodiments; they will not be repeated here.

[0079] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4As shown, the electronic device may include a processor 410, a communications interface 420, a memory 430, and a communication bus 440, wherein the processor 410, communications interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute an AI multi-dimensional security detection method for a Kubernetes cluster. This method includes: initiating an orchestrated read-only API call sequence to the target Kubernetes cluster to collect multi-dimensional state data of the target Kubernetes cluster; constructing a scan snapshot from the multi-dimensional state data; based on the scan snapshot, calling a multi-dimensional detector array and an AI decision engine to perform parallel correlation analysis on the multi-dimensional state data; and based on the results of the parallel correlation analysis, generating a security discovery set and attack path deduction results for the target Kubernetes cluster.

[0080] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0081] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the AI ​​multi-dimensional security detection method for Kubernetes clusters provided by the above methods. The method includes: initiating an orchestrated read-only API call sequence to a target Kubernetes cluster to collect multi-dimensional state data of the target Kubernetes cluster; constructing a scan snapshot from the multi-dimensional state data; based on the scan snapshot, calling a multi-dimensional detector array and an AI decision engine to perform parallel correlation analysis on the multi-dimensional state data; and generating a security discovery set and attack path inference results for the target Kubernetes cluster based on the results of the parallel correlation analysis.

[0082] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements an AI multi-dimensional security detection method for Kubernetes clusters provided by the methods described above. The method includes: initiating an orchestrated read-only API call sequence to a target Kubernetes cluster to collect multi-dimensional state data of the target Kubernetes cluster; constructing a scan snapshot from the multi-dimensional state data; based on the scan snapshot, invoking a multi-dimensional detector array and an AI decision engine to perform parallel correlation analysis on the multi-dimensional state data; and based on the results of the parallel correlation analysis, generating a security discovery set and attack path inference results for the target Kubernetes cluster.

[0083] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0084] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A multi-dimensional security detection method for AI in Kubernetes clusters, characterized in that, include: Initiate an orchestrated sequence of read-only API calls to the target Kubernetes cluster and collect multi-dimensional state data of the target Kubernetes cluster; The multi-dimensional state data is used to construct a scan snapshot; Based on the scan snapshot, a multi-dimensional detector array and an AI decision engine are invoked to perform parallel correlation analysis on the multi-dimensional state data; Based on the results of parallel correlation analysis, a security discovery set and attack path inference results for the target Kubernetes cluster are generated.

2. The method according to claim 1, characterized in that, The orchestrated read-only API call sequence initiated to the target Kubernetes cluster, and the collection of multi-dimensional state data of the target Kubernetes cluster, include: The orchestrated read-only API call sequence is initiated through a unified Kubernetes REST API abstraction layer. This unified Kubernetes REST API abstraction layer supports anonymous request mode and Bearer token authentication mode within the same framework. The caller completes the protocol switching from unauthorized to authorized detection through a single parameter switch, in order to collect the API Server authentication and resource enumeration status data of the target Kubernetes cluster. The orchestrated read-only API call sequence is controlled to contain only GET requests to the Kubernetes REST API endpoint, and no write operations are performed on the target Kubernetes cluster, so as to collect the full multi-dimensional state data of the target Kubernetes cluster in a read-only manner; The orchestrated read-only API call sequence is executed through a dual-channel heterogeneous protocol call architecture, which includes a first channel based on HTTP REST direct connection and a second channel based on kubectl subprocess call. The first channel performs read-only throughput detection above a threshold, and the second channel performs operations requiring advanced kubectl functions to collect kubectl-accessible multi-dimensional state data of the target Kubernetes cluster.

3. The method according to claim 1, characterized in that, The process of initiating an orchestrated read-only API call sequence to the target Kubernetes cluster and collecting multi-dimensional state data of the target Kubernetes cluster also includes: The endpoints included in the API call sequence are dynamically determined based on the detection dimensions to be enabled. When only some detection dimensions are enabled, API endpoint calls unrelated to the enabled detection dimensions are automatically skipped in order to collect multi-dimensional status data related to the enabled detection dimensions.

4. The method according to claim 1, characterized in that, The process of initiating an orchestrated read-only API call sequence to the target Kubernetes cluster and collecting multi-dimensional state data of the target Kubernetes cluster also includes: The API protocol version of the etcd key-value storage system of the target Kubernetes cluster is automatically identified. When it is identified as version v2, a GET request is used to access the / v2 / keys / endpoint. When it is identified as version v3, a POST request is used to access the / v3 / kv / range endpoint and a JSON request body containing a Base64 encoded key range is constructed to collect the etcd key-value status data of the target Kubernetes cluster. The kubelet's WebSocket subprotocol is simplified to an HTTP POST FORM request to perform unauthenticated probing of the / pods endpoint on kubelet port 10250. The risk of unauthorized access to kubelet is assessed based on the response status code in order to collect kubelet container status data of the target Kubernetes cluster.

5. The method according to claim 1, characterized in that, The process of initiating an orchestrated read-only API call sequence to the target Kubernetes cluster and collecting multi-dimensional state data of the target Kubernetes cluster also includes: The system simultaneously maintains a raw response text cache layer and a pre-parsed JSON object cache layer in memory. The raw response text cache layer is used for evidence tracing and auditing, while the pre-parsed JSON object cache layer is available for direct querying in subsequent analysis. This cache method is used to collect and store multi-dimensional state data of the target Kubernetes cluster.

6. The method according to claim 1, characterized in that, The step of constructing a scan snapshot from the multi-dimensional state data includes: The multi-dimensional state data is stored in an immutable memory mapping; The immutable memory mapping is used as a scan snapshot for all detectors to share and read.

7. The method according to claim 6, characterized in that, The step of invoking a multi-dimensional detector array and an AI decision engine to perform parallel correlation analysis on the multi-dimensional state data based on the scan snapshot includes: The cluster profile detector is invoked to generate cluster topology security findings based on the cluster version information, node list, and node tag information in the scan snapshot. Invoke the identity and RBAC detector, and generate permission configuration security discovery based on the ClusterRoleBinding list, ServiceAccount list and SelfSubjectRulesReview results in the scan snapshot; The workload security detector is invoked to parse the Pod security context based on the Pod list in the scan snapshot and generate workload security discoveries. The Secret credential exposure detector is invoked to detect the Secret access status based on the Secret list in the scan snapshot and generate a credential exposure security discovery. The network exposure surface detector is invoked, and based on the Service list, Endpoint list, and NetworkPolicy list in the scan snapshot, network reachability is analyzed to generate network exposure security findings. The cloud identity context detector is invoked to identify the cloud provider type based on at least one of the node tag information, Pod annotations, environment variables and metadata server reachability in the scan snapshot. Based on the identified cloud provider type, the corresponding cloud identity protocol detector is invoked to detect the cloud identity context and generate cloud identity security discovery. The AI ​​decision engine is invoked to establish a communication connection with the main scanning process through a subprocess and the JSON-RPC 2.0 protocol. Based on the various security discoveries generated, at least one of the following is performed: intelligent target analysis, vulnerability template suggestion, exploit chain construction, penetration test report generation, and security assistant dialogue.

8. The method according to claim 7, characterized in that, The generation of security discovery sets and attack path inference results for the target Kubernetes cluster based on parallel correlation analysis results includes: The various security discoveries generated by the cluster profiling detector, identity and RBAC detector, workload security detector, secret credential exposure detector, network exposure surface detector, and cloud identity context detector are aggregated into the security discovery set. Each security discovery in the security discovery set is assigned a risk level, and the source of the original API response value of the security discovery is recorded as evidence tracing information; Using discrete discoveries from the security discovery set as input, and performing precondition matching and evidence citation association based on preset attack path rules, an attack path chain with causal order is constructed. The attack path chain is represented as a three-node graph structure, wherein the three nodes include an identity node, an authorization node, and a resource node. The identity node and the authorization node are connected by a relation, and the authorization node and the resource node are connected by a reachability relation.

9. An AI multidimensional security detection device for Kubernetes clusters, characterized in that, include: The acquisition module is used to initiate an orchestrated read-only API call sequence to the target Kubernetes cluster and acquire multi-dimensional status data of the target Kubernetes cluster. A construction module is used to construct the multi-dimensional state data into a scan snapshot; The analysis module is used to perform parallel correlation analysis on the multi-dimensional state data by calling a multi-dimensional detector array and an AI decision engine based on the scan snapshot; The generation module is used to generate a security discovery set and attack path inference results for the target Kubernetes cluster based on the results of parallel correlation analysis.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the AI ​​multidimensional security detection method for Kubernetes clusters as described in any one of claims 1 to 8.

11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the AI ​​multidimensional security detection method for Kubernetes clusters as described in any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the AI ​​multidimensional security detection method for Kubernetes clusters as described in any one of claims 1 to 8.