ossf / Memory-Safety

Apache License 2.0
19 stars 12 forks source link

How does unsafe code fit in? #28

Closed richlander closed 3 months ago

richlander commented 5 months ago

I was re-reading this doc: https://github.com/ossf/Memory-Safety/blob/main/docs/memory-safety-continuum.md

I find it difficult to fit unsafe code into that continuum. On first read "memory safe by default" seems be getting at unsafe code. I can accept that.

Using a memory safe by default language with developer best practices and automated tooling to check for memory safety in first party code AND automated tooling to check for memory safety in third party code (dependencies)

This is where things get unclear for me. I read this fine article: https://foundation.rust-lang.org/news/unsafe-rust-in-the-wild-notes-on-the-current-state-of-unsafe-rust/. If I'm to apply this prescription, I assume I should run Miri on all crates that use unsafe code. Is that the intent?

Two nits:

balteravishay commented 4 months ago

Discussed this issue in the SIG meeting on July 11th.

Nit 1: phrase better the addition of the second part of the sentence (use comma or other grammar instead of AND) Nit 2: Agree that the terms first party and third party may be confusing, the goal was to distinguish between "own code" and code of dependencies as most OSS projects have no distinction between org-level dependencies and others.