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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
//! The sandbox boundary one `openmoat run` has (ADR-089): which tier was asked
//! for and which started, every downgrade and why, how the network is held,
//! the Landlock ABI, whether tool commands get the relay token, and for each
//! restriction whether the system has it, the run asks for it, it applied and
//! a check after the agent started confirmed it.
//!
//! Pure data: the CLI fills it from the platform and the launch, writes it to
//! the audit log as one row on every run and prints it for
//! `openmoat run --print-boundary`. Its JSON form is what scripts read, so
//! fields are only added, and [`VERSION`] moves when one changes meaning.
use serde::{Deserialize, Serialize};
mod score;
mod vm;
pub use score::{
ProtectionScore, ScoreItem, WEIGHTS_LINUX, WEIGHTS_MACOS, WEIGHTS_WINDOWS, weights,
};
pub use vm::{WEIGHTS_VM, vm_score};
/// The version of the record's JSON form.
pub const VERSION: u32 = 1;
/// The boundary of one run.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct EffectiveBoundary {
/// [`VERSION`].
pub version: u32,
/// The operating system (`linux`, `macos`, …).
pub os: String,
/// What the command line asked for.
pub requested: Requested,
/// The tier that starts.
pub tier: Tier,
/// Every way this run is weaker than the full boundary, each with why.
pub downgrades: Vec<Downgrade>,
/// How the agent's network is held.
pub network: Network,
/// Linux: the kernel's Landlock ABI and what `restrict_self` reported.
pub landlock: Option<Landlock>,
/// Whether tool commands receive the hook relay token (ADR-075).
pub tool_token: ToolToken,
/// Each restriction the platform has, in a fixed order.
pub restrictions: Vec<Restriction>,
/// What the check after the agent started found; `None` before the
/// agent starts (`--print-boundary`) or where no report came back.
pub launch: Option<LaunchCheck>,
/// Which inherited variables reach the agent (ADR-105), names only;
/// absent from records written before it was added.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub environment: Option<RunEnvironment>,
/// The protection score of this run (ADR-108): which of the platform's
/// kernel features are in force, out of 100, with the missing ones named.
/// Set by [`Self::rescore`], which [`Self::launched`] calls again; absent
/// from records written before it was added.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub score: Option<ProtectionScore>,
}
/// What of the environment `openmoat run` was started from reaches the
/// program it starts (ADR-105). Names only: a value is never in the record.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct RunEnvironment {
/// Whether only the allowlist passes, rather than every inherited name.
pub scrubbed: bool,
/// What chose it, in the words the run notice uses.
pub why: String,
/// Scrubbed: the inherited names that pass, sorted. Inherited: empty,
/// since every name passes, a brokered secret's excepted.
pub passed: Vec<String>,
/// The inherited names the program does not get, sorted; empty when the
/// environment is inherited.
pub withheld: Vec<String>,
/// The names that hold a brokered secret's placeholder instead of its
/// value (ADR-020), sorted.
pub brokered: Vec<String>,
}
/// The tier asked for on the command line.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum Requested {
/// Neither `--isolate` nor `--no-isolate`: the platform's default.
Default,
/// `--isolate`.
Isolated,
/// `--no-isolate`.
Lightweight,
}
/// The tiers of ADR-018.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum Tier {
/// The agent's own sandbox and OpenMoat's hooks, without `openmoat run`;
/// named so a record compares with a hook-only session, never one a run starts.
Standard,
/// Landlock and seccomp, or Seatbelt, over the whole machine; on Windows
/// a write-restricted token in a job object, which holds writes only.
Lightweight,
/// bubblewrap's own view of the machine around the same rules.
Isolated,
}
/// One way the run is weaker than the full boundary.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct Downgrade {
/// What is weaker.
pub what: Weaker,
/// Whether the person chose it (`--no-isolate`) rather than the system
/// lacking what it needs.
pub chosen: bool,
/// Why, in the words the run notice uses.
pub why: String,
}
/// What a [`Downgrade`] weakens.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum Weaker {
/// The Lightweight tier instead of the Isolated one.
Tier,
/// The network restricted by port only instead of a namespace.
Network,
/// The project's top granted whole instead of entry by entry, by the
/// person's own `sandbox.project_top: writable` (ADR-090): `.env`,
/// `.git/hooks` and `.moat` there are open to commands.
ProjectTop,
/// Name lookups go through the system's resolver, which resolves under
/// its own account, so a lookup the agent asks for leaves the machine
/// (Windows as the agent account with its network filters, ADR-129).
Dns,
}
/// How the agent's network is held.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct Network {
/// The mode.
pub mode: NetworkMode,
/// The proxy's loopback port, once the run has one.
pub proxy_port: Option<u16>,
}
/// The ways `openmoat run` holds the network.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum NetworkMode {
/// A network namespace whose only interface is loopback; the proxy is
/// the only way out (Linux, bubblewrap).
Namespace,
/// Landlock's TCP port rule alone: any host on the proxy's port is
/// reachable (Linux without a usable bubblewrap).
PortOnly,
/// The Seatbelt profile allows the proxy's address alone (macOS).
Profile,
/// The proxy variables alone (`HTTP_PROXY`, `HTTPS_PROXY`, …): nothing in
/// the operating system holds the network, so a program that ignores them
/// connects directly (Windows, ADR-115).
ProxyVariables,
/// Windows Filtering Platform filters for the agent account refuse every
/// connection and listen of its processes but one to loopback on the
/// proxy's port range (Windows as the agent account, ADR-129).
WfpAccount,
}
/// The Landlock part of the record (Linux).
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct Landlock {
/// The kernel's ABI, also where it is newer than the `landlock` crate knows.
pub abi: Option<u32>,
/// Why there is no usable Landlock, when there is none.
pub unavailable: Option<String>,
/// What `restrict_self` reported for the agent's ruleset; `None` before
/// the agent starts, when [`Self::abi`] comes from a probe.
pub enforcement: Option<Enforcement>,
}
/// Landlock's `RulesetStatus`.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum Enforcement {
/// Every right asked for applies.
Full,
/// The required rights apply; a best-effort one the kernel lacks does not.
Partial,
/// Nothing applies.
None,
}
/// Whether tool commands receive the hook relay token (ADR-075).
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case", tag = "state", content = "why")]
pub enum ToolToken {
/// A wrapper in front of the agent's tool shell drops it.
Withheld,
/// The host's own integration takes it out of the environment.
WithheldByIntegration,
/// Tool commands keep it: why.
NotWithheld(String),
/// The program is no agent OpenMoat knows, so no token handling applies.
UnknownAgent,
}
/// The restrictions a record names.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum Mechanism {
/// macOS: the Seatbelt profile `sandbox-exec` applies.
Seatbelt,
/// Landlock's file rights (ABI 1 to 3).
LandlockFilesystem,
/// Landlock's TCP connect rule for the proxy's port (ABI 4).
LandlockTcpPort,
/// Abstract Unix sockets and signals scoped to the sandbox (ABI 6,
/// best effort).
LandlockScopes,
/// Pathname Unix sockets made outside the sandbox refused (ABI 9, best
/// effort).
LandlockResolveUnix,
/// Every UDP bind, connect and send refused (ABI 10, best effort, ADR-108):
/// the kernel's own rule beside the seccomp filter's refusal of UDP sockets.
LandlockUdp,
/// The seccomp filters.
Seccomp,
/// `PR_SET_NO_NEW_PRIVS`: no set-user-ID gain across `exec`.
NoNewPrivs,
/// The agent's own network namespace (bubblewrap).
NetworkNamespace,
/// bubblewrap's view of the machine: the project without its denied
/// paths, the read roots and `--write` paths (the Isolated tier).
IsolatedView,
/// Windows: the agent's write-restricted token (ADR-115). A write needs
/// the run's own SIDs to be granted it too, and they are granted only on
/// the project, the run's temp directory and `--write` paths.
RestrictedToken,
/// Windows: the job object the agent and every process it starts are in,
/// which kills them all when the run ends and lets none break away.
JobObject,
/// Windows: the agent runs as OpenMoat's dedicated local account
/// (ADR-129), set up once by `openmoat agent-account setup`. A write
/// needs that account granted, which it is on the write roots and nowhere
/// else in the person's profile. Stands in for [`Self::RestrictedToken`]
/// in the score of a run that has it.
AgentAccount,
/// Windows: the Windows Filtering Platform filters that `openmoat
/// agent-account setup` installed for the agent account (ADR-129), which
/// hold its network to the proxy. Only a run as that account has it, and
/// only once the filters were read back as recorded.
WfpNetwork,
/// Windows: reads the policy denies refused by the operating system: deny
/// entries for the agent account (ADR-129). Only a run as that account
/// has it; a write-restricted token does not restrict reads.
WindowsReadDeny,
/// The microVM tier (ADR-128, not built): the agent runs on a kernel of
/// its own under a VM monitor (KVM, Virtualization.framework).
VmHypervisor,
/// The microVM tier: the guest sees the project and `--write` paths, no
/// home directory.
VmProjectOnly,
/// The microVM tier: no network device; only a vsock port to the proxy.
VmProxyNetwork,
/// The microVM tier: the hook reaches `openmoat guard` on the host over
/// vsock.
VmGuardRelay,
/// The microVM tier: the kernel and root image match `sandbox.vm.image`.
VmImagePinned,
}
impl Mechanism {
/// The name the JSON form and the run's output use.
#[must_use]
pub fn id(self) -> &'static str {
match self {
Self::Seatbelt => "seatbelt",
Self::LandlockFilesystem => "landlock_filesystem",
Self::LandlockTcpPort => "landlock_tcp_port",
Self::LandlockScopes => "landlock_scopes",
Self::LandlockResolveUnix => "landlock_resolve_unix",
Self::LandlockUdp => "landlock_udp",
Self::Seccomp => "seccomp",
Self::NoNewPrivs => "no_new_privs",
Self::NetworkNamespace => "network_namespace",
Self::IsolatedView => "isolated_view",
Self::RestrictedToken => "restricted_token",
Self::JobObject => "job_object",
Self::AgentAccount => "agent_account",
Self::WfpNetwork => "wfp_network",
Self::WindowsReadDeny => "windows_read_deny",
Self::VmHypervisor => "vm_hypervisor",
Self::VmProjectOnly => "vm_project_only",
Self::VmProxyNetwork => "vm_proxy_network",
Self::VmGuardRelay => "vm_guard_relay",
Self::VmImagePinned => "vm_image_pinned",
}
}
}
/// One restriction of the run.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct Restriction {
/// Which.
pub name: Mechanism,
/// This system has it.
pub available: bool,
/// This run asks for it.
pub configured: bool,
/// The kernel or tool reported it in force; `None` before the agent
/// starts, or where nothing reports it.
pub applied: Option<bool>,
/// A check after the agent started confirmed it (`/proc/<pid>/status`);
/// `None` where no such check exists (Landlock's rules cannot be read
/// back, Seatbelt has no `/proc`).
pub tested: Option<bool>,
}
impl Restriction {
/// A restriction as planned: not yet applied or tested.
#[must_use]
pub fn planned(name: Mechanism, available: bool, configured: bool) -> Self {
Self {
name,
available,
configured,
applied: None,
tested: None,
}
}
/// Whether the run asked for it, the system has it, and the launch found
/// it not applied or not in force. Once the agent started (`launched`),
/// what the tier promises must be confirmed: unknown counts as missing
/// for the seccomp filters and `no_new_privs` (`tested`), and for
/// Landlock's required rights and bubblewrap's namespace and view
/// (`applied`). Best-effort steps and Seatbelt, which nothing reports,
/// are missing only when reported off. On Windows the token, the account,
/// the job and the read denies must be confirmed on the agent's own
/// process, and the network filters with it (`tested`).
#[must_use]
pub fn missing(&self, launched: bool) -> bool {
if !self.configured || !self.available {
return false;
}
let reported_off = self.applied == Some(false) || self.tested == Some(false);
let confirmed = match self.name {
Mechanism::Seccomp
| Mechanism::NoNewPrivs
| Mechanism::RestrictedToken
| Mechanism::AgentAccount
| Mechanism::WindowsReadDeny
| Mechanism::WfpNetwork
| Mechanism::JobObject => self.tested == Some(true),
Mechanism::LandlockFilesystem
| Mechanism::LandlockTcpPort
| Mechanism::NetworkNamespace
| Mechanism::IsolatedView => self.applied == Some(true),
Mechanism::LandlockScopes
| Mechanism::LandlockResolveUnix
| Mechanism::LandlockUdp
| Mechanism::Seatbelt => true,
// the microVM tier is not built: nothing reports it (ADR-128)
Mechanism::VmHypervisor
| Mechanism::VmProjectOnly
| Mechanism::VmProxyNetwork
| Mechanism::VmGuardRelay
| Mechanism::VmImagePinned => false,
};
reported_off || (launched && !confirmed)
}
}
/// What the launch reported, from the process that started the agent: the
/// result of `restrict_self` and the seccomp filters, and the agent's
/// `/proc/<pid>/status` read after it started.
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub struct LaunchCheck {
/// The kernel's Landlock ABI, as `restrict_self` reported it.
pub landlock_abi: Option<u32>,
/// The ruleset's enforcement, as `restrict_self` reported it.
pub landlock: Option<Enforcement>,
/// `restrict_self` set `no_new_privs`.
pub no_new_privs_set: Option<bool>,
/// How many seccomp filters were applied.
pub seccomp_filters: Option<u32>,
/// The `Seccomp_filters:` count of the thread that started the agent,
/// before it applied them: filters a parent (a container runtime, a
/// service manager) had already set.
pub inherited_seccomp_filters: Option<u32>,
/// The agent's `Seccomp_filters:` count.
pub proc_seccomp_filters: Option<u32>,
/// The agent's `NoNewPrivs:` line read `1`. It may have been set by a
/// parent already; what counts is that it is in force.
pub proc_no_new_privs: Option<bool>,
/// The agent's `Seccomp:` line read `2` (filter mode) and its filter count
/// is the inherited count plus the filters applied, so the filters in
/// force include this run's, not only a parent's.
pub proc_seccomp_filter: Option<bool>,
/// The report came from `openmoat isolated` inside bubblewrap.
pub in_bubblewrap: bool,
/// Windows: the agent's process was created with the write-restricted
/// token (`CreateProcessAsUserW` took it); absent from other records.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub restricted_token: Option<bool>,
/// Windows: the agent's own token, read back before it ran, is restricted
/// (`IsTokenRestricted`).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub agent_token_restricted: Option<bool>,
/// Windows: the agent was put in the run's kill-on-close job before it ran.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub job_object: Option<bool>,
/// Windows: the agent's process, checked before it ran, is in that job
/// (`IsProcessInJob`).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub agent_in_job: Option<bool>,
/// Windows: the agent was started as OpenMoat's agent account
/// (`CreateProcessWithLogonW`, ADR-129).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub agent_account: Option<bool>,
/// Windows: the user of the agent's own token, read back before it ran,
/// is the account's SID that `openmoat agent-account setup` recorded.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub agent_token_account: Option<bool>,
/// Windows: the deny entries for the account on the places the policy's
/// read denies name were set before the agent started.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub read_denies: Option<bool>,
/// Windows: the agent account's network filters were read back from the
/// system as `openmoat agent-account setup` recorded them, before the
/// agent started, and the proxy listens on their permitted range.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub wfp_filters: Option<bool>,
/// Why the launch was stopped, when it was.
pub failure: Option<String>,
}
impl LaunchCheck {
/// What the tier promises and the check found missing on Linux: a ruleset
/// not enforced, `no_new_privs` or the seccomp filter not in force in the
/// agent. Empty when everything is in force.
#[must_use]
pub fn linux_gaps(&self) -> Vec<&'static str> {
let mut gaps = Vec::new();
if self.landlock != Some(Enforcement::Full) && self.landlock != Some(Enforcement::Partial) {
gaps.push("the Landlock rules are not enforced");
}
if self.proc_no_new_privs != Some(true) {
gaps.push("the agent's /proc status does not show `NoNewPrivs: 1`");
}
if self.proc_seccomp_filter != Some(true) {
gaps.push(
"the agent's /proc status does not show `Seccomp: 2` with this run's filters \
added to the inherited ones (`Seccomp_filters`)",
);
}
gaps
}
/// The check's failure: the one the reporting process gave, else the
/// [`Self::linux_gaps`] found here, so a report is never taken on trust.
#[must_use]
pub fn linux_failure(&self) -> Option<String> {
let gaps = self.linux_gaps();
self.failure
.clone()
.or_else(|| (!gaps.is_empty()).then(|| gaps.join("; ")))
}
}
impl EffectiveBoundary {
/// Whether anything is weaker than the full boundary.
#[must_use]
pub fn downgraded(&self) -> bool {
!self.downgrades.is_empty()
}
/// The restriction named `name`, if the platform has it.
#[must_use]
pub fn restriction(&self, name: Mechanism) -> Option<&Restriction> {
self.restrictions.iter().find(|r| r.name == name)
}
/// Fold what the launch reported into the record: what applied, what the
/// check after the start confirmed, and the ABI `restrict_self` saw in
/// place of the probe's.
pub fn launched(&mut self, check: LaunchCheck) {
if let Some(landlock) = &mut self.landlock {
if check.landlock_abi.is_some() {
landlock.abi = check.landlock_abi;
}
landlock.enforcement = check.landlock;
}
let abi = self.landlock.as_ref().and_then(|l| l.abi);
let enforced = check.landlock.map(|e| e != Enforcement::None);
// A step the kernel's ABI lacks is not applied, whatever the ruleset
// reports. One the kernel has applies only when the ruleset is fully
// enforced; a partial one may lack exactly that step, so it is unknown.
let step = |from: u32| match (check.landlock, abi) {
(Some(Enforcement::None), _) => Some(false),
(_, Some(abi)) if abi < from => Some(false),
(Some(Enforcement::Full), Some(_)) => Some(true),
_ => None,
};
for restriction in &mut self.restrictions {
let (applied, tested) = match restriction.name {
Mechanism::LandlockFilesystem | Mechanism::LandlockTcpPort => (enforced, None),
Mechanism::LandlockScopes => (step(6), None),
Mechanism::LandlockResolveUnix => (step(9), None),
Mechanism::LandlockUdp => (step(10), None),
Mechanism::Seccomp => (
check.seccomp_filters.map(|n| n > 0),
check.proc_seccomp_filter,
),
Mechanism::NoNewPrivs => (check.no_new_privs_set, check.proc_no_new_privs),
Mechanism::NetworkNamespace | Mechanism::IsolatedView => {
(Some(check.in_bubblewrap), None)
}
Mechanism::RestrictedToken => {
(check.restricted_token, check.agent_token_restricted)
}
Mechanism::JobObject => (check.job_object, check.agent_in_job),
Mechanism::AgentAccount => (check.agent_account, check.agent_token_account),
// The entries name the account: in force once the agent is it.
Mechanism::WindowsReadDeny => (check.read_denies, check.agent_token_account),
// The filters name the account too: in force once the agent is it.
Mechanism::WfpNetwork => (
check.wfp_filters,
check
.wfp_filters
.zip(check.agent_token_account)
.map(|(filters, account)| filters && account),
),
Mechanism::Seatbelt
| Mechanism::VmHypervisor
| Mechanism::VmProjectOnly
| Mechanism::VmProxyNetwork
| Mechanism::VmGuardRelay
| Mechanism::VmImagePinned => (None, None),
};
if restriction.configured {
restriction.applied = applied;
restriction.tested = tested;
}
}
self.launch = Some(check);
self.rescore();
}
/// Work out [`Self::score`] from the record as it stands.
pub fn rescore(&mut self) {
self.score = Some(score::of(self));
}
/// The restrictions the run asked for, the system has, and the launch
/// found missing; with the launch's own failure, if it stopped the agent.
#[must_use]
pub fn missing(&self) -> Vec<String> {
let mut missing: Vec<String> = self
.restrictions
.iter()
.filter(|r| r.missing(self.launch.is_some()))
.map(|r| r.name.id().to_owned())
.collect();
if let Some(failure) = self.launch.as_ref().and_then(|l| l.failure.clone()) {
missing.push(failure);
}
missing
}
}
#[cfg(test)]
mod tests;