Contenuto principale

Polyspace Support of CWE Rules

Weaknesses specified in the Common Weakness Enumeration (CWE™) include issues that can be checked exactly by Polyspace®. Polyspace can detect all violations of these CWE rules specified in the standard. In addition to these exact checkers, Polyspace provides partial support for other CWE rules. When checking for violations of CWE rules, you can choose to enable:

  • All supported CWE rules

  • Only the exact CWE rules

  • Rules from the CWE 658 category

  • Rules from the CWE 659 category

Supported CWE Rules

To look up all supported CWE rules, see Common Weakness Enumeration (CWE). To find out the rules that are newly supported in R2026a, see the release note.

Supported Exact CWE Rules

The exact CWE rules are selected when you select all-exact-checkers in the Polyspace Checkers Selection window. To lookup the exact checkers:

  1. On the Configuration node in your project configuration, locate Static Analysis tab.

  2. In Defects and Coding Standards , select Use custom checkers file.

  3. Open the Checkers Selection dialog box by clicking Open ().

  4. In the Checkers Selection window, click New to create a new checkers file. Deselect the coding rules that are already selected.

  5. Select CWE in the list of coding standards and defects.

  6. Select the checkbox all-exact-checkers. The exact CWE coding rule checkers are selected.

  7. Save your selection as an XML file.