mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-30 07:14:20 +00:00
Co-authored-by: Víctor Fernández Poyatos <victor@prowler.com>
161 lines
3.3 KiB
TypeScript
161 lines
3.3 KiB
TypeScript
export type RequirementStatus = "PASS" | "FAIL" | "MANUAL" | "No findings";
|
|
|
|
export type ComplianceId =
|
|
| "ens_rd2022_aws"
|
|
| "iso27001_2013_aws"
|
|
| "iso27001_2022_aws"
|
|
| "cis_1.4_aws"
|
|
| "cis_1.5_aws"
|
|
| "cis_2.0_aws"
|
|
| "cis_3.0_aws"
|
|
| "cis_4.0_aws"
|
|
| "cis_5.0_aws";
|
|
|
|
export interface CompliancesOverview {
|
|
data: ComplianceOverviewData[];
|
|
}
|
|
|
|
export interface ComplianceOverviewData {
|
|
type: "compliance-requirements-status";
|
|
id: string;
|
|
attributes: {
|
|
framework: string;
|
|
version: string;
|
|
requirements_passed: number;
|
|
requirements_failed: number;
|
|
requirements_manual: number;
|
|
total_requirements: number;
|
|
};
|
|
}
|
|
|
|
export interface Requirement {
|
|
name: string;
|
|
description: string;
|
|
status: RequirementStatus;
|
|
pass: number;
|
|
fail: number;
|
|
manual: number;
|
|
check_ids: string[];
|
|
// This is to allow any key to be added to the requirement object
|
|
// because each compliance has different keys
|
|
[key: string]: string | string[] | number | undefined;
|
|
}
|
|
|
|
export interface Control {
|
|
label: string;
|
|
pass: number;
|
|
fail: number;
|
|
manual: number;
|
|
requirements: Requirement[];
|
|
}
|
|
|
|
export interface Category {
|
|
name: string;
|
|
pass: number;
|
|
fail: number;
|
|
manual: number;
|
|
controls: Control[];
|
|
}
|
|
|
|
export interface Framework {
|
|
name: string;
|
|
pass: number;
|
|
fail: number;
|
|
manual: number;
|
|
categories: Category[];
|
|
}
|
|
|
|
export interface FailedSection {
|
|
name: string;
|
|
total: number;
|
|
types?: { [key: string]: number };
|
|
}
|
|
|
|
export interface RequirementsTotals {
|
|
pass: number;
|
|
fail: number;
|
|
manual: number;
|
|
}
|
|
|
|
// API Responses types:
|
|
export interface ENSAttributesMetadata {
|
|
IdGrupoControl: string;
|
|
Marco: string;
|
|
Categoria: string;
|
|
DescripcionControl: string;
|
|
Tipo: string;
|
|
Nivel: string;
|
|
Dimensiones: string[];
|
|
ModoEjecucion: string;
|
|
Dependencias: any[];
|
|
}
|
|
|
|
export interface ISO27001AttributesMetadata {
|
|
Category: string;
|
|
Objetive_ID: string;
|
|
Objetive_Name: string;
|
|
Check_Summary: string;
|
|
}
|
|
|
|
export interface CISAttributesMetadata {
|
|
Section: string;
|
|
SubSection: string | null;
|
|
Profile: string; // "Level 1" or "Level 2"
|
|
AssessmentStatus: string; // "Manual" or "Automated"
|
|
Description: string;
|
|
RationaleStatement: string;
|
|
ImpactStatement: string;
|
|
RemediationProcedure: string;
|
|
AuditProcedure: string;
|
|
AdditionalInformation: string;
|
|
DefaultValue: string | null;
|
|
References: string;
|
|
}
|
|
|
|
export interface AttributesItemData {
|
|
type: "compliance-requirements-attributes";
|
|
id: string;
|
|
attributes: {
|
|
framework: string;
|
|
version: string;
|
|
description: string;
|
|
attributes: {
|
|
metadata: ENSAttributesMetadata[] | ISO27001AttributesMetadata[];
|
|
check_ids: string[];
|
|
};
|
|
};
|
|
}
|
|
|
|
export interface RequirementItemData {
|
|
type: "compliance-requirements-details";
|
|
id: string;
|
|
attributes: {
|
|
framework: string;
|
|
version: string;
|
|
description: string;
|
|
status: RequirementStatus;
|
|
};
|
|
}
|
|
|
|
export interface AttributesData {
|
|
data: AttributesItemData[];
|
|
}
|
|
|
|
export interface RequirementsData {
|
|
data: RequirementItemData[];
|
|
}
|
|
|
|
export interface RegionData {
|
|
name: string;
|
|
failurePercentage: number;
|
|
totalRequirements: number;
|
|
failedRequirements: number;
|
|
}
|
|
|
|
export interface CategoryData {
|
|
name: string;
|
|
failurePercentage: number;
|
|
totalRequirements: number;
|
|
failedRequirements: number;
|
|
}
|