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
049de71b
Commit
049de71b
authored
3 years ago
by
Johannes Barstad
Browse files
Options
Downloads
Patches
Plain Diff
small typo in checking for assessements, fixed
parent
b0cac9bd
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
+1
-3
1 addition, 3 deletions
api/virustotal.go
with
1 addition
and
3 deletions
api/virustotal.go
+
1
−
3
View file @
049de71b
...
...
@@ -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
.
TotalVote
s
.
Malicious
>
0
&&
vtResponse
.
Data
.
Attributes
.
LastAnalysisStats
.
Suspicious
>=
0
{
}
else
if
vtResponse
.
Data
.
Attributes
.
LastAnalysisStat
s
.
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
{
...
...
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