In the first section the sample macro shows quality profile name, enabled rules by rule type, with links to the rules.

In the second section the sample macro shows a breakdown with all enabled rules of the Quality Profile, with severity, rule name , language, rule type and tags.


SonarQube sample

Macro Perfil de Calidad
Macro Perfil de Calidad
Esta sección se focaliza en las reglas de un perfil de calidad

Nombre del perfil de calidad: excentia-css-profile

Reglas Activas Inactivas

A-BUG

Bugs
15 1

B-VULNERABILITY

Vulnerabilidades
0 0

C-CODE_SMELL

Code Smells
9 1

D-SECURITY_HOTSPOT

Security Hotspots
0 0
Total 24 2
Severidad Regla Lenguaje Tipo Etiquetas

D-MINOR

Multi-line comments should not be empty CSS

C-CODE_SMELL

C-MAJOR

Selectors should not be duplicated CSS

C-CODE_SMELL

C-MAJOR

Font declarations should contain at least one generic font family CSS

A-BUG

C-MAJOR

Sections of code should not be commented out CSS

C-CODE_SMELL

unused

D-MINOR

Duplicate imports should be removed CSS

C-CODE_SMELL

unused

A-BLOCKER

Single line comment syntax should not be used CSS

A-BUG

C-MAJOR

"at-rules" should be valid CSS

A-BUG

C-MAJOR

CSS files should not be empty CSS

C-CODE_SMELL

C-MAJOR

Media features should be valid CSS

A-BUG

C-MAJOR

Duplicated font names should be removed CSS

C-CODE_SMELL

A-BLOCKER

Color definitions should be valid CSS

A-BUG

D-MINOR

Extra semicolons should be removed CSS

C-CODE_SMELL

reliability,unused

C-MAJOR

Pseudo-element selectors should be valid CSS

A-BUG

C-MAJOR

"!important" should not be used on "keyframes" CSS

A-BUG

A-BLOCKER

CSS properties should be valid CSS

A-BUG

B-CRITICAL

Shorthand properties that override related longhand properties should be avoided CSS

A-BUG

C-MAJOR

Properties should not be duplicated CSS

A-BUG

A-BLOCKER

"calc" operands should be correctly spaced CSS

A-BUG

A-BLOCKER

Units should be valid CSS

A-BUG

C-MAJOR

Strings should not contain new lines CSS

C-CODE_SMELL

C-MAJOR

Pseudo-class selectors should be valid CSS

A-BUG

C-MAJOR

Empty blocks should be removed CSS

C-CODE_SMELL

B-CRITICAL

Selectors should be known CSS

A-BUG

B-CRITICAL

"linear-gradient" directions should be valid CSS

A-BUG


SonarCloud sample

Macro Perfil de Calidad
Macro Perfil de Calidad
Esta sección se focaliza en las reglas de un perfil de calidad

Nombre del perfil de calidad: Sonar way

Organización: simgrid

Lenguaje: java

Reglas Activas Inactivas

A-BUG

Bugs
159 13

B-VULNERABILITY

Vulnerabilidades
52 4

C-CODE_SMELL

Code Smells
292 141

D-SECURITY_HOTSPOT

Security Hotspots
36 2
Total 539 160
Severidad Regla Lenguaje Tipo Etiquetas

C-MAJOR

".equals()" should not be used to test the values of "Atomic" classes Java

A-BUG

multi-threading

D-MINOR

Regular expression quantifiers and character classes should be used concisely Java

C-CODE_SMELL

regex

C-MAJOR

Nullable injected fields and parameters should provide a default value Java

A-BUG

spring

D-MINOR

Use record pattern instead of explicit field access Java

C-CODE_SMELL

java21

C-MAJOR

Virtual threads should not run tasks that include synchronized code Java

A-BUG

java21,multi-threading

C-MAJOR

"Math.clamp" should be used with correct ranges Java

A-BUG

java21

C-MAJOR

"String.indexOf" should be used with correct ranges Java

A-BUG

java21

C-MAJOR

Formatting SQL queries is security-sensitive Java

D-SECURITY_HOTSPOT

bad-practice,cert,cwe,hibernate,spring,sql

B-CRITICAL

Secure random number generators should not output predictable values Java

B-VULNERABILITY

cert,cwe,pitfall

B-CRITICAL

Cipher Block Chaining IVs should be unpredictable Java

B-VULNERABILITY

cwe

B-CRITICAL

The "Object.finalize()" method should not be overridden Java

C-CODE_SMELL

cert,unpredictable

D-MINOR

Loggers should be named for their enclosing classes Java

C-CODE_SMELL

confusing,logging

D-MINOR

Unused local variables should be removed Java

C-CODE_SMELL

unused

C-MAJOR

Only static class initializers should be used Java

C-CODE_SMELL

pitfall

C-MAJOR

Reverse iteration should utilize reversed view Java

C-CODE_SMELL

java21

C-MAJOR

Reverse view should be used instead of reverse copy in read-only cases Java

C-CODE_SMELL

java21

C-MAJOR

