Skip to content

Commit

Permalink
Merge pull request #90 from CybercentreCanada/hotfix/score_adj
Browse files Browse the repository at this point in the history
Make small adjustments to the scores
  • Loading branch information
cccs-sgaron authored Jul 13, 2021
2 parents 95166d2 + d7c2488 commit a030a64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/routes/submission/detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default function SubmissionDetail() {
// #1: Get heuristic score
if (section.heuristic.score < 0) {
hType = 'safe';
} else if (section.heuristic.score < 100) {
} else if (section.heuristic.score < 300) {
hType = 'info';
} else if (section.heuristic.score < 1000) {
hType = 'suspicious';
Expand Down
10 changes: 5 additions & 5 deletions src/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ export function scoreToVerdict(score: number | null) {
return 'malicious';
}

// Between 500 - 999 => highly suspicious
if (score >= 500) {
// Between 700 - 999 => Highly suspicious
if (score >= 700) {
return 'highly_suspicious';
}

// Between 100 - 999 => suspicious
if (score >= 100) {
// Between 300 - 699 => Suspicious
if (score >= 300) {
return 'suspicious';
}

Expand All @@ -26,7 +26,7 @@ export function scoreToVerdict(score: number | null) {
return 'safe';
}

// Between 0 and 99 => Unknown
// Between 0 and 299 => Informational
return 'info';
}

Expand Down

0 comments on commit a030a64

Please sign in to comment.