Skip to content

Commit 5aeffdc

Browse files
committed
feat: add security requirements to vuln report
1 parent f17764a commit 5aeffdc

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

crates/forge_analyzer/src/checkers.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ impl IntoVuln for AuthZVuln {
453453
severity: Severity::High,
454454
app_key: reporter.app_key().to_owned(),
455455
app_name: reporter.app_name().to_owned(),
456+
marketplace_security_requirement: "Requirement 1.2",
456457
date: reporter.current_date(),
457458
}
458459
}
@@ -733,6 +734,7 @@ impl IntoVuln for AuthNVuln {
733734
severity: Severity::High,
734735
app_key: reporter.app_key().to_owned(),
735736
app_name: reporter.app_name().to_owned(),
737+
marketplace_security_requirement: "Requirement 1.1",
736738
date: reporter.current_date(),
737739
}
738740
}
@@ -904,6 +906,7 @@ impl IntoVuln for SecretVuln {
904906
recommendation: "Use secrets as enviornment variables instead of hardcoding them.",
905907
proof: format!("Hardcoded secret found in found via {}", self.stack),
906908
severity: Severity::High,
909+
marketplace_security_requirement: "Requirement 2.5",
907910
app_key: reporter.app_key().to_owned(),
908911
app_name: reporter.app_name().to_owned(),
909912
date: reporter.current_date(),
@@ -1333,6 +1336,7 @@ impl IntoVuln for PermissionVuln<'_> {
13331336
severity: Severity::Low,
13341337
app_key: reporter.app_key().to_string(),
13351338
app_name: reporter.app_name().to_string(),
1339+
marketplace_security_requirement: "Requirement 2.4",
13361340
date: reporter.current_date(),
13371341
}
13381342
}

crates/forge_analyzer/src/reporter.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ pub struct Vulnerability {
1919
pub(crate) severity: Severity,
2020
pub(crate) app_key: String,
2121
pub(crate) app_name: String,
22+
pub(crate) marketplace_security_requirement: &'static str,
2223
pub(crate) date: Date,
2324
}
2425

crates/fsrt/src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,6 @@ pub(crate) fn scan_directory<'a>(
366366
) -> Result<Report> {
367367
let paths = project.get_paths();
368368
let manifest = project.get_manifest();
369-
let id = manifest.app.id;
370369
let requested_permissions = manifest.permissions;
371370
let permissions_declared = requested_permissions
372371
.scopes

0 commit comments

Comments
 (0)