1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Registry of `W-SEC-*` codes for non-fatal, security-relevant runtime warnings.
//!
//! Mirrors the `E-<CATEGORY>-NNN` convention `murmur-cli`'s `CliError` uses for fatal errors
//! (see `murmur_cli::error`), but for warnings: printed and the session continues. Each code
//! has a matching `#w-sec-nnn` anchor on the security-warnings reference page, so callers can
//! append [`security_warning_link`] to the message instead of re-explaining the issue inline.
/// `capabilities.shell.allow` is non-empty but the host has no kernel-level subprocess
/// sandboxing primitive (Landlock/seccomp are Linux-only) — enforcement is environment-only.
pub const W_SEC_001: &str = "W-SEC-001";
/// `capabilities.shell.allow` is non-empty on a Linux host without Landlock (kernel <5.13) —
/// exec/network are seccomp-enforced but filesystem scope is not.
pub const W_SEC_002: &str = "W-SEC-002";
/// `capabilities.shell.allow` includes `"bash"` and `capabilities.network.allow` is non-empty,
/// but nothing on this host constrains bash's own outbound network access.
pub const W_SEC_003: &str = "W-SEC-003";
/// A manifest field that looks credential-shaped (`api_key`, `token`, `secret`, `password`)
/// holds a literal value instead of a `${VAR_NAME}` reference.
pub const W_SEC_004: &str = "W-SEC-004";
/// The host resolved to a Linux kernel-enforcement tier (Landlock/seccomp), but that
/// enforcement has never been verified on real Linux hardware — treat it as experimental,
/// not a security boundary. Fires on both Linux tiers so the "full" tier is not silently
/// assumed to be enforced.
pub const W_SEC_005: &str = "W-SEC-005";
const SECURITY_WARNINGS_DOC_URL: &str =
"https://docs.murmur.nexus/murmur-nexus/murmur/reference/security-warnings/";
/// Builds the doc link for a `W-SEC-*` code, e.g. `.../security-warnings/#w-sec-001`.