CWE

Common Weakness Enumeration

A community-developed list of SW & HW weaknesses that can become vulnerabilities

New to CWE? click here!
CWE Most Important Hardware Weaknesses
CWE Top 25 Most Dangerous Weaknesses
Home > Compatibility > CWE-Compatible Products and Services  
ID

Name of Your Organization:

AdaCore

Web Site:

www.adacore.com

Compatible Capability:

CodePeer

Capability home page:

http://www.adacore.com/codepeer

General Capability Questions

Product Accessibility <CR_2.4>

Provide a short description of how and where your capability is made available to your customers and the public (required):

CodePeer is available for an annual subscription fee from Adacore, and can be hosted on Windows or Linux O/S, targeted to any target architecture of interest. For more information, contact sales@adacore.com

Mapping Questions

Map Currency Indication <CR_6.1>

Describe how and where your capability indicates the most recent CWE content used to create or update its mappings (required):

The user documentation on CWE features will indicate the version of CWE used to label CWE check-boxes and other CWE indicators.

Map Currency Update Approach <CR_6.2>

Indicate how often you plan on updating the mappings to reflect the current CWE content and describe your approach to keeping reasonably current with the CWE content when mapping them to your repository (recommended):

AdaCore makes annual major releases of all products, and a mid-year bug-fix release. At these times we will ensure the documentation of CWE capabilities are up to date.

We will also update documentation as we update individual messages to match new CWE revisions.

MAP CURRENCY UPDATE TIME <CR_6.3>

Describe how and where you explain to your customers the timeframe they should expect an update of your capability’s mappings to reflect newly available CWE content (required):

Our customer support tool GNATTracker is the primary means of communication between AdaCore and our customers:

http://www.adacore.com/frontline-support/gnattracker/

Through GNATTracker customers receive semi-annual updates, as well as "wavefront" releases during the year when a specific bug-fix is requested.

Documentation Questions

CWE AND COMPATIBILITY DOCUMENTATION <CR_5.1>

Provide a copy, or directions to its location, of where your documentation describes CWE and CWE compatibility for your customers (required):

http://docs.adacore.com/codepeer-docs/users_guide/_build/html/messages_and_annotations.html

DOCUMENTATION OF FINDING ELEMENTS USING CWE IDENTIFIERS <CR_5.2>

Provide a copy, or directions to its location, of where your documentation describes the specific details of how your customers can use CWE identifiers to find the individual security elements within your capability’s repository (required):

http://docs.adacore.com/codepeer-docs/users_guide/_build/html/viewing_output.html

DOCUMENTATION OF FINDING CWE IDENTIFIERS USING ELEMENTS <CR_5.3>

Provide a copy, or directions to its location, of where your documentation describes the process a user would follow to find the CWE identifiers associated with individual security elements within your capability’s repository (required):

http://docs.adacore.com/codepeer-docs/users_guide/_build/html/messages_and_annotations.html

DOCUMENTATION INDEXING OF CWE-RELATED MATERIAL <CR_5.4>

If your documentation includes an index, provide a copy of the items and resources that you have listed under "CWE" in your index. Alternately, provide directions to where these "CWE" items are posted on your web site (recommended):

The online documentation system supports search by keyword. This is the URL produced by typing "cwe" into the search box:

Type-Specific Capability Questions

Tool Questions

FINDING TASKS USING CWE IDENTIFIERS <CR_A.2.1>

Give detailed examples and explanations of how a user can locate tasks in the tool by looking for their associated CWE identifier (required):

The user can select which particular CWE identifiers are of interest by using the check boxes in the CodePeer Report window in GPS. By hovering over a CWE checkbox, the CWE description becomes visible. Here we have a screen shot where only one CWE item is checked, namely CWE 835 (Loop with unreachable exit condition). We can drill down to the actual source code by clicking on the message of interest.

CR_A.2.1

In this second example, we have selected two CWE identifiers. By checking or unchecking the associated boxes, the summary of messages provided to the left of the checkboxes indicates the number and location of occurrences of messages associated with the selected CWE identifiers. In this example we selecte two CWE identifiers (118 and 125), and the message summary shows the count of messages selected (1 high ranking, and 1 medium ranking message), and the locations window below shows the actual messages, organized by source file:

CR_A.2.1

FINDING CWE IDENTIFIERS USING ELEMENTS IN REPORTS <CR_A.2.2>

Give detailed examples and explanations of how, for reports that identify individual security elements, the tool allows the user to determine the associated CWE identifier for the individual security elements in the report (required):

As seen in the above example, CWE identifiers are included in square brackets after any message in CodePeer, provided "Include CWE ids" has been selected in the CodePeer project properties page in GPS:

CR_A.2.2

GETTING A LIST OF CLAIMED CWE IDENTIFIER COVERAGE <CR_A.2.3>

Give detailed examples and explanations of how a user can obtain a listing of all of the CWE identifiers that the owner claims the tool is effective at locating in software (required):

Each message described in the CodePeer user manual (Help/CodePeer/Manual) identifies the associated CWE identifiers, if any. In addition, on the CodePeer Report messages window, all CWE identifiers associated with any messages of the current CodePeer run are included in the set of checkboxes beneath "CWE categories." As indicated above, by hovering over any one of these CWE identifiers, a longer description will be displayed.

