Page tree
Skip to end of metadata
Go to start of metadata

Error rendering macro 'redirect'

Invalid URL: "CISQ - CWE - OWASP rules". Please provide a valid URL to redirect to.

This page presents the CISQ/OMG Quality Measurement Rules at unit-level for applications based on C++ technology and Microsoft SQL supported by CAST AIP. C++ and Microsoft SQL is an example of a common technology stack used in many applications. If necessary, CAST can help create overview of CISQ coverage for other combinations of technologies.

OMG CharacteristicsOMG Rule Id and NameLevelsAIP QR IdAIP QR NameDescription of CoverageSource Techno
MaintainabilityASCMM-MNT-01: Control Flow Transfer Control Element outside Switch BlockUnit8032Avoid using a break statement in 'for' loopsOMG rule applied to the case of "break" in "for" loop.C++
MaintainabilityASCMM-MNT-01: Control Flow Transfer Control Element outside Switch BlockUnit8028Avoid missing default in switch statementsOMG rule applied to the case of missing "default" in switch C++
MaintainabilityASCMM-MNT-01: Control Flow Transfer Control Element outside Switch BlockUnit7816Avoid using GOTO statement

The rule will lists all Functions and Procedures using "GOTO" statements in the participating database.

 

SQL
MaintainabilityASCMM-MNT-03: Storable and Member Data Element Initialization with Hard-Coded LiteralsUnit-  C++ / SQL
MaintainabilityASCMM-MNT-05: Loop Value Update within the LoopUnit-  C++ / SQL
MaintainabilityASCMM-MNT-06: Commented Code Element Excessive VolumeUnit7126Avoid Artifacts with high Commented-out Code Lines/Code Lines ratioDirect implementation of the rule.C++ / SQL
MaintainabilityASCMM-MNT-08: Source Element Excessive SizeUnit7842Avoid large Artifacts - too many Lines of CodeDirect implementation of the rule.C++ / SQL
MaintainabilityASCMM-MNT-11: Callable and Method Control Element Excessive Cyclomatic Complexity ValueUnit7766Avoid Artifacts with High Cyclomatic ComplexityDirect implementation of the rule.C++ / SQL
MaintainabilityASCMM-MNT-13: Callable and Method Control Element Excessive Number of Parameters Unit7770Avoid Artifacts with too many parametersDirect implementation of the rule.C++ / SQL
MaintainabilityASCMM-MNT-14: Callable and Method Control Element Excessive Number of Control Elements involving Data Element from Data Manager or File Resource Unit-  C++ / SQL
MaintainabilityASCMM-MNT-15: Public Member ElementUnit7794Avoid Classes with a High Public Data RatioThe Public Data Ratio is directly linked to Public Member Elements.C++
MaintainabilityASCMM-MNT-15: Public Member ElementUnit630Avoid data members that are not privateIn order to gain full control on all the data members/objects of a class, it is necessary to create member functions that will only allow to access/modify the data members/objects.   This is one of the main benefits and principles of Object-Oriented design and coding: Encapsulation. If direct access to the object state is allowed through public members, there is no way for the class to ensure its invariants are respected and it will be less secure. C++
MaintainabilityASCMM-MNT-15: Public Member ElementUnit-  SQL
MaintainabilityASCMM-MNT-16: Method Control Element Usage of Member Element from other Class ElementUnit-  C++
MaintainabilityASCMM-MNT-16: Method Control Element Usage of Member Element from other Class ElementUnitN/A Not applicable in the context of database technologies.SQL
MaintainabilityASCMM-MNT-19: Named Callable and Method Control Element Excessive SimilarityUnit7156Avoid Too Many Copy Pasted ArtifactsElement similarity is addressed by the copy/paste ratio measured by the AIP rule.C++ / SQL
Performance EfficiencyASCPEM-PRF-01: Static Block Element containing Class Instance Creation Control ElementUnit-  C++ / SQL
Performance EfficiencyASCPEM-PRF-02: Immutable Storable and Member Data Element CreationUnit-  C++
Performance EfficiencyASCPEM-PRF-02: Immutable Storable and Member Data Element CreationUnit

7790

 

