Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DCSG2900-ThreatTotal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johannes Barstad
DCSG2900-ThreatTotal
Commits
902168f2
Commit
902168f2
authored
3 years ago
by
Johannes Barstad
Browse files
Options
Downloads
Patches
Plain Diff
fixed functionality for verdict translation
parent
b2ba6ba1
No related branches found
No related tags found
1 merge request
!2
Merge react-branch into main.
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
api/virustotal.go
+7
-3
7 additions, 3 deletions
api/virustotal.go
with
7 additions
and
3 deletions
api/virustotal.go
+
7
−
3
View file @
902168f2
...
...
@@ -101,13 +101,17 @@ func CallVirusTotal(id string) (response utils.ResultFrontendResponse, err error
// 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
{
response
.
EN
.
Result
=
"File has malicious indicators, consider escalating. "
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
{
response
.
EN
.
Result
=
"File has been confirmed benign."
response
.
EN
.
Result
=
"File has been confirmed benign. Further handling of the file is safe"
response
.
NO
.
Result
=
"Filen er bekreftet godartet, videre håndtering av fil er trygt."
}
else
{
response
.
EN
.
Result
=
"File is suspicious."
response
.
EN
.
Result
=
"File is suspicious. It is not recommended to further handle this file."
response
.
NO
.
Result
=
"Filen er mistenkelig. Det anbefales å ikke videre håndtere filen. "
}
var
engines
int
=
len
(
vtResponse
.
Data
.
Attributes
.
LastAnalysisResults
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment