-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
CERT C sections, prioritized
(below is @PLeVasseur's biased take, needs refinement with group)
- Rule 04. Integers (INT)
- Rule 05. Floating Point (FLP)
- Rule 06. Arrays (ARR)
- Rule 07. Characters and Strings (STR)
- Rule 02. Declarations and Initialization (DCL)
- Rule 12. Error Handling (ERR)
- ...
Uncategorized list of CERT C sections to make creating prioritized list easier later
- Rule 01. Preprocessor (PRE)
- Rule 02. Declarations and Initialization (DCL)
- Rule 03. Expressions (EXP)
- Rule 04. Integers (INT)
- Rule 05. Floating Point (FLP)
- Rule 06. Arrays (ARR)
- Rule 07. Characters and Strings (STR)
- Rule 08. Memory Management (MEM)
- Rule 09. Input Output (FIO)
- Rule 10. Environment (ENV)
- Rule 11. Signals (SIG)
- Rule 12. Error Handling (ERR)
- Rule 13. Application Programming Interfaces (API)
- Rule 14. Concurrency (CON)
Below are a bit more speculative, but should be investigated:
Mapping from CERT C => FLS
CERT C Section | FLS Chapter | FLS Paragraph ID | Notes |
---|---|---|---|
Rule 01. Preprocessor (PRE) | no equivalent | no equivalent | Determined based on a quick read-through, subject to refinement |
Rule 02. Declarations and Initialization (DCL) | Ownership and Destruction | todo | Determined based on a quick read-through, subject to refinement |
Rule 03. Expressions (EXP) | Expressions possibly Unsafety as well |
todo | Determined based on a quick read-through, subject to refinement Does seem to focus primarily on those things which are either not possible or must be done using unsafe in Rust |
Rule 04. Integers (INT) | Types and Traits | 4.3.3.2. Integer Types | |
Rule 05. Floating Point (FLP) | Types and Traits | 4.3.3.1. Floating Point Types | |
Rule 06. Arrays (ARR) | Unsafety possibly | todo | Determined based on a quick read-through, subject to refinement Does seem to focus primarily on those things which are either not possible or must be done using unsafe in Rust |
Rule 07. Characters and Strings (STR) | FFI possibly | todo | Determined based on a quick read-through, subject to refinement Could be a fit in the FFI portion, due to the emphasis on ensuring safe CString and CStr handling |
Rule 08. Memory Management (MEM) | Unsafety | todo | Determined based on a quick read-through, subject to refinement Safe-subset Rust is not concerned with the level of detail gone into here, but certainly unsafe Rust could be |
Rule 09. Input Output (FIO) | Unsafety & FFI possibly Note there are some safe parts of Rust which could be misused we should call out: FIO32-C. Do not perform operations on devices that are only appropriate for files is a perfect example of applicability to a part of the standard library which is marked as safe, though it could be misused: /proc/self/mem and similar OS features |
todo | Determined based on a quick read-through, subject to refinement |
Rule 10. Environment (ENV) | Unsafety & FFI possibly |
todo | Determined based on a quick read-through, subject to refinement But in general we should probably encourage usage of safe ways of interacting with the environment which may not have a clear 1 <=> 1 with the FLS |
Rule 11. Signals (SIG) | Unsafety & FFI possibly |
todo | Determined based on a quick read-through, subject to refinement But in general we should probably encourage usage of safe ways of interacting with signals which may not have a clear 1 <=> 1 with the FLS |
Rule 12. Error Handling (ERR) | Exceptions and Errors FFI possibly |
todo | Determined based on a quick read-through, subject to refinement |
Rule 13. Application Programming Interfaces (API) | todo | todo | Currently empty section of CERT C We could still offer up some Rust coding guidelines for APIs, but it'd not link to anything CERT C-specific |
Rule 14. Concurrency (CON) | Concurrency & Unsafety possibly |
todo | Determined based on a quick read-through, subject to refinement |
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Type
Projects
Status
In Progress