Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

CI/CD Image Security Scan Overview

Updated on 2025-01-08 GMT+08:00

The CI/CD image security scan function of HSS can be integrated into the CI/CD build pipeline of the Jenkins Pipeline project. It can implement security scan in the image build phase; identify system vulnerabilities, application vulnerabilities, abnormal system configurations, malicious files, and sensitive files in images; and shift security left to the DevOps phase, helping you eliminate security risks as early as possible and preventing unsafe images from being deployed in the production environment.

What Is CI/CD?

CI/CD is short for continuous integration and continuous delivery/deployment.

  • Continuous Integration (CI) automatically and continuously integrates code into shared source code.
  • CD consists of continuous delivery and continuous deployment. After continuous integration, continuous delivery verifies the code through automated building and testing to ensure that container images can be delivered at any time. Continuous deployment automatically updates and releases the images to the production environment.

What Is Jenkins Pipeline?

Jenkins is an open source CI tool that provides user-friendly GUIs. It originates from Hudson and is used to automate all sorts of tasks related to building, testing, and delivering or deploying software.

Jenkins is written in Java and can run in popular servlet containers such as Tomcat, or run independently. It is usually used together with the version control tools (or SCM tools) and build tools. Jenkins supports project building in diverse languages and is fully compatible with multiple third-party build tools, such as Maven, Ant, and Gradle. Jenkins is seamlessly integrated with common versioning tools, such as SVN and GIT, and can directly connect to source code hosting websites, such as GitHub.

Pipeline is a working mode that implements CI/CD in Jenkins.

CI/CD Image Security Scan Principles

To use the CI/CD image security scan function of HSS, you do not need to synchronize your image assets to HSS. You simply need to add two commands to the Jenkins pipeline (the command for pulling the image of the HSS image security scan tool and the command for starting the tool). When you use Jenkins Pipeline to build a project, an image security scan task is triggered to scan for image security risks in the project and display the scan results on the HSS console. You can handle security risks in images in a timely manner based on the scan results.

Figure 1 shows the image security scan phase in the Jenkins pipeline.

Figure 1 CI/CD image security scan

CI/CD Image Security Scan Items

Table 1 describes the CI/CD image security scan items checked by HSS.

Table 1 Image scan items

Item

Description

Vulnerabilities

Detects system and application vulnerabilities in images.

  • System vulnerability scan supports the following OSs:
    • EulerOS 2.2, 2.3, 2.5, 2.8, 2.9, 2.10, 2.11, 2.12 (64-bit)
    • CentOS 7.4, 7.5, 7.6, 7.7, 7.8 and 7.9 (64-bit)
    • Ubuntu 16.04, 18.04, 20.04, 22.04 (64-bit)
    • Debian 9, 10, and 11 (64-bit)
    • Kylin V10 SP1 and SP2 (64-bit)
    • HCE 1.1 and 2.0 (64-bit)
    • SUSE 12 SP5, 15 SP1, and 15 SP2 (64-bit)
    • UnionTech OS V20 server E and V20 server D (64-bit)
  • Application vulnerability scanning supports the following applications: fastjson, log4j-core, log4j-api, spring-core, shiro-core, struts-core, tomcat-embed-el, tomcat-jdbc, tomcat-embed-websocket, tomcat-juli, tomcat-annotations-ap, tomcat-embed-core, spring-jdbc, druid, commons-lang, commons-logging, commons-configuration, commons-collections, spring-cloud-netflix-archaius, mysql-connector-java, tensorflow, bootstrap, json, spring-beans, spring-context, spring-aop and spring-webmvc.

Malicious Files

Detects malicious files in images.

Software Information

Collects software information in an image.

File Information

Collects file information in an image.

Unsafe Settings

  • Configuration check:
    • Checks the images configurations of CentOS 7, Debian 10, EulerOS, and Ubuntu16.
    • Checks SSH configurations.
  • Weak password check: detects weak passwords of Linux (SSH) accounts.
  • Password complexity check: detects insecure password complexity policies in Linux.

Sensitive Information

Detects files that contain sensitive information in images.

  • The paths that are not checked by default are as follows:
    • /usr/*
    • /lib/*
    • /lib32/*
    • /bin/*
    • /sbin/*
    • /var/lib/*
    • /var/log/*
    • AnyPath/node_modules/AnyPath/AnyName.md
    • AnyPath/node_modules/AnyPath/test/AnyPath
    • */service/iam/examples_test.go
    • AnyPath/grafana/public/build/AnyName.js
    NOTE:
    • AnyPath: indicates that the current path is a customized value and can be any path in the system.
    • AnyName: indicates that the file name in the current path is a customized value, which can be any name ended with .md or .js in the system.
    • On the View Report > Sensitive Information tab, click Configure Sensitive File Path to set the Linux paths of the file that do not need to be checked. A maximum of 20 paths can be added.
  • No checks are performed in the following scenarios:
    • The file size is greater than 20 MB.
    • The file type can be binary, common process, or auto generation.

Software Compliance

Detects software and tools that are not allowed to be used.

Base Images

Detects service images that are not created using base images.

Scenario

  • Scanning a local image

    After an image is built, a security scan is performed on it. If the image has security risks, the pipeline can be blocked, so that it will not be pushed to the production image repository.

  • Scanning a remote image repository

    A remote image repository is a remote test repository pushed after an image is built. A security scan is performed on the image in the remote test repository. If no risks are found, the image can be pushed to the production image repository. If risks are found, the pipeline can be blocked.

Constraints and Limitations

  • Only the HSS container edition supports CI/CD image security scans.
  • The CI/CD image scan function applies only to the Jenkins Pipeline mode.
    Jenkins configuration restrictions are as follows:
    • Hardware restrictions:
      • Jenkins compilation and building server: Linux server, x86 or Arm 64-bit
      • CPU: 1 or more cores
      • Memory: 2 GB or more
      • Disk space: 60 GB or higher
    • Technical restrictions:
      • Jenkins version: Jenkins 2.x
      • JDK version: JDK 17 or later
      • Docker version: Docker 18.09 or later
  • To perform a remote image scan, the image repository must support interaction through Docker Registry HTTP API v2.

CI/CD Image Security Scan Process

Figure 2 Usage process
Table 2 Usage process

Operation

Description

Accessing CI/CD

Generate an image security scan command for Pipeline based on image information and add the command to the Jenkins pipeline.

Managing CI/CD Images

View the CI/CD image security scan results. Check and eliminate security risks in a timely manner to prevent insecure images from being deployed in the production environment.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback