-
Notifications
You must be signed in to change notification settings - Fork 72
Expand file tree
/
Copy pathSecurityMapAssessment.tsx
More file actions
40 lines (39 loc) · 1.12 KB
/
Copy pathSecurityMapAssessment.tsx
File metadata and controls
40 lines (39 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import {
ASSESSMENT_STATE_LABELS,
ASSESSMENT_STATES,
type AssessmentState,
} from "./types";
export function SecurityMapAssessment({
controlId,
state,
onAssess,
}: {
controlId: string;
state: AssessmentState;
onAssess: (id: string, next: AssessmentState) => void;
}) {
return (
<div className="sm-assess">
<fieldset>
<legend>Local control assessment</legend>
{ASSESSMENT_STATES.map((value) => (
<label key={value}>
<input
type="radio"
name={`sm-assess-${controlId}`}
value={value}
checked={state === value}
onChange={() => onAssess(controlId, value)}
/>{" "}
{ASSESSMENT_STATE_LABELS[value]}
</label>
))}
</fieldset>
<p className="sm-privacy">
<strong>Stored in this browser.</strong> The Security Map does not upload assessments.
Exported files may reveal security weaknesses. Implemented means you believe the control
is deployed. Verified means you checked it. Neither proves a threat is gone.
</p>
</div>
);
}