Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

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
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

Configuring a Custom Rule Set

Updated on 2024-11-29 GMT+08:00

CodeArts Check supports custom rule sets. Each rule set must contain at least one rule.

A rule set can be configured with only one language.

NOTE:

Purchase the code security check enhancement package as required before using CodeArts Check. This package identifies code security risks and vulnerabilities more comprehensively for Java, C++, Go, and Python.

Video Tutorial

This video demonstrates how to use a custom rule set to check code from CodeArts Repo.

Customizing a Rule Set

  1. Access CodeArts Check through a project.
  2. Click the Rule Sets tab.
  3. Click Create Rule Set. In the displayed dialog box, enter a rule set name and description, and select a language.

    You can also copy an existing rule set by selecting it from the Replicated in drop-down list.

  4. Click OK.
  5. Select rule names, set Issue Level and click Save in the upper right corner.

    Customize rules if needed.

    • Click the rule set name to go to the details page.
    • Alternatively, on the details page, click Export to export the enabled rules in the rule set to the local PC and view the rule details.
    • On the details page, click Modify Basic Info to modify the rule set name or description.
      NOTE:
      • The Language cannot be modified.
      • Preset rule sets cannot be modified.
      • Custom rule sets can be deleted only by the one who created them.
    • Click in the row where the rule set is located and choose Delete Set.
      NOTE:
      • Custom rule sets can be deleted only by the one who created them.
      • System rule sets and custom rule sets in use cannot be deleted.
      • To delete a rule set being used by a code check task, you can either delete the task or assign another rule set to the task.

Using a Custom Rule Set

  1. Go to the task details page, and choose Settings > Rule Sets.
  2. If any changes are made to the code repository after you create a code check task, click in the Languages Included row to re-obtain the target language, and enable the switch of language.
  3. Click to select the created custom rule set.

Customizing a Rule

  • Custom rules: max. 10.
  • Lines of code scanned by a rule set with only custom rules: max. 100,000. This applies when the rule set contains only custom rules.
  • Duration per code check task with 100,000 LOC scanned by a rule set with only custom rules: max. 1.5 hours. This applies when the rule set contains only custom rules.

To scan more code or customize more rules, contact technical support.

  1. Click the Rules tab.
  2. Click Create Rule. Set parameters by referring to Table 1.

    Table 1 Rule parameters

    Parameter

    Description

    Mandatory

    Rule Name

    Custom rule name. It can be customized.

    Enter 1 to 128 characters: letters, digits, underscores (_), hyphens (-), and periods (.).

    Yes

    Tool Rule Name

    Rule source code file (by default).

    Yes

    Tool

    Check tool used by a custom rule. Currently, only SecBrella is supported.

    Yes

    Language

    Language checked by a custom rule. Currently, only Java is supported.

    Yes

    Source Code

    Rule source code file.

    Create a .kirin file, create a domain-specific language (DSL) for rules, run the local plug-in to generate a SecH_Rule name.json file in the OutputReport directory, and upload the .json file.

    Yes

    Severity

    Severity of a code issue detected by a rule. The value can be Critical, Major, Minor, or Suggestion.

    Yes

    Tag

    Rule tag for different scenarios.

    Use commas (,) to separate multiple tags.

    No

    Description

    Rule description. The content can contain code in Markdown. Max. 10,000 characters.

    Yes

    Compliant Example

    Compliant code example. The content contains code in Markdown. Max. 10,000 characters.

    No

    Noncompliant Example

    Noncompliant code example. The content contains code in Markdown. Max. 10,000 characters.

    No

    Fix Suggestions

    Issue fixing suggestions. The content can contain code in Markdown. Max. 10,000 characters.

    No

  3. Click Create Rule.

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback