extrasafe 0.5.1

Make your code extrasafe by reducing what it can access.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[test]
#[should_panic(expected = "should fail")]
#[allow(clippy::assertions_on_constants)]
/// Test that even if everything (besides default enabled syscalls) is denied with seccomp, tests can fail
/// This is also manually tested by commenting out the assert line and checking that the test
/// failure propagates to the cli
fn seccomp_active_tests_fail() {
    let res = extrasafe::SafetyContext::new()
        .enable(extrasafe::builtins::BasicCapabilities).unwrap()
        .apply_to_current_thread();
    assert!(res.is_ok(), "Extrasafe failed {:?}", res.unwrap_err());

    assert!(false, "should fail");
}