Avoid Cursors inside a loopThis rule lists all SQL Artifacts (except table and view) accessing a cursor inside a loop.SQL
Performance EfficiencyASCPEM-PRF-03: Static Member Data Element outside of a Singleton Class ElementUnit-  C++
Performance EfficiencyASCPEM-PRF-03: Static Member Data Element outside of a Singleton Class ElementUnitN/A Not applicable in the context of database technologies.SQL
Performance EfficiencyASCPEM-PRF-06: Large Data Resource ColumnSet Excessive Number of Index ElementsUnit-  C++ / SQL
Performance EfficiencyASCPEM-PRF-07: Large Data Resource ColumnSet with Index Element of  Excessive SizeUnit-  C++ / SQL
Performance EfficiencyASCPEM-PRF-13: Data Resource Access not using Connection Pooling capabilityUnit-  C++
Performance EfficiencyASCPEM-PRF-13: Data Resource Access not using Connection Pooling capabilityUnitN/A Not applicable in the context of database technologies.SQL
ReliabilityASCRM-CWE-252-resource: Unchecked Return Parameter Value of named Callable and Method Control Element with Read, Write, and Manage Access to Platform ResourceUnit-  C++ / SQL
ReliabilityASCRM-CWE-396: Declaration of Catch for Generic ExceptionUnit8000 Avoid 'catch-all' statementImplementation of the OMG rule in the C++ context, for the 'catch-all' statement.C++
ReliabilityASCRM-CWE-396: Declaration of Catch for Generic ExceptionUnit-  SQL
ReliabilityASCRM-CWE-397: Declaration of Throws for Generic ExceptionUnit678Never throw an exception from a DestructorDirect implementation of the ruleC++
ReliabilityASCRM-CWE-397: Declaration of Throws for Generic ExceptionUnit-  SQL
ReliabilityASCRM-CWE-456: Storable and Member Data Element Missing InitializationUnit7932Avoid Constructors not supplying an initial value for all non-static data membersIt is necessary to initialize data members either scalar types or pointers in order to reduce the risk of an invalid state after successful construction. 

Not initializing such data members can lead to unexpected behaviour.

C++
ReliabilityASCRM-CWE-456: Storable and Member Data Element Missing InitializationUnit7998Avoid local variables that are not initialized at declaration time It is necessary to initialize data members either scalar types or pointers in order to reduce the risk of an invalid state after successful construction. 

Not initializing such data members can lead to unexpected behaviour.

C++
 ReliabilityASCRM-CWE-456: Storable and Member Data Element Missing InitializationUnit-  SQL
ReliabilityASCRM-CWE-674: Uncontrolled RecursionUnit7388Avoid artifacts having recursive callsDirect implementation of the rule.C++ / SQL
ReliabilityASCRM-RLB-06: Storable or Member Data Element containing Pointer Item Element without Proper Copy Control ElementUnit7298A Class that has pointer data members must provide a copy ConstructorIf you do not provide a copy constructor, the compiler will generate one for you automatically. This generated copy constructor simply performs a member-wise assignment of all of the data members of a class. This is fine for a class that does not contain any pointer variables, but for pointers this would lead to duplicate references to the same objects with the risk of invalid references and thus of memory corruption and crashes. It is a good idea to get into the habit of always providing the copy constructor for your classes.C++
ReliabilityASCRM-RLB-06: Storable or Member Data Element containing Pointer Item Element without Proper Copy Control ElementUnitN/A Not applicable in the context of database technologies.SQL
ReliabilityASCRM-RLB-07: Class Instance Self Destruction Control ElementUnit8004Avoid using 'delete this'This requirement ensures that self destruction of objects can be harmful. For example, 'delete this' leaves the current instance in a "dangling" state, which may lead to undefined behavior. 'delete this' is only valid if you can guarantee that the instance members will no longer be accessed.C++
ReliabilityASCRM-RLB-07: Class Instance Self Destruction Control ElementUnitN/A Not applicable in the context of database technologies.SQL
ReliabilityASCRM-RLB-08: Named Callable and Method Control Elements with Variadic Parameter ElementUnit8074Avoid using 'class' or 'struct' parameters with variadic Functions Variadic functions are functions that accept a variable number of arguments, such as 'printf()' and 'format()'.

Using them with other data types than C-style structs will lead to unexpected behaviour.

