verifyos_cli/rules/
privacy.rs1use crate::rules::core::{AppStoreRule, ArtifactContext, RuleError, RuleResult, Severity};
2
3pub struct MissingPrivacyManifestRule;
4
5impl AppStoreRule for MissingPrivacyManifestRule {
6 fn id(&self) -> &'static str {
7 "RULE_PRIVACY_MANIFEST"
8 }
9
10 fn name(&self) -> &'static str {
11 "Missing Privacy Manifest"
12 }
13
14 fn severity(&self) -> Severity {
15 Severity::Error
16 }
17
18 fn evaluate(&self, artifact: &ArtifactContext) -> Result<RuleResult, RuleError> {
19 let manifest_path = artifact.app_bundle_path.join("PrivacyInfo.xcprivacy");
20 if !manifest_path.exists() {
21 return Err(RuleError::MissingPrivacyManifest);
22 }
23
24 Ok(RuleResult { success: true })
25 }
26}