Skip to content

Commit

Permalink
fix up threat type in threats by context
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Gadsden committed Nov 10, 2021
1 parent 42fa3a4 commit 5106b37
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions td.desktop/core/services/threatengine.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,59 @@ function threatengine() {
return results.events.map(function(result) {
/* fix up for STRIDE / CIA / LINDDUN */
result.params.modelType = modelType;
switch (result.params.type) {
case 'Linkability':
if (modelType == 'STRIDE') {
result.params.type = 'Information disclosure';
} else if (modelType == 'CIA') {
result.params.type = 'Confidentiality';
}
break;
case 'Identifiability':
if (modelType == 'STRIDE') {
result.params.type = 'Spoofing';
} else if (modelType == 'CIA') {
result.params.type = 'Confidentiality';
}
break;
case 'Repudiation':
if (modelType == 'LINDDUN') {
result.params.type = 'Non-repudiation';
} else if (modelType == 'CIA') {
result.params.type = 'Integrity';
}
break;
case 'Detectability':
if (modelType == 'STRIDE') {
result.params.type = 'Information disclosure';
} else if (modelType == 'CIA') {
result.params.type = 'Confidentiality';
}
break;
case 'Disclosure':
if (modelType == 'LINDDUN') {
result.params.type = 'Disclosure of information';
} else if (modelType == 'STRIDE') {
result.params.type = 'Information disclosure';
} else if (modelType == 'CIA') {
result.params.type = 'Confidentiality';
}
break;
case 'Unawareness':
if (modelType == 'STRIDE') {
result.params.type = 'Elevation of privilege';
} else if (modelType == 'CIA') {
result.params.type = 'Integrity';
}
break;
case 'Tampering':
if (modelType == 'LINDDUN') {
result.params.type = 'Non-compliance';
} else if (modelType == 'CIA') {
result.params.type = 'Integrity';
}
break;
}
return result.params;
});
}
Expand Down

0 comments on commit 5106b37

Please sign in to comment.