Ex

Extrasafe – use seccomp and Landlock to make your Rust code extra safe

Hacker News

Extrasafe – use seccomp and Landlock to make your Rust code extra safe

Hi HN, I just released a new version of extrasafe, a library I've been working on that makes it easy to use seccomp, in a way similar to OpenBSD's pledge. Seccomp lets you deny the use of syscalls you don't need. This version adds support for Landlock ( https://landlock.io ), which lets you restrict access to the filesystem in a more fine-grained manner than seccomp allows. Here's an example: fn main() { let tmp_dir = tempfile::tempdir().unwrap().into_path(); extrasafe::SafetyContext::new() .enable( extrasafe::builtins::SystemIO::nothing() .allow_create_in_dir(&tmp_dir) .allow_write_file(&tmp_dir) ).unwrap() .apply_to_current_thread().unwrap(); // Opening arbitrary files now fails! assert!(File::open("/etc/passwd") .is_err()); // But the directory we allowed works assert!(File::create(tmp_dir.join("my_output.txt")) .is_ok()); // And other syscalls are still disallowed assert!(std::net::UdpSocket::bind("127.0.0.1:0") .is_err()); }

Share card

Actual performance

1points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
69%69% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: new, context, code · Missing: mac, agents, macos
63%63% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: just released, filesystem, io · Missing: https docs, excited, exist
59%59% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Strong signals: way · Missing: mobile apps, ios, personal
39%39% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: calls · Missing: plus, platform, intuitive
37%37% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
13%13% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

Ht
Httpies – httpie with extra headers43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Httpies – httpie with extra headers

Hacker News4
Re
Re-reselect – Extra memoization for reselect selectors54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Re-reselect – Extra memoization for reselect selectors

Hacker News2
Ra
Rasn. A safe [no_std] ASN.1 codec framework for Rust42%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Rasn. A safe [no_std] ASN.1 codec framework for Rust

Hacker News1
Xa
Xautolock rewrite in Rust with a few extra features69%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Xautolock rewrite in Rust with a few extra features

Hacker News4
EXTRA SAFE
EXTRA SAFE22%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Blockchain Security for Conferencing

Product Hunt+14
RS
RSBadges - A code badge generator in Rust50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

RSBadges - A code badge generator in Rust

Hacker News20
St
StatsD in Rust51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

StatsD in Rust

Hacker News1
Sc
Screencast: An Introduction to Rust57%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Screencast: An Introduction to Rust

Hacker News3
Ha
Handlebars for Rust51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Handlebars for Rust

Hacker News2
Ox
Oxischeme – A Scheme implementation in Rust56%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Oxischeme – A Scheme implementation in Rust

Hacker News18