pub struct PrivilegeReview { /* private fields */ }Expand description
What a definition actually grants, measured against the requirement.
05-infrastructure.md item 2 and 07-security.md’s release gate
(“Service account permissions are documented and verified least
privilege”) are the same requirement stated twice, and this is the
verification half. The documentation half is docs/service-account.md.
The review reads the rendered text, not the plan it came from. That is deliberate and it is the only version of this check worth having: a review that re-derived its expectations from the same values the renderer used would agree with the renderer by construction and could never fail. Reading the text means a hand-edited unit on a real host is reviewed as it is, and means a test can widen a definition and watch this say so.
Implementations§
Source§impl PrivilegeReview
impl PrivilegeReview
Sourcepub fn is_least_privilege(&self) -> bool
pub fn is_least_privilege(&self) -> bool
Whether the definition grants nothing beyond the requirement.
Sourcepub fn findings(&self) -> &[PrivilegeFinding]
pub fn findings(&self) -> &[PrivilegeFinding]
Everything the review found, excesses and shortfalls together.
Sourcepub fn excesses(&self) -> Vec<&PrivilegeFinding>
pub fn excesses(&self) -> Vec<&PrivilegeFinding>
Only the excesses — the findings that make Self::is_least_privilege
false.
Sourcepub fn controls(&self) -> &[String]
pub fn controls(&self) -> &[String]
The controls the definition was confirmed to carry.
Present so that a passing review says what it checked rather than only that it passed. A check that reports nothing when it succeeds is indistinguishable from a check that did not run.
Sourcepub const fn account(&self) -> &ServiceAccount
pub const fn account(&self) -> &ServiceAccount
The account the registration runs under, and why it is the minimum.
Sourcepub const fn kind(&self) -> DefinitionKind
pub const fn kind(&self) -> DefinitionKind
Which platform’s definition was reviewed.
Trait Implementations§
Source§impl Clone for PrivilegeReview
impl Clone for PrivilegeReview
Source§fn clone(&self) -> PrivilegeReview
fn clone(&self) -> PrivilegeReview
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more