MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / destructive_actions_for_scopes

Method destructive_actions_for_scopes

crates/openshell-prover/src/credentials.rs:119–127  ·  view source on GitHub ↗

Destructive actions (high or critical risk) enabled by the given scopes.

(&self, scopes: &[String])

Source from the content-addressed store, hash-verified

117
118 /// Destructive actions (high or critical risk) enabled by the given scopes.
119 pub fn destructive_actions_for_scopes(&self, scopes: &[String]) -> Vec<&ApiAction> {
120 self.actions_for_scopes(scopes)
121 .into_iter()
122 .filter(|a| {
123 let risk = self.action_risk.get(&a.action).map(String::as_str);
124 matches!(risk, Some("high" | "critical"))
125 })
126 .collect()
127 }
128}
129
130/// Combined set of credentials and API registries.

Callers 1

encode_credentialsMethod · 0.80

Calls 2

actions_for_scopesMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected