mozilla-services / websec-check

web security checklist for Firefox Services
Mozilla Public License 2.0
74 stars 17 forks source link

[rust] recommend https://github.com/Centril/rust-safe annotations for unsafe code? #17

Open g-k opened 5 years ago

g-k commented 5 years ago

For the rust guidelines, we have - [ ] If you must use 'unsafe', include a comment explaining why you believe its use is sound and its behavior is correct and well defined and there's a crate for that now: https://github.com/Centril/rust-safe#getting-started

So pending some basic review of that crate, we could change that item to "include a rust-safe annotation with a reason or comment explaining why you believe its use is sound and its behavior is correct and well defined"

Thoughts @psiinon?

@bbangert I believe you originally recommended adding the comments for unsafe code have you tried rust-safe?

bbangert commented 5 years ago

I have not tried it, so I don't have any meaningful input on that. Maybe @pjenvey or Donovan (I don't know his github handle) have more input.