more interface updates (#16644)
More interface updates per API Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
This commit is contained in:
committed by
mostlikelee
co-authored by
Jacob Shandling
parent
9185b9594d
commit
4f15b24b07
@@ -17,7 +17,18 @@ const DEFAULT_VULNERABILITY: IVulnerability = {
|
||||
cve_description:
|
||||
"Microsoft Windows Support Diagnostic Tool (MSDT) Remote Code Execution Vulnerability.", // Available in Fleet Premium
|
||||
resolved_in_version: "", // Available in Fleet Premium
|
||||
os_versions: [],
|
||||
os_versions: [
|
||||
{
|
||||
os_version_id: 1,
|
||||
name: "bad version",
|
||||
name_only: "bad version",
|
||||
version: "1",
|
||||
platform: "windows",
|
||||
hosts_count: 5,
|
||||
resolved_in_version: "2",
|
||||
generated_cpes: [],
|
||||
},
|
||||
],
|
||||
software: [],
|
||||
};
|
||||
|
||||
|
||||
@@ -11,6 +11,11 @@ export interface IOperatingSystemVersion {
|
||||
vulnerabilities: ISoftwareVulnerability[];
|
||||
}
|
||||
|
||||
export type IVulnerabilityOSVersion = Omit<
|
||||
IOperatingSystemVersion,
|
||||
"vulnerabilities"
|
||||
> & { resolved_in_version: string };
|
||||
|
||||
export const OS_VENDOR_BY_PLATFORM: Record<string, string> = {
|
||||
darwin: "Apple",
|
||||
windows: "Microsoft",
|
||||
|
||||
@@ -39,6 +39,8 @@ export interface ISoftware {
|
||||
installed_paths?: string[];
|
||||
}
|
||||
|
||||
export type IVulnerabilitySoftware = Omit<ISoftware, "vulnerabilities">;
|
||||
|
||||
export interface ISoftwareTitleVersion {
|
||||
id: number;
|
||||
version: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
import { IOperatingSystemVersion } from "./operating_system";
|
||||
import { ISoftware } from "./software";
|
||||
import { IVulnerabilityOSVersion } from "./operating_system";
|
||||
import { IVulnerabilitySoftware } from "./software";
|
||||
|
||||
export default PropTypes.shape({
|
||||
cve: PropTypes.string,
|
||||
@@ -19,6 +19,6 @@ export interface IVulnerability {
|
||||
cve_published?: string; // premium
|
||||
cve_description?: string; // premium
|
||||
resolved_in_version?: string; // premium
|
||||
os_versions: Omit<IOperatingSystemVersion, "vulnerabilities">[];
|
||||
software: Omit<ISoftware, "vulnerabilities">[];
|
||||
os_versions: IVulnerabilityOSVersion[];
|
||||
software: IVulnerabilitySoftware[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user