mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
Merge pull request #7383 from rcordovano/develop
7895 reformat central repository source files
This commit is contained in:
commit
f7890d260a
@ -256,10 +256,12 @@ public class IngestEventsListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a "previously seen" hit for a device which was previously seen
|
* Create a "previously seen" hit for a device which was previously seen in
|
||||||
* in the central repository. NOTE: Artifacts that are too common will be skipped.
|
* the central repository. NOTE: Artifacts that are too common will be
|
||||||
|
* skipped.
|
||||||
*
|
*
|
||||||
* @param originalArtifact the artifact to create the "previously seen" item for
|
* @param originalArtifact the artifact to create the "previously seen" item
|
||||||
|
* for
|
||||||
* @param caseDisplayNames the case names the artifact was previously seen
|
* @param caseDisplayNames the case names the artifact was previously seen
|
||||||
* in
|
* in
|
||||||
* @param aType The correlation type.
|
* @param aType The correlation type.
|
||||||
@ -303,22 +305,22 @@ public class IngestEventsListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a "previously unseen" hit for an application which was never seen in
|
* Create a "previously unseen" hit for an application which was never seen
|
||||||
* the central repository.
|
* in the central repository.
|
||||||
*
|
*
|
||||||
* @param originalArtifact the artifact to create the "previously unseen" item
|
* @param originalArtifact the artifact to create the "previously unseen"
|
||||||
* for
|
* item for
|
||||||
* @param aType The correlation type.
|
* @param aType The correlation type.
|
||||||
* @param value The correlation value.
|
* @param value The correlation value.
|
||||||
*/
|
*/
|
||||||
static private void makeAndPostPreviouslyUnseenArtifact(BlackboardArtifact originalArtifact, CorrelationAttributeInstance.Type aType, String value) {
|
static private void makeAndPostPreviouslyUnseenArtifact(BlackboardArtifact originalArtifact, CorrelationAttributeInstance.Type aType, String value) {
|
||||||
Collection<BlackboardAttribute> attributesForNewArtifact = Arrays.asList(
|
Collection<BlackboardAttribute> attributesForNewArtifact = Arrays.asList(
|
||||||
new BlackboardAttribute(
|
new BlackboardAttribute(
|
||||||
TSK_CORRELATION_TYPE, MODULE_NAME,
|
TSK_CORRELATION_TYPE, MODULE_NAME,
|
||||||
aType.getDisplayName()),
|
aType.getDisplayName()),
|
||||||
new BlackboardAttribute(
|
new BlackboardAttribute(
|
||||||
TSK_CORRELATION_VALUE, MODULE_NAME,
|
TSK_CORRELATION_VALUE, MODULE_NAME,
|
||||||
value));
|
value));
|
||||||
makeAndPostArtifact(BlackboardArtifact.Type.TSK_PREVIOUSLY_UNSEEN, originalArtifact, attributesForNewArtifact, "",
|
makeAndPostArtifact(BlackboardArtifact.Type.TSK_PREVIOUSLY_UNSEEN, originalArtifact, attributesForNewArtifact, "",
|
||||||
Score.SCORE_LIKELY_NOTABLE, "This application has not been previously seen before");
|
Score.SCORE_LIKELY_NOTABLE, "This application has not been previously seen before");
|
||||||
}
|
}
|
||||||
@ -329,8 +331,10 @@ public class IngestEventsListener {
|
|||||||
* @param newArtifactType Type of artifact to create.
|
* @param newArtifactType Type of artifact to create.
|
||||||
* @param originalArtifact Artifact in current case we want to flag
|
* @param originalArtifact Artifact in current case we want to flag
|
||||||
* @param attributesForNewArtifact Attributes to assign to the new artifact
|
* @param attributesForNewArtifact Attributes to assign to the new artifact
|
||||||
* @param configuration The configuration to be specified for the new artifact hit
|
* @param configuration The configuration to be specified for the
|
||||||
* @param score sleuthkit.datamodel.Score to be assigned to this artifact
|
* new artifact hit
|
||||||
|
* @param score sleuthkit.datamodel.Score to be assigned
|
||||||
|
* to this artifact
|
||||||
* @param justification Justification string
|
* @param justification Justification string
|
||||||
*/
|
*/
|
||||||
private static void makeAndPostArtifact(BlackboardArtifact.Type newArtifactType, BlackboardArtifact originalArtifact, Collection<BlackboardAttribute> attributesForNewArtifact, String configuration,
|
private static void makeAndPostArtifact(BlackboardArtifact.Type newArtifactType, BlackboardArtifact originalArtifact, Collection<BlackboardAttribute> attributesForNewArtifact, String configuration,
|
||||||
@ -341,7 +345,7 @@ public class IngestEventsListener {
|
|||||||
// Create artifact if it doesn't already exist.
|
// Create artifact if it doesn't already exist.
|
||||||
BlackboardArtifact.ARTIFACT_TYPE type = BlackboardArtifact.ARTIFACT_TYPE.fromID(newArtifactType.getTypeID());
|
BlackboardArtifact.ARTIFACT_TYPE type = BlackboardArtifact.ARTIFACT_TYPE.fromID(newArtifactType.getTypeID());
|
||||||
if (!blackboard.artifactExists(originalArtifact, type, attributesForNewArtifact)) {
|
if (!blackboard.artifactExists(originalArtifact, type, attributesForNewArtifact)) {
|
||||||
BlackboardArtifact newArtifact = originalArtifact.newAnalysisResult(
|
BlackboardArtifact newArtifact = originalArtifact.newAnalysisResult(
|
||||||
newArtifactType, score,
|
newArtifactType, score,
|
||||||
null, configuration, justification, attributesForNewArtifact)
|
null, configuration, justification, attributesForNewArtifact)
|
||||||
.getAnalysisResult();
|
.getAnalysisResult();
|
||||||
@ -549,8 +553,8 @@ public class IngestEventsListener {
|
|||||||
for (BlackboardArtifact bbArtifact : bbArtifacts) {
|
for (BlackboardArtifact bbArtifact : bbArtifacts) {
|
||||||
// makeCorrAttrToSave will filter out artifacts which should not be sources of CR data.
|
// makeCorrAttrToSave will filter out artifacts which should not be sources of CR data.
|
||||||
List<CorrelationAttributeInstance> convertedArtifacts = new ArrayList<>();
|
List<CorrelationAttributeInstance> convertedArtifacts = new ArrayList<>();
|
||||||
if (bbArtifact instanceof DataArtifact){
|
if (bbArtifact instanceof DataArtifact) {
|
||||||
convertedArtifacts.addAll(CorrelationAttributeUtil.makeCorrAttrsToSave((DataArtifact)bbArtifact));
|
convertedArtifacts.addAll(CorrelationAttributeUtil.makeCorrAttrsToSave((DataArtifact) bbArtifact));
|
||||||
}
|
}
|
||||||
for (CorrelationAttributeInstance eamArtifact : convertedArtifacts) {
|
for (CorrelationAttributeInstance eamArtifact : convertedArtifacts) {
|
||||||
try {
|
try {
|
||||||
|
@ -64,7 +64,7 @@ public class CentralRepoIngestModuleFactory extends IngestModuleFactoryAdapter {
|
|||||||
return Version.getVersion();
|
return Version.getVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isFileIngestModuleFactory() {
|
public boolean isFileIngestModuleFactory() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user