ephemeris_forge_github/api/operations/
security.rs1use ephemeris_forge::RepoRef;
2
3use crate::api::error::ForgeError;
4use crate::api::model::CodeScanning;
5use crate::api::request::{AnalysisPatch, CodeScanningPatch};
6
7pub trait SecurityApi {
9 fn automated_security_fixes(
12 &self,
13 repository: &RepoRef,
14 ) -> impl Future<Output = Result<Option<bool>, ForgeError>> + Send;
15
16 fn code_scanning_default_setup(
19 &self,
20 repository: &RepoRef,
21 ) -> impl Future<Output = Result<Option<CodeScanning>, ForgeError>> + Send;
22
23 fn patch_code_scanning_default_setup(
25 &self,
26 repository: &RepoRef,
27 patch: &CodeScanningPatch,
28 ) -> impl Future<Output = Result<(), ForgeError>> + Send;
29
30 fn patch_security_analysis(
32 &self,
33 repository: &RepoRef,
34 patch: &AnalysisPatch,
35 ) -> impl Future<Output = Result<(), ForgeError>> + Send;
36
37 fn private_vulnerability_reporting(
40 &self,
41 repository: &RepoRef,
42 ) -> impl Future<Output = Result<Option<bool>, ForgeError>> + Send;
43
44 fn set_automated_security_fixes(
46 &self,
47 repository: &RepoRef,
48 enabled: bool,
49 ) -> impl Future<Output = Result<(), ForgeError>> + Send;
50
51 fn set_private_vulnerability_reporting(
53 &self,
54 repository: &RepoRef,
55 enabled: bool,
56 ) -> impl Future<Output = Result<(), ForgeError>> + Send;
57
58 fn set_vulnerability_alerts(
60 &self,
61 repository: &RepoRef,
62 enabled: bool,
63 ) -> impl Future<Output = Result<(), ForgeError>> + Send;
64
65 fn vulnerability_alerts(
68 &self,
69 repository: &RepoRef,
70 ) -> impl Future<Output = Result<Option<bool>, ForgeError>> + Send;
71}