mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-25 19:25:56 +00:00
feat(analyzer): enforce CoA module blocklist in analyzer and build engine
This commit is contained in:
1 parent
4e661e6986
commit
6bbdef1989
2 files changed
+19
No files matched your search
@@ -1185,6 +1185,22 @@ pub fn analyze_github_module_for_realm(
|
||||
let mut report = analyze_github_repository(url_str, cache_base_dir)?;
|
||||
report.sdk_fingerprint = Some(realm_sdk_fingerprint.clone());
|
||||
|
||||
if let Some(reason) = crate::catalogue::is_blocked_repo(url_str) {
|
||||
report.findings.push(CompatibilityFinding {
|
||||
rule_id: "COA_POLICY_BLOCKED".into(),
|
||||
severity: FindingSeverity::Critical,
|
||||
confidence: FindingConfidence::High,
|
||||
file: "repository".into(),
|
||||
line: 0,
|
||||
explanation: format!("This module is blocked by CoA project policy: {}", reason),
|
||||
recommended_action: "Installation of this repository is blocked due to known fatal issues or security risks.".into(),
|
||||
evidence: format!("Repository: {}, Block reason: {}", url_str, reason),
|
||||
is_auto_fixable: false,
|
||||
});
|
||||
report.classification = CompatibilityClassification::SourceIncompatible;
|
||||
report.reasons.push(format!("Blocked by CoA policy: {}", reason));
|
||||
}
|
||||
|
||||
let v03_fingerprint = SdkExportContract::v03().abi_fingerprint;
|
||||
if realm_sdk_fingerprint != v03_fingerprint {
|
||||
report.findings.push(CompatibilityFinding {
|
||||
|
||||
Reference in new issue
Block a user