enarx / enarx

Enarx: Confidential Computing with WebAssembly
https://enarx.dev/
Apache License 2.0
1.3k stars 140 forks source link

[Feature]: Clippy lint undocumented unsafe blocks #1661

Open haraldh opened 2 years ago

haraldh commented 2 years ago

Is there an existing issue for this?

Description

For better review and a later audit process, it is critical to have safety comments for all unsafe blocks.

To make those blocks as small as possible, unsafe functions should allow unsafe blocks in the inside also.

Acceptance Criteria

No response

Suggestions for a technical implementation

Add

#![deny(clippy::missing_safety_doc)]
#![deny(clippy::undocumented_unsafe_blocks)]
#![deny(unsafe_op_in_unsafe_fn)]
bstrie commented 2 years ago

Yes, having every unsafe block documented will be mandatory if we ever hope to pass an actual audit. In general I would also like to see safety comments be more rigorous and standardized, but that can happen in a future effort.

Also turning on more clippy lints in general is something that we should pursue.