Unused "private" fields should be removed Java

C-CODE_SMELL

unused

B-CRITICAL

Encryption algorithms should be used with secure mode and padding scheme Java

B-VULNERABILITY

cwe,privacy

C-MAJOR

Format strings should be used correctly Java

C-CODE_SMELL

cert,confusing

B-CRITICAL

Cryptographic keys should be robust Java

B-VULNERABILITY

cwe,privacy,rules

C-MAJOR

Exceptions should be either logged or rethrown but not both Java

C-CODE_SMELL

error-handling,logging

C-MAJOR

"setDaemon", "setPriority" and "getThreadGroup" should not be invoked on virtual threads Java

A-BUG

java21

C-MAJOR

Constant parameters in a "PreparedStatement" should not be set more than once Java

C-CODE_SMELL

sql,sustainability

C-MAJOR

SQL queries should retrieve only necessary fields Java

C-CODE_SMELL

sql,sustainability

C-MAJOR

Use batch Processing in JDBC Java

C-CODE_SMELL

sql,sustainability

C-MAJOR

Use when instead of a single if inside a pattern match body Java

C-CODE_SMELL

java21

B-CRITICAL

Fields in a "Serializable" class should either be transient or serializable Java

C-CODE_SMELL

cwe,serialization

C-MAJOR

XML signatures should be validated securely Java

B-VULNERABILITY

symbolic-execution

C-MAJOR

All branches in a conditional structure should not have exactly the same implementation Java

A-BUG

B-CRITICAL

Passwords should not be stored in plaintext or with a fast hashing algorithm Java

B-VULNERABILITY

cwe,spring

D-MINOR

Local variable and method parameter names should comply with a naming convention Java

C-CODE_SMELL

convention

C-MAJOR

Proper Sensor Resource Management Java

C-CODE_SMELL

android,leak,sustainability

C-MAJOR

Use built-in "Math.clamp" methods Java

C-CODE_SMELL

java21

C-MAJOR

Use switch instead of if-else chain to compare a variable against multiple cases Java

C-CODE_SMELL

java21

C-MAJOR

Exception types should not be tested using "instanceof" in catch blocks Java

C-CODE_SMELL

cert,clumsy,error-handling

C-MAJOR

Virtual threads should be used for tasks that include heavy blocking operations Java

A-BUG

java21,multi-threading

B-CRITICAL

String literals should not be duplicated Java

C-CODE_SMELL

design

B-CRITICAL

Password hashing functions should use an unpredictable salt Java

B-VULNERABILITY

cwe

C-MAJOR

Equals method should be overridden in records containing array fields Java

A-BUG

java16

A-BLOCKER

Endpoints should not be vulnerable to reflected cross-site scripting (XSS) attacks Java

B-VULNERABILITY

cwe

C-MAJOR

"toString()" and "clone()" methods should not return null Java

A-BUG

cert,cwe

C-MAJOR

Boolean expressions should not be gratuitous Java

C-CODE_SMELL

cwe,redundant,suspicious,symbolic-execution

E-INFO

Track uses of "TODO" tags Java

C-CODE_SMELL

cwe

C-MAJOR

Similar tests should be grouped in a single Parameterized test Java

C-CODE_SMELL

bad-practice,clumsy,tests

C-MAJOR

Track uses of "FIXME" tags Java

C-CODE_SMELL

cwe

B-CRITICAL

Locks should be released on all paths Java

A-BUG

cwe,multi-threading,symbolic-execution

C-MAJOR

Tests should be stable Java

C-CODE_SMELL

design,tests,unpredictable

B-CRITICAL

Using slow regular expressions is security-sensitive Java

D-SECURITY_HOTSPOT

cwe,regex

C-MAJOR

Conditionally executed code should be reachable Java

A-BUG

cert,cwe,pitfall,suspicious,symbolic-execution,unused

C-MAJOR

"@Deprecated" code marked for removal should never be used Java

C-CODE_SMELL

cert,cwe,obsolete

A-BLOCKER

A secure password should be used when connecting to a database Java

B-VULNERABILITY

cwe

B-CRITICAL

Jump statements should not occur in "finally" blocks Java

A-BUG

cert,cwe,error-handling

B-CRITICAL

"Random" objects should be reused Java

A-BUG

C-MAJOR

"@Bean" methods for Singleton should not be invoked in "@Configuration" when proxyBeanMethods is false Java

A-BUG

spring

C-MAJOR

Optional value should only be accessed after calling isPresent() Java

A-BUG

cwe,symbolic-execution

C-MAJOR

Blocks should be synchronized on "private final" fields Java

A-BUG

cert,cwe,multi-threading

B-CRITICAL

Cognitive Complexity of methods should not be too high Java

C-CODE_SMELL

brain-overload

B-CRITICAL

Disabling CSRF protections is security-sensitive Java

D-SECURITY_HOTSPOT

cwe,spring

C-MAJOR

Non-serializable objects should not be stored in "javax.servlet.http.HttpSession" instances Java

A-BUG

cwe

C-MAJOR

