Skip to content

Commit

Permalink
ThreatsDataViews: Introduce controlled fields
Browse files Browse the repository at this point in the history
  • Loading branch information
nateweller committed Dec 24, 2024
1 parent a1018bf commit d2d28f2
Show file tree
Hide file tree
Showing 7 changed files with 516 additions and 374 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export const THREAT_ICONS = {
default: shieldIcon,
};

export const THREAT_FIELD_THREAT = 'threat';
export const THREAT_FIELD_TITLE = 'title';
export const THREAT_FIELD_DESCRIPTION = 'description';
export const THREAT_FIELD_ICON = 'icon';
Expand All @@ -45,22 +44,38 @@ export const THREAT_FIELD_FIRST_DETECTED = 'first-detected';
export const THREAT_FIELD_FIXED_ON = 'fixed-on';
export const THREAT_FIELD_AUTO_FIX = 'auto-fix';

export const DEFAULT_TABLE_FIELDS = [
THREAT_FIELD_SEVERITY,
THREAT_FIELD_THREAT,
/**
* DataViews fields relevant to vulnerable extension threats.
* Example: Threat results generated by the free Protect Report feature.
*/
export const VULNERABILITY_FIELDS = [
THREAT_FIELD_TITLE,
THREAT_FIELD_DESCRIPTION,
THREAT_FIELD_ICON,
THREAT_FIELD_TYPE,
THREAT_FIELD_FIRST_DETECTED,
THREAT_FIELD_FIXED_ON,
THREAT_FIELD_STATUS,
THREAT_FIELD_AUTO_FIX,
THREAT_FIELD_EXTENSION,
THREAT_FIELD_PLUGIN,
THREAT_FIELD_THEME,
];

export const DEFAULT_LIST_FIELDS = [
THREAT_FIELD_SEVERITY,
/**
* DataViews fields related to threats.
* Example: Threat results detected by Jetpack Scan.
*/
export const THREAT_FIELDS = [
THREAT_FIELD_TITLE,
THREAT_FIELD_DESCRIPTION,
THREAT_FIELD_ICON,
THREAT_FIELD_STATUS,
THREAT_FIELD_TYPE,
THREAT_FIELD_EXTENSION,
THREAT_FIELD_PLUGIN,
THREAT_FIELD_THEME,
THREAT_FIELD_SEVERITY,
THREAT_FIELD_SIGNATURE,
THREAT_FIELD_STATUS,
THREAT_FIELD_FIRST_DETECTED,
THREAT_FIELD_FIXED_ON,
THREAT_FIELD_AUTO_FIX,
];

export const THREAT_ACTION_FIX = 'fix';
Expand Down
Loading

0 comments on commit d2d28f2

Please sign in to comment.