The application discloses a container
image security detection method and
system based on self-defined features, and belongs to the technical field of container
image security detection, and aims to solve the technical problem of how to conduct targeted security protection on
image security in a multi-element security scene mode. The method comprises the following steps: constructing an image feature object and storing the image feature object in a
database in the form of a registry, wherein the image feature object is a set of self-defined rules, and the rules are used to define detection behaviors for security evaluation of image features; for an image
package pulled from an image warehouse, a
scanner is used to analyze the
metadata of the image to obtain an analysis result, and the analysis result is stored in a feature
database; and the analysis result is evaluated based on the self-defined rules in the image feature object, and a
security alarm is generated if the analysis result matches unsafe behaviors defined in the rules.