VulnerabilityHistoryProject / mega-foss

Scripts for acquiring our MegaFoss dataset - a curated list of top open source projects that represent modern software development
MIT License
0 stars 0 forks source link

Closed namespaces: does Rust allow "closing" a namespace? #30

Open andymeneely opened 1 week ago

andymeneely commented 1 week ago

https://cwe.mitre.org/data/definitions/487 Reliance on Package-level Scope

blaqat commented 6 days ago

I'm not sure about closing a namespace, but rust modules, functions, objects, etc are private by default and need to be given the pub keyword to give visibility to other modules.

I believe this means the namespace is closed by default? But not entirely sure. If so, then this can be categorized as virtually impossible in safe rust OR opt in since a developer could make everything public.