Three-Tiered Ratings
Issues identified by code quality testing are assigned to one of three categories.
-
Critical - Issues that cause an immediate failure of the pipeline.
-
Important - Issues that cause the pipeline to enter a paused state. A deployment manager, project manager, or business lead can either override the issues, allowing the pipeline to proceed. Alternatively, they can accept the issues, causing the pipeline to stop with a failure.
-
Info - Issues that are provided purely for informational purposes and have no impact on the pipeline execution
Ratings
The results of this step are delivered as Ratings.
The following table summarizes the ratings and failure thresholds for each of the critical, important, and information categories.
| Name | Definition | Category | Failure Threshold |
|---|---|---|---|
| Security Rating | A = No vulnerabilities B = At least 1 minor vulnerability C = At least 1 major vulnerability D = At least 1 critical vulnerability E = At least 1 blocker vulnerability | Critical | < B |
| Reliability Rating | A = No bugs B = At least 1 minor bug C = At least 1 major bug D = At least 1 critical bug E = At least 1 blocker bug | Critical | < D |
| Maintainability Rating |
Defined by the outstanding remediation cost for code smells as a percentage of the time that has already gone into the application
| Important | < A |
| Coverage |
Defined by a mix of unit test line coverage and condition coverage using the formula:
| Important | < 50% |
| Skipped Unit Tests | Number of skipped unit tests | Info | > 1 |
| Open Issues | Overall issue types - Vulnerabilities, Bugs, and Code Smells | Info | > 0 |
| Duplicated Lines |
Defined as the number of lines involved in duplicated blocks. A block of code is considered duplicated under the following conditions.
Java Projects:
Differences in indentation and in string literals are ignored when detecting duplicates. | Info | > 1% |
| Cloud Service Compatibility | Number of identified cloud service compatibility issues | Info | > 0 |
Dealing with False Positives
The quality scanning process is not error-free and sometimes identifies issues that are not actual defects. This state is called a false positive.
In these cases, the source code can be annotated with the standard Java @SuppressWarnings annotation specifying the rule ID as the annotation attribute. For example, one common false positive is that the SonarQube rule to detect hardcoded passwords can be overly restrictive about how a hardcoded password is identified.
The following code is fairly common in an AEM project, which has code to connect to some external service.
SonarQube raises a blocker vulnerability. But after reviewing the code, you recognize that this issue is not a vulnerability and can annotate the code with the appropriate rule ID.
If the code was the following:
Then the correct solution is to remove the hardcoded password.
@SuppressWarnings annotation specific, you can also annotate at the class level.Content Package Scanning Optimization
As part of the quality analysis process, Cloud Manager performs analysis of the content packages produced by the Maven build. Cloud Manager offers optimizations to accelerate this process, which is effective when certain packaging constraints are observed. The most significant optimization targets projects producing a single “all” package. This package contains multiple content packages from the build that are marked as skipped. When Cloud Manager detects this scenario, rather than unpack the “all” package, the individual content packages are scanned directly and sorted based on dependencies. For example, consider the following build output.
all/myco-all-1.0.0-SNAPSHOT.zip(content-package)ui.apps/myco-ui.apps-1.0.0-SNAPSHOT.zip(skipped-content-package)ui.content/myco-ui.content-1.0.0-SNAPSHOT.zip(skipped-content-package)
If the only items inside myco-all-1.0.0-SNAPSHOT.zip are the two skipped content packages, then the two embedded packages are scanned in lieu of the “all” content package.
For projects that produce dozens of embedded packages, this optimization has been shown to save more than 10 minutes per pipeline execution.
A special case can occur when the “all” content package contains a combination of skipped content packages and OSGi bundles. For example, if myco-all-1.0.0-SNAPSHOT.zip contained the two mentioned embedded packages and OSGi bundles, a new, minimal content package is constructed with only the OSGi bundles. This package is always named cloudmanager-synthetic-jar-package and the contained bundles are placed in /apps/cloudmanager-synthetic-installer/install.
- This optimization does not impact the packages which are deployed to AEM.
- The matching between embedded content packages and skipped content packages relies on file names. This optimization cannot occur if multiple skipped packages share the same file name or if the file name changes during embedding.
Was this content helpful?
Announcements
Get hands-on with agentic AI.
Explore how AI agents work together through real examples and hands-on practice. Join your local User Group to design an agent workflow with your peers and leave with a practical framework you can apply to your own work.
Find an event