Here is a portion of the CodePeer user manual showing the listing of CWE identifiers associated with the run-time-check messages:

CR_A.2.3

GETTING A LIST OF CWE IDENTIFIERS ASSOCIATED WITH TASKS <CR_A.2.6>

Give detailed examples and explanations of how a user can obtain a listing of all of the CWE identifiers that are associated with the tool’s tasks (recommended):

See section (A.2.3) above.

SELECTING TASKS USING INDIVIDUAL CWE IDENTIFIERS <CR_A.2.8>

Describe the steps that a user would follow to browse, select, and deselect a set of tasks for the tool by using individual CWE identifiers (recommended):

See section (A.2.1) above. By checking or unchecking CWE identifiers of interest, CodePeer will include or exclude messages with the associated CWE identifiers.

NON-SUPPORT NOTIFICATION FOR A REQUESTED CWE IDENTIFIER <CR_A.2.9>

Provide a description of how the tool notifies the user that a task associated with a selected CWE Identifier cannot be performed (recommended):

CodePeer only displays CWE identifiers that are associated with at least one message produced by the current CodePeer run.

Media Questions

ELECTRONIC DOCUMENT FORMAT INFO <B.3.1>

Provide details about the different electronic document formats that you provide and describe how they can be searched for specific CWE-related text (required):

CodePeer can generate text, CSV (comma-separated-values), and XML file formats. The text file is a simple list of messages prefixed with "filename: line: column:". The text file is produced by invoking "codepeer_msg_reader" on the command line with the "-cwe" option, to request CWE identifiers to be included after the message kind. For example:

% codepeer_msg_reader –cwe test.output

See (B.3.2) below for sample output.

The CSV file is suitable for loading into a spreadsheet, and it includes a CWE column containing the CWE identifier(s) associated with the given message. The CSV file is produced by invoking "codepeer_msg_reader" on the command line with the "-csv" option. For example:

% codepeer_msg_reader –csv prj.output

The CSV file can also be produced using the GUI (see item (B.4.3) below).

