Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show element attributes in reports #1086

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,21 @@
width="200" alt="Threat Dragon Logo"/>
</p>

[![GitHub license](https://img.shields.io/github/license/owasp/threat-dragon.svg)](license.txt)
[![Build status](https://github.com/OWASP/threat-dragon/actions/workflows/push.yaml/badge.svg?event=push)][build]
[![GitHub release](https://img.shields.io/github/release/owasp/threat-dragon.svg)](https://github.com/owasp/threat-dragon/releases/latest)
[![OWASP Lab](https://img.shields.io/badge/owasp-lab%20project-f7b73c.svg)](https://www.owasp.org/projects)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9266/badge)](https://www.bestpractices.dev/projects/9266)

# OWASP Threat Dragon

[OWASP](https://www.owasp.org) Threat Dragon is a free, open-source, cross-platform threat modeling application.
[OWASP][owasp] [Threat Dragon][project] is a free, open-source, cross-platform threat modeling application.
It is used to draw threat modeling diagrams and to list threats for elements in the diagram.
[Mike Goodwin](https://github.com/mike-goodwin) created Threat Dragon as an open source community project
that provides an intuitive and accessible way to model threats.

Threat Dragon is designed to be accessible for various types of teams, with an emphasis on flexibility and simplicity.
It is an [OWASP Lab Project](https://owasp.org/www-project-threat-dragon/)
and follows the values and principles of the [threat modeling manifesto][manifesto].

[![GitHub license](https://img.shields.io/github/license/owasp/threat-dragon.svg)](license.txt)
It is an [OWASP Lab Project][project] and follows the values and principles of the [threat modeling manifesto][manifesto].

This program is free software: you can redistribute it and/or modify it
under the terms of the [Apache 2.0 License][license].
Expand Down Expand Up @@ -150,8 +148,7 @@ Using http port 8080 and accessing Threat Dragon on `http://localhost:8080/`.
Pull requests, feature requests, bug reports and feedback of any kind are very welcome,
please refer to the page for [contributors](contributing.md).

There are some [developer notes](https://owasp.org/www-project-threat-dragon/docs-2/local-development/)
to help get started with this project.
There are some [developer notes][notes] to help get started with this project.
We are trying to keep the test coverage relatively high so include tests in your pull requests.

The easiest way to get in contact with the Threat Dragon community is via the OWASP Slack
Expand Down Expand Up @@ -179,4 +176,7 @@ Threat Dragon: _making threat modeling less threatening_
[gitlab]: https://owasp.org/www-project-threat-dragon/docs-2/gitlab-repo/
[license]: https://github.com/OWASP/threat-dragon/blob/v2.2.0/license.txt
[manifesto]: https://www.threatmodelingmanifesto.org/
[notes]: https://owasp.org/www-project-threat-dragon/docs-2/local-development/
[owasp]: https://www.owasp.org
[project]: https://owasp.org/www-project-threat-dragon
[releases]: https://github.com/OWASP/threat-dragon/releases
1 change: 1 addition & 0 deletions td.vue/src/i18n/ar.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ const ara = {
showMitigatedThreats: 'إظهار التهديدات المُخففة',
showModelDiagrams: 'إظهار الرسوم التوضيحية للنموذج',
showEmpty: 'إظهار العناصر الفارغة',
showAttributes: 'Show element attributes',
showBranding: 'شعار تهديد التنين'
},
title: 'تقرير نموذج التهديد لـ',
Expand Down
1 change: 1 addition & 0 deletions td.vue/src/i18n/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ const deu = {
showMitigatedThreats: 'Abgeschwächte Bedrohungen anzeigen',
showModelDiagrams: 'Modell Diagramme anzeigen',
showEmpty: 'Leere Elemente anzeigen',
showAttributes: 'Show element attributes',
showBranding: 'Threat Dragon Logo'
},
title: 'Bedrohungsmodell Bereicht für',
Expand Down
1 change: 1 addition & 0 deletions td.vue/src/i18n/el.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ const ell = {
showMitigatedThreats: 'Εμφάνιση απειλών που έχουν μετριαστεί',
showModelDiagrams: 'Εμφάνιση διαγραμμάτων μοντέλων',
showEmpty: 'Προβολή κενών στοιχείων',
showAttributes: 'Show element attributes',
showBranding: 'Λογότυπο Threat Dragon'
},
title: 'Αναφορά μοντέλου απειλών για',
Expand Down
1 change: 1 addition & 0 deletions td.vue/src/i18n/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ const eng = {
showMitigatedThreats: 'Show mitigated threats',
showModelDiagrams: 'Show model diagrams',
showEmpty: 'Show empty elements',
showAttributes: 'Show element attributes',
showBranding: 'Threat Dragon logo'
},
title: 'Threat model report for',
Expand Down
1 change: 1 addition & 0 deletions td.vue/src/i18n/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ const spa = {
showMitigatedThreats: 'Mostrar amenazas mitigadas',
showModelDiagrams: 'Mostrar diagramas de modelo',
showEmpty: 'Show empty elements',
showAttributes: 'Show element attributes',
showBranding: 'Marca de Threat Dragon'
},
title: 'Reporte de modelo de amenaza para',
Expand Down
1 change: 1 addition & 0 deletions td.vue/src/i18n/fi.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ const fin = {
showMitigatedThreats: 'Näytä hallitut uhkat',
showModelDiagrams: 'Näytä uhkamallin kaaviot',
showEmpty: 'Näytä tyhjät elementit',
showAttributes: 'Show element attributes',
showBranding: 'Threat Dragon logo'
},
title: 'Uhkamallinnus kohteelle',
Expand Down
1 change: 1 addition & 0 deletions td.vue/src/i18n/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ const fra = {
showMitigatedThreats: 'Afficher les menaces mitigées',
showModelDiagrams: 'Afficher les diagrammes du modèle',
showEmpty: 'Show empty elements',
showAttributes: 'Show element attributes',
showBranding: 'Icône de Threat Dragon'
},
title: 'Rapport sur le modèle de menace pour',
Expand Down
1 change: 1 addition & 0 deletions td.vue/src/i18n/hi.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ const hin = {
showMitigatedThreats: 'कम किए गए खतरे दिखाएं',
showModelDiagrams: 'मॉडल आरेख दिखाएं',
showEmpty: 'खाली तत्व दिखाएं',
showAttributes: 'Show element attributes',
showBranding: 'शो थ्रेट ड्रैगन ब्रांडिंग'
},
title: 'के लिए थ्रेट मॉडल रिपोर्ट',
Expand Down
1 change: 1 addition & 0 deletions td.vue/src/i18n/id.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ const id = {
showMitigatedThreats: 'Tampilkan ancaman yang diredam',
showModelDiagrams: 'Tampilkan diagram model',
showEmpty: 'Tampilkan elemen kosong',
showAttributes: 'Show element attributes',
showBranding: 'Logo Threat Dragon'
},
title: 'Laporan model ancaman untuk',
Expand Down
1 change: 1 addition & 0 deletions td.vue/src/i18n/ja.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ const jpn = {
showMitigatedThreats: '解決済みの脅威を表示',
showModelDiagrams: 'モデルの図面を表示',
showEmpty: '空要素を表示',
showAttributes: 'Show element attributes',
showBranding: 'Threat Dragonロゴ'
},
title: '脅威レポート',
Expand Down
1 change: 1 addition & 0 deletions td.vue/src/i18n/ms.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ const ms = {
showMitigatedThreats: 'Tunjukkan ancaman yang ditangani',
showModelDiagrams: 'Tunjukkan gambarajah model',
showEmpty: 'Tunjukkan elemen kosong',
showAttributes: 'Show element attributes',
showBranding: 'Logo Threat Dragon'
},
title: 'Laporan model ancaman untuk',
Expand Down
1 change: 1 addition & 0 deletions td.vue/src/i18n/pt.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ const por = {
showMitigatedThreats: 'Show mitigated threats',
showModelDiagrams: 'Show model diagrams',
showEmpty: 'Show empty elements',
showAttributes: 'Show element attributes',
showBranding: 'Threat Dragon logo'
},
title: 'Relatório do modelo de ameaças para',
Expand Down
1 change: 1 addition & 0 deletions td.vue/src/i18n/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ const rus = {
showMitigatedThreats: 'Show mitigated threats',
showModelDiagrams: 'Show model diagrams',
showEmpty: 'Show empty elements',
showAttributes: 'Show element attributes',
showBranding: 'Threat Dragon logo'
},
title: 'Threat model report for',
Expand Down
1 change: 1 addition & 0 deletions td.vue/src/i18n/uk.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ const ukr = {
showMitigatedThreats: 'Show mitigated threats',
showModelDiagrams: 'Show model diagrams',
showEmpty: 'Show empty elements',
showAttributes: 'Show element attributes',
showBranding: 'Threat Dragon logo'
},
title: 'Threat model report for',
Expand Down
1 change: 1 addition & 0 deletions td.vue/src/i18n/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ const zho = {
showMitigatedThreats: '显示已缓解的威胁',
showModelDiagrams: '显示模型图',
showEmpty: '显示空元素',
showAttributes: 'Show element attributes',
showBranding: '显示Threat Dragon形象'
},
title: '威胁模型报告来自',
Expand Down
11 changes: 11 additions & 0 deletions td.vue/src/views/ReportModel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@
>{{ $t('report.options.showBranding') }}</b-form-checkbox>
</b-form-group>
</b-col>

<b-col>
<b-form-group
label-cols="auto"
id="attributes-group">
<b-form-checkbox
id="show_attributes"
v-model="display.attributes"
>{{ $t('report.options.showAttributes') }}</b-form-checkbox>
</b-form-group>
</b-col>
</b-form-row>
</b-form>
</b-col>
Expand Down
80 changes: 40 additions & 40 deletions td.vue/tests/unit/service/otm/OTMtoTD.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,40 +57,40 @@ describe('service/otm/OTMtoTD.js', () => {
beforeEach(() => {
mockOTM.otmVersion = '0.2.0';
mockOTM.representations = [
{
'name': 'Architecture Diagram',
'id': 'architecture-diagram',
'type': 'diagram',
'size': {
'width': 1000,
'height': 1100
},
'attributes': null
},
{
'name': 'Application Code',
'id': 'application-code',
'type': 'code',
'description': 'the Application Code description',
'repository': {
'url': 'https://github.com/my-project'
},
'attributes': null
},
{
'name': 'Empty Diagram',
'id': '578b5170-74f1-401d-a72f-c06ccc966ca0',
'type': 'diagram',
'description': 'a description of the Empty Diagram',
'size': {
'width': 500,
'height': 300
},
'attributes': {
'diagramType': 'LINDDUN'
}
}
];
{
'name': 'Architecture Diagram',
'id': 'architecture-diagram',
'type': 'diagram',
'size': {
'width': 1000,
'height': 1100
},
'attributes': null
},
{
'name': 'Application Code',
'id': 'application-code',
'type': 'code',
'description': 'the Application Code description',
'repository': {
'url': 'https://github.com/my-project'
},
'attributes': null
},
{
'name': 'Empty Diagram',
'id': '578b5170-74f1-401d-a72f-c06ccc966ca0',
'type': 'diagram',
'description': 'a description of the Empty Diagram',
'size': {
'width': 500,
'height': 300
},
'attributes': {
'diagramType': 'LINDDUN'
}
}
];
tdModel = convertOTMtoTD(mockOTM);
});

Expand Down Expand Up @@ -163,12 +163,12 @@ describe('service/otm/OTMtoTD.js', () => {

it('preserves a non-diagram representation', () => {
expect(tdModel.detail.representations[0]).toEqual({
'name': 'Application Code',
'id': 'application-code',
'type': 'code',
'description': 'the Application Code description',
'repository': { 'url': 'https://github.com/my-project' },
'attributes': null
'name': 'Application Code',
'id': 'application-code',
'type': 'code',
'description': 'the Application Code description',
'repository': { 'url': 'https://github.com/my-project' },
'attributes': null
});
});

Expand Down
Loading