Skip to content
Snippets Groups Projects
Commit 049de71b authored by Johannes Barstad's avatar Johannes Barstad
Browse files

small typo in checking for assessements, fixed

parent b0cac9bd
No related branches found
No related tags found
1 merge request!2Merge react-branch into main.
......@@ -101,15 +101,13 @@ func CallVirusTotal(id string) (response utils.ResultFrontendResponse, err error
totalDanger := vtResponse.Data.Attributes.LastAnalysisStats.Malicious + vtResponse.Data.Attributes.LastAnalysisStats.Suspicious
response.FrontendResponse = sortDanger(testStruct2, totalDanger, i-totalDanger)
// IMPORTANT TODO, FIGURE ROUTING
// Possible to add more cases in the future, for more accurate assessements
// very realisitc that we need more cases, too narrow for accurate results per now.
if vtResponse.Data.Attributes.LastAnalysisStats.Malicious == 0 && vtResponse.Data.Attributes.LastAnalysisStats.Suspicious == 0 {
response.EN.Result = "File is safe."
response.NO.Result = "Filen er trygg"
// osv response.EN.Result = fmt.Sprintf("File is considered safe", x av y)
} else if vtResponse.Data.Attributes.TotalVotes.Malicious > 0 && vtResponse.Data.Attributes.LastAnalysisStats.Suspicious >= 0 {
} else if vtResponse.Data.Attributes.LastAnalysisStats.Malicious > 0 && vtResponse.Data.Attributes.LastAnalysisStats.Suspicious >= 0 {
response.EN.Result = "File has malicious indicators, consider escalating to the NTNU SOC. "
response.NO.Result = "Filen har ondsinnede indikatorer, vennligst vurder å eskalere videre til NTNU SOC"
} else if vtResponse.Data.Attributes.LastAnalysisStats.Harmless > 0 && vtResponse.Data.Attributes.LastAnalysisStats.Malicious == 0 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment