bytecodealliance / bytecodealliance/cap-std
document what is needed for this to be a statically verified sandbox
- Langage dominant
- Rust
- Étoiles
- 821
- Forks
- 57
- Merge moyen
- 1 h 16 min
- PR mergées (30 j)
- 4
Description
Would adding a section to the Readme about this be welcome?
Together with static analysis, I think cap-std can be used to reduce the necessary code review to know that something does not escape the capabilities handed to it. So one would only need to review the API that one uses from a crate.
For this one would need some tool(s) one could run on a crate (and recursively its dependencies) to verify that it does not use any of the following:
* [cap-directories](https://github.com/bytecodealliance/cap-std/blob/main/cap-directories/README.md)
* [Dir::open_ambient_dir](https://docs.rs/cap-std/latest/cap_std/fs/struct.Dir.html#method.open_ambient_dir)
* the replaced functions/modules/crates (typical clippy job, but probably no ready made lint yet, can clippy guarantee this or is something else needed?)
* unsafe (there is `#![deny(unsafe_code)]` https://doc.rust-lang.org/reference/attributes/diagnostics.html , I think there are ready made tools, need to find a good recommendation)
* build script https://doc.rust-lang.org/cargo/reference/build-scripts.html (no idea if there is a ready to use tool to check, but easy to code)
* check known unsoundness like https://github.com/rust-lang/rust/issues/25860 are not used, I think miri https://github.com/rust-lang/miri is supposed to catch it, but need to double check
Any suggestions for relevant tools?
While there is research in that direction, for now none of this is to the level of formally proven, but the constructed to be correct level known from Rust.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par le README du dépôt et le cap-directories/README.md associé, puis étudiez les outils et vérifications Rust listés afin d’identifier les dépendances, le code unsafe, l’accès aux répertoires ambiants, les scripts de build et les problèmes connus d’unsoundness. Le travail sera considéré comme terminé lorsqu’une section du README documentera les outils applicables, leurs limites, ainsi que ce qui peut et ne peut pas être vérifié pour une sandbox vérifiée statiquement.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- rust
- Domaine
- documentation, security
- Type d'issue
- Documentation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- Calme
- Clarté
- À clarifier
- Accessibilité débutants
- 42/100