C++
ReliabilityASCRM-RLB-08: Named Callable and Method Control Elements with Variadic Parameter ElementUnitN/A Not applicable in the context of database technologies.SQL
ReliabilityASCRM-RLB-09: Float Type Storable and Member Data Element Comparison with Equality OperatorUnit-  C++ / SQL
ReliabilityASCRM-RLB-12: Singleton Class Instance Creation without Proper Lock Element ManagementUnit-  C++
ReliabilityASCRM-RLB-12: Singleton Class Instance Creation without Proper Lock Element ManagementUnitN/A Not applicable in the context of database technologies. SQL
ReliabilityASCRM-RLB-15: Class Element with Virtual Method Element wihout Virtual DestructorUnit584Avoid Classes with at least one virtual Function and without a virtual Destructor

Whenever a virtual method is defined in a class, it means that the class is intended to be used in an inheritance hierarchy. In this context, a derived object will often be handled through a pointer to its base class, to achieve polymorphism. If a class has a non-virtual destructor, and an attempt is made to destroy an object of a derived type through a pointer to the base type, the behavior is undefined.

C++
ReliabilityASCRM-RLB-15: Class Element with Virtual Method Element without Virtual DestructorUnitN/A Not applicable in the context of database technologies. SQL
ReliabilityASCRM-RLB-16: Parent Class Element without Virtual Destructor Method ElementUnit620Avoid base Classes without virtual DestructorsOn some platforms, it may call the base-class version of the destructor instead of the derived-class version, provoking memory leaks, resource losses and stability issues.C++
ReliabilityASCRM-RLB-16: Parent Class Element without Virtual Destructor Method ElementUnitN/A Not applicable in the context of database technologies. SQL
ReliabilityASCRM-RLB-17: Child Class Element wihout Virtual Destructor unlike its Parent Class Element Unit7340Avoid Classes with Destructor not explicitly virtual whenever one of its base Class has a virtual Destructor Whenever a virtual method is defined in a class, it means that the class is intended to be used in an inheritance hierarchy. In this context, a derived object will often be handled through a pointer to its base class, to achieve polymorphism. If a class has a non-virtual destructor, and an attempt is made to destroy an object of a derived type through a pointer to the base type, the behavior is undefined.C++
ReliabilityASCRM-RLB-17: Child Class Element without Virtual Destructor unlike its Parent Class Element UnitN/A Not applicable in the context of database technologies. SQL
ReliabilityASCRM-RLB-18: Storable and Member Data Element Initialization with Hard-Coded Network Resource Configuration DataUnit-  C++
ReliabilityASCRM-RLB-18: Storable and Member Data Element Initialization with Hard-Coded Network Resource Configuration DataUnit-  SQL
ReliabilityASCRM-RLB-19: Synchronous Call Time-Out AbsenceUnit8054Avoid calling blocking functions with an infinite timeoutHere we have to ensure that we avoid functions with parameters corresponding to infinite timeout can lead to program blocking and/or deadlock.

 

C++
ReliabilityASCRM-RLB-19: Synchronous Call Time-Out AbsenceUnitN/A Not applicable in the context of database technologies. SQL
SecurityASCSM-CWE-252-resource: Unchecked Return Parameter Value of named Callable and Method Control Element with Read, Write, and Manage Access to Platform ResourceUnit-  C++ / SQL
SecurityASCSM-CWE-327: Broken or Risky Cryptographic Algorithm UsageUnit-  C++
SecurityASCSM-CWE-327: Broken or Risky Cryptographic Algorithm UsageUnitN/A Not applicable in the context of database technologies. SQL
SecurityASCSM-CWE-396: Declaration of Catch for Generic ExceptionUnit-  C++
SecurityASCSM-CWE-396: Declaration of Catch for Generic ExceptionUnitN/A Not applicable in the context of database technologies. SQL
SecurityASCSM-CWE-397: Declaration of Throws for Generic ExceptionUnit-  C++
SecurityASCSM-CWE-397: Declaration of Throws for Generic ExceptionUnitN/A Not applicable in the context of database technologies. SQL
SecurityASCSM-CWE-456: Storable and Member Data Element Missing InitializationUnit-  C++
SecurityASCSM-CWE-456: Storable and Member Data Element Missing InitializationUnitN/A Not applicable in the context of database technologies. SQL
  • No labels