The XML format is based on a format originally defined as part of the NIST SAMATE project (http://samate.nist.gov/SATE.html), and is described by the following:

The SATE V output format is the same as the SATE 2010 format. SATE 2008 and 2009 outputs are subsets and are therefore compliant with the latest version.

In the SATE tool output format, each warning includes:

  • Id - a simple counter, unique within the report.
  • (Optional) tool specific id.
  • One or more locations, where each location has:
    • (Optional) id - path id. If a tool produces several paths for a weakness, id can be used to differentiate between them.
    • line - line number.
    • path - file path.
    • (Optional) fragment - a relevant source code fragment at the location.
    • (Optional) explanation - why the location is relevant or what variable is affected.
  • Name (class) of the weakness, e.g., "buffer overflow".
  • (Optional) CWE id, where applicable.
  • Weakness grade (assigned by the tool):
    • Severity on the scale 1 to 5, with 1 - the highest.
    • (Optional) probability that the problem is a true positive, from 0 to 1.
    • (Optional) tool_specific_rank - tool specific metric - useful if a tool does not use severity and probability. If a team uses this field, it would have to separately provide definition, scale, and possible values.
  • Output - original message from the tool about the weakness, either in plain text, HTML, or XML.
  • (Optional) An evaluation of the warning by a human; not considered to be part of tool output, including:
    • (Optional) correctness - human analysis of the weakness, one of several categories. Use this instead of the deprecated "falsepositive" attribute

The latest SATE XML schema file can be downloaded here (http://samate.nist.gov/SATE5/resources/sate5.pathcheck.xsd).

The CWE identifiers are included in the <name...> tag identified by a "cweid=nnn" attribute.

The XML file is produced by invoking "samate_msg_reader" on the command line.

For example:

% samate_msg_reader lib.output

See (B.3.2) below for sample output.

ELECTRONIC DOCUMENT LISTING OF CWE IDENTIFIERS <CR_B.3.2>

If one of the capability’s standard electronic documents only lists security elements by their short names or titles provide example documents that demonstrate how the associated CWE identifiers are listed for each individual security element (required):

Below is sample output from "codepeer_msg_reader –cwe prj.output". The CWE
identifiers are given in brackets after the message kind:

% codepeer_msg_reader -cwe prj.output
dining_philosophers.adb:46:36: medium: range check[118] might fail: requires
(Still_Eating - 1) >= 0
dining_philosophers.adb:46:20: medium warning: unprotected
access[362,366,367,374,820] of Still_Eating via
dining_philosophers.person'Task_Type_Body
dining_philosophers.adb:46:23: medium warning: unprotected
access[362,366,367,374,820] of Still_Eating via
dining_philosophers.person'Task_Type_Body
dining_philosophers.adb:46:20: low warning: unprotected shared
access[362,366,367,374,820] of Still_Eating via
dining_philosophers.bus_boy'Task_Body
dining_philosophers.adb:46:23: low warning: unprotected shared
access[362,366,367,374,820] of Still_Eating via
dining_philosophers.bus_boy'Task_Body
dining_philosophers.adb:54:20: low warning: unprotected shared
access[362,366,367,374,820] of Still_Eating via
dining_philosophers.bus_boy'Task_Body
dining_philosophers.adb:56:13: low warning: unprotected shared
access[362,366,367,374,820] of Still_Eating via
dining_philosophers.bus_boy'Task_Body
dining_philosophers.adb:61:23: medium warning: test always true[561] because
Num_Forks in 1..5
dining_philosophers.adb:68:10: high: array index check[124-127,129-
131,135,170,193] fails here: requires Num_Forks in 1..5
dining_philosophers.adb:72:8: medium warning: dead code[561] because Num_Forks
in 1..5
test_dining_philosophers.adb:3:1: high warning: subp always fails:
test_dining_philosophers fails for all possible inputs
test_dining_philosophers.adb:19:30: high: precondition (array index check[124-
127,129-131,135,170,193]) failure on test_dining_philosophers.fork_ref: requires
I in 1..5
test_dining_philosophers.adb:22:30: high: access check[252-253,476] fails here:
requires (Fork_Ref(4)) /= null
test_dining_philosophers.adb:23:43: high: precondition (range check[118])
failure on test_dining_philosophers.fork_ref: requires Fork_Ref_Counter <= 9

Here is a portion of a "samate_messages.xml" file produced by "samate_msg_reader

  prj.output":
<?xml version="1.0"?>
<report>
<weakness id="1" tool_specific_id="58">
<name cweid="118">range check</name>
<location path="/dining_philosophers.adb" line="46"/>
<grade severity="2"/>
<output>
<textoutput>might fail: requires (Still_Eating - 1) &gt;= 0</textoutput>
<textoutput> complete_cweids=118</textoutput>
</output>
</weakness>
<weakness id="2" tool_specific_id="54">
<name cweid="366">unprotected access</name>
<location path="/dining_philosophers.adb" line="46"/>
<grade severity="2"/>
<output>
<textoutput>of Still_Eating via dining_philosophers.person'Task_Type_Body</textoutput>
<textoutput> complete_cweids=362,366,367,374,820</textoutput>
</output>
</weakness>
<weakness id="3" tool_specific_id="56">
<name cweid="366">unprotected access</name>
<location path="/dining_philosophers.adb" line="46"/>
<grade severity="2"/> <output>
<textoutput>of Still_Eating via dining_philosophers.person'Task_Type_Body</textoutput>
<textoutput> complete_cweids=362,366,367,374,820</textoutput>
</output>
</weakness>
. . .
</report>
Graphical User Interface (GUI) Questions

FINDING ELEMENTS USING CWE IDENTIFIERS THROUGH THE GUI <CR_B.4.1>

Give detailed examples and explanations of how the GUI provides a "find" or "search" function for the user to identify your capability’s elements by looking for their associated CWE identifier(s) (required):

See Item (A.2.1) above.

GUI ELEMENT TO CWE IDENTIFIER MAPPING <CR_B.4.2>

Briefly describe how the associated CWE identifiers are listed for the individual security elements or discuss how the user can use the mapping between CWE identifiers and the capability’s elements, also describe the format of the mapping (required):

See Item (A.2.2) above.

GUI EXPORT ELECTRONIC DOCUMENT FORMAT INFO <CR_B.4.3>

Provide details about the different electronic document formats that you provide for exporting or accessing CWE-related data and describe how they can be searched for specific CWE-related text (recommended):

A comma-separated-values (csv) report can be generated from GPS by using the CodePeer menu, selecting "Generate CSV Report." This will produce a "codepeer.csv" file, which when opened as a spreadsheet, will have a CWE column which will identify the relevant CWE identifier(s) associated with each message.

Questions for Signature

STATEMENT OF COMPATIBILITY <CR_2.11>

Have an authorized individual sign and date the following Compatibility Statement (required):

"As an authorized representative of my organization I agree that we will abide by all of the mandatory CWE Compatibility Requirements as well as all of the additional mandatory CWE Compatibility Requirements that are appropriate for our specific type of capability."

Name: S. Tucker Taft

Title: VP and Director of Language Research

STATEMENT OF ACCURACY <CR_3.4>

Have an authorized individual sign and date the following accuracy Statement (recommended):

"As an authorized representative of my organization I agree that we will abide by all of the mandatory CWE Compatibility Requirements as well as all of the additional mandatory CWE Compatibility Requirements that are appropriate for our specific type of capability."

Name: S. Tucker Taft

Title: VP and Director of Language Research

STATEMENT ON FALSE-POSITIVES AND FALSE-NEGATIVES <CR_B.2.10> and/or <CR_B.3.7>

FOR TOOLS AND SERVICES ONLY — Have an authorized individual sign and date the following statement about your tools efficiency in identification of security elements (required):

"As an authorized representative of my organization I agree that we will abide by all of the mandatory CWE Compatibility Requirements as well as all of the additional mandatory CWE Compatibility Requirements that are appropriate for our specific type of capability."

Name: S. Tucker Taft

Title: VP and Director of Language Research

Page Last Updated: April 02, 2018