The "Object.finalize()" method should not be called Java

A-BUG

cert,cwe

C-MAJOR

Multiline blocks should be enclosed in curly braces Java

C-CODE_SMELL

cert,cwe

D-MINOR

Delivering code in production with debug features activated is security-sensitive Java

D-SECURITY_HOTSPOT

cwe,debug,error-handling,spring,user-experience

B-CRITICAL

"null" should not be returned from a "Boolean" method Java

C-CODE_SMELL

cert,cwe,pitfall

B-CRITICAL

Setting JavaBean properties is security-sensitive Java

D-SECURITY_HOTSPOT

cert,cwe

D-MINOR

Boolean literals should not be redundant Java

C-CODE_SMELL

clumsy

C-MAJOR

Assignments should not be made from within sub-expressions Java

C-CODE_SMELL

cert,cwe,suspicious

D-MINOR

Mutable fields should not be "public static" Java

C-CODE_SMELL

cert,cwe,unpredictable

C-MAJOR

Beans in "@Configuration" class should have different names Java

A-BUG

spring

C-MAJOR

"InterruptedException" and "ThreadDeath" should not be ignored Java

A-BUG

cwe,error-handling,multi-threading

B-CRITICAL

"Object.finalize()" should remain protected (versus public) when overriding Java

C-CODE_SMELL

cert,cwe

B-CRITICAL

JWT should be signed and verified with strong cipher algorithms Java

B-VULNERABILITY

cwe,privacy

B-CRITICAL

Cipher algorithms should be robust Java

B-VULNERABILITY

cwe,privacy

D-MINOR

Classes that override "clone" should be "Cloneable" and call "super.clone()" Java

C-CODE_SMELL

cert,convention,cwe

C-MAJOR

Throwable and Error should not be caught Java

C-CODE_SMELL

bad-practice,cert,cwe,error-handling

B-CRITICAL

A new session should be created during user authentication Java

B-VULNERABILITY

cwe,spring

B-CRITICAL

Weak SSL/TLS protocols should not be used Java

B-VULNERABILITY

cwe,privacy

B-CRITICAL

Using unsafe Jackson deserialization configuration is security-sensitive Java

D-SECURITY_HOTSPOT

cwe

B-CRITICAL

Using pseudorandom number generators (PRNGs) is security-sensitive Java

D-SECURITY_HOTSPOT

cwe

C-MAJOR

"Integer.toHexString" should not be used to build hexadecimal strings Java

C-CODE_SMELL

cwe

D-MINOR

Creating cookies without the "HttpOnly" flag is security-sensitive Java

D-SECURITY_HOTSPOT

cwe,privacy

C-MAJOR

Null pointers should not be dereferenced Java

A-BUG

cert,cwe,symbolic-execution

C-MAJOR

Allowing deserialization of LDAP objects is security-sensitive Java

D-SECURITY_HOTSPOT

cwe

C-MAJOR

"@PathVariable" annotation should be present if a path variable is used Java

A-BUG

spring

C-MAJOR

SpEL expression should have a valid syntax Java

A-BUG

spring

B-CRITICAL

Using non-standard cryptographic algorithms is security-sensitive Java

D-SECURITY_HOTSPOT

cwe

B-CRITICAL

"HttpServletRequest.getRequestedSessionId()" should not be used Java

B-VULNERABILITY

cwe

B-CRITICAL

LDAP connections should be authenticated Java

B-VULNERABILITY

cwe

B-CRITICAL

Server hostnames should be verified during SSL/TLS connections Java

B-VULNERABILITY

cwe,privacy,ssl

B-CRITICAL

Using weak hashing algorithms is security-sensitive Java

D-SECURITY_HOTSPOT

cwe

D-MINOR

"@NonNull" values should not be set to null Java

A-BUG

cert,cwe,symbolic-execution

A-BLOCKER

XML parsers should not be vulnerable to XXE attacks Java

B-VULNERABILITY

cwe,symbolic-execution

D-MINOR

"@Deprecated" code should not be used Java

C-CODE_SMELL

cert,cwe,obsolete

C-MAJOR

Classes should not be compared by name Java

A-BUG

cert,cwe

C-MAJOR

Setting loose POSIX file permissions is security-sensitive Java

D-SECURITY_HOTSPOT

cert,cwe

D-MINOR

Allowing both safe and unsafe HTTP methods is security-sensitive Java

D-SECURITY_HOTSPOT

cwe,spring

B-CRITICAL

"HttpSecurity" URL patterns should be correctly ordered Java

B-VULNERABILITY

spring

C-MAJOR

"@RequestMapping" methods should not be "private" Java

C-CODE_SMELL

spring

B-CRITICAL

Zero should not be a possible denominator Java

A-BUG

cert,cwe,denial-of-service,symbolic-execution

D-MINOR

Class variable fields should not have public accessibility Java

C-CODE_SMELL

cwe

C-MAJOR

Strings and Boxed types should be compared using "equals()" Java

A-BUG

cert,cwe

100 of 539 reglas mostradas Mostrar todas

  • Sin etiquetas