Autopsy  4.21.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
CTScore.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2023 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package com.basistech.df.cybertriage.autopsy.ctapi.json;
20 
21 import com.google.common.base.MoreObjects;
22 import static com.google.common.base.Preconditions.checkArgument;
23 import org.sleuthkit.datamodel.Score;
24 import org.sleuthkit.datamodel.Score.Priority;
25 import org.sleuthkit.datamodel.Score.Significance;
26 
34 public enum CTScore {
35 
36  /*
37  Enum names without method defaults to AUTO
38  NOTABLE -> NOTABLE
39  */
40 
41  // Unknown None
42  UNKNOWN(new Score(Significance.UNKNOWN, Priority.NORMAL)),
43  // GOOD_MEDIUM
44  LIKELY_NONE(new Score(Significance.LIKELY_NONE, Priority.NORMAL)),
45  // SUSPICIOUS_HIGH / BAD_MEDIUM
46  LIKELY_NOTABLE(new Score(Significance.LIKELY_NOTABLE, Priority.NORMAL)),
47  // GOOD_HIGH
48  NONE(new Score(Significance.NONE, Priority.NORMAL)),
49  // BAD_HIGH
50  NOTABLE(new Score(Significance.NOTABLE, Priority.NORMAL)),
51  // SUSPICIOUS (User flagged)
52  LIKELY_NOTABLE_MANUAL(new Score(Significance.LIKELY_NOTABLE, Priority.OVERRIDE)),
53  // Good (User flagged)
54  NONE_MANUAL(new Score(Significance.NONE, Priority.OVERRIDE)),
55  // Bad (User flagged)
56  NOTABLE_MANUAL(new Score(Significance.NOTABLE, Priority.OVERRIDE));
57 
58 
59  private final Score tskScore;
60 
65  private CTScore(Score tskScore) {
66 
67  checkArgument(tskScore.getSignificance() == Significance.UNKNOWN ? tskScore.getPriority() == Priority.NORMAL : true, "Unknown Conclusions expects no (NORMAL) priority");
68  this.tskScore = tskScore;
69  }
70 
71  public Score getTskCore() {
72  return tskScore;
73  }
74 
75  @Override
76  public String toString() {
77  return MoreObjects.toStringHelper(this)
78  .add("Method Category", tskScore.getPriority())
79  .add("Significance", tskScore.getSignificance()).toString();
80  }
81 
82 }

Copyright © 2012-2022 Basis Technology. Generated on: Tue Feb 6 2024
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.