Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ designed to demonstrate:

## Checks

| ID | Title | Category | CWE | ISO/IEC 24772-8 | SEI CERT C |SEI CERT C++ | C | Fortran | C++ | AutoFix |
| ID | Title | Category | CWE | ISO/IEC 24772-8 | SEI CERT C | SEI CERT C++ | C | Fortran | C++ | AutoFix |
|:------------------------ |:-----------------------------------------------------------------------------------------------------------:|:--------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------:|:-:|:-------:|:---:|:-------:|
| [PWR001](Checks/PWR001/) | Pass global variables as function arguments | correctness, modernization, security | [CWE-1108](https://cwe.mitre.org/data/definitions/1108.html) | | [DCL19-C](https://wiki.sei.cmu.edu/confluence/display/c/DCL19-C.+Minimize+the+scope+of+variables+and+functions) | | ✓ | ✓ | ✓ | |
| [PWR002](Checks/PWR002/) | Declare scalar variables in the smallest possible scope | correctness, security | [CWE-1126](https://cwe.mitre.org/data/definitions/1126.html) | | [DCL19-C](https://wiki.sei.cmu.edu/confluence/display/c/DCL19-C.+Minimize+the+scope+of+variables+and+functions) | | ✓ | | ✓ | |
Expand Down Expand Up @@ -121,8 +121,9 @@ designed to demonstrate:
| [RMK015](Checks/RMK015/) | Tune compiler optimization flags to increase the speed of the code | optimization | | | | | ✓ | ✓ | ✓ | |
| [RMK016](Checks/RMK016/) | Tune compiler optimization flags to avoid potential changes in floating point precision | correctness, security | [CWE-189](https://cwe.mitre.org/data/definitions/189.html) | | [FLP01-C](https://wiki.sei.cmu.edu/confluence/display/c/FLP01-C.+Take+care+in+rearranging+floating-point+expressions) | | ✓ | ✓ | ✓ | |

**CWE**, **ISO/IEC 24772-8**, and **SEI CERT C**: Map checks in the Open Catalog
to major security standards to clarify their relevance to software security
**CWE**, **ISO/IEC 24772-8**, **SEI CERT C**, and **SEI CERT C++**: Map checks
in the Open Catalog to major security standards to clarify their relevance to
software security.

**AutoFix**: Denotes tools that support automatic correction of the
corresponding check. Readers are encouraged to report additional tools with
Expand Down
6 changes: 4 additions & 2 deletions src/scripts/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const createDataTable = async () => {
{ 'label': 'CWE', 'searchValue': 'cwe' },
{ 'label': 'ISO/IEC 24772-8', 'searchValue': 'iso' },
{ 'label': 'SEI CERT C', 'searchValue': 'sei' },
{ 'label': 'SEI CERT C++', 'searchValue': 'sei-cpp' },
].map(({ label, searchValue }) => ({
'text': label,
'attr': {
Expand All @@ -90,8 +91,9 @@ const createDataTable = async () => {
// CWE), show only rows where the corresponding column is
// non-empty. Otherwise, filter by category using an exact match
// in column 2
if (['cwe', 'iso', 'sei'].includes(searchValue)) {
let columnIdx = {'cwe': 3, 'iso': 4, 'sei': 5}[searchValue];
if (['cwe', 'iso', 'sei', 'sei-cpp'].includes(searchValue)) {
let columnIdx =
{ 'cwe': 3, 'iso': 4, 'sei': 5, 'sei-cpp': 6 }[searchValue];
dataTable.column(columnIdx).search(
'^(?!\\s*$).+', /* regex = */true, /* smart = */ false);
} else {
Expand Down