pub struct CreateHackerReport {
pub team_handle: String,
pub title: String,
pub vulnerability_information: String,
pub impact: String,
pub severity_rating: Option<SeverityRating>,
pub weakness_id: Option<u64>,
pub structured_scope_id: Option<u64>,
}Expand description
A hacker report to create (POST /v1/hackers/reports).
Build it with the chainable methods, then submit it with
Client::create_report.
The JSON:API body this renders is exactly:
{
"data": {
"type": "report",
"attributes": {
"team_handle": "chia_network",
"title": "…",
"vulnerability_information": "…",
"impact": "…",
"severity_rating": "high",
"weakness_id": 1337,
"structured_scope_id": 57
}
}
}Fields§
§team_handle: StringProgram handle the report is submitted to (required), e.g. chia_network.
title: StringReport title (required).
vulnerability_information: StringDetailed write-up: steps to reproduce + supporting material (required).
impact: StringThe security impact an attacker could achieve (required).
severity_rating: Option<SeverityRating>Qualitative severity, one of the five documented ratings.
weakness_id: Option<u64>Weakness (CWE) object id.
structured_scope_id: Option<u64>Structured scope object id this report targets.
Implementations§
Source§impl CreateHackerReport
impl CreateHackerReport
Sourcepub fn new(team_handle: impl Into<String>, title: impl Into<String>) -> Self
pub fn new(team_handle: impl Into<String>, title: impl Into<String>) -> Self
A report for team_handle with title.
Sourcepub fn vulnerability_information(self, text: impl Into<String>) -> Self
pub fn vulnerability_information(self, text: impl Into<String>) -> Self
Set the vulnerability write-up (required by the API).
Sourcepub fn impact(self, text: impl Into<String>) -> Self
pub fn impact(self, text: impl Into<String>) -> Self
Set the impact statement (required by the API).
Sourcepub fn severity(self, rating: SeverityRating) -> Self
pub fn severity(self, rating: SeverityRating) -> Self
Set the severity rating.
Sourcepub fn weakness_id(self, id: u64) -> Self
pub fn weakness_id(self, id: u64) -> Self
Attach a weakness (CWE) id.
Sourcepub fn structured_scope_id(self, id: u64) -> Self
pub fn structured_scope_id(self, id: u64) -> Self
Pin the structured scope id.
Trait Implementations§
Source§impl Clone for CreateHackerReport
impl Clone for CreateHackerReport
Source§impl Debug for CreateHackerReport
impl Debug for CreateHackerReport
Source§impl Default for CreateHackerReport
impl Default for CreateHackerReport
Source§impl PartialEq for CreateHackerReport
impl PartialEq for CreateHackerReport
impl StructuralPartialEq for CreateHackerReport
Auto Trait Implementations§
impl Freeze for CreateHackerReport
impl RefUnwindSafe for CreateHackerReport
impl Send for CreateHackerReport
impl Sync for CreateHackerReport
impl Unpin for CreateHackerReport
impl UnsafeUnpin for CreateHackerReport
impl UnwindSafe for CreateHackerReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more