| 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 |
CERT C sections, prioritized
(below is @PLeVasseur's biased take, needs refinement with group)
Uncategorized list of CERT C sections to make creating prioritized list easier later
Below are a bit more speculative, but should be investigated:
Mapping from CERT C => FLS
possibly
Unsafety
as well
Does seem to focus primarily on those things which
are either not possible or must be done using
unsafein RustDoes seem to focus primarily on those things which
are either not possible or must be done using
unsafein RustCould be a fit in the FFI portion, due to the emphasis
on ensuring safe
CStringandCStrhandlingSafe-subset Rust is not concerned with the level of detail gone
into here, but certainly
unsafeRust could be&
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/memand similar OS features&
FFI
possibly
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
&
FFI
possibly
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
FFI possibly
We could still offer up some Rust coding guidelines for APIs,
but it'd not link to anything CERT C-specific
&
Unsafety possibly