Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
hupe1980 committed Jun 19, 2022
1 parent 36d3659 commit efac3e4
Show file tree
Hide file tree
Showing 15 changed files with 207 additions and 10 deletions.
12 changes: 11 additions & 1 deletion .cdktg.out/manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
{
"Model Stub": "ModelStub"
"version": "0.0.11",
"models": {
"Model Stub": {
"name": "Model Stub",
"sanitizedName": "ModelStub",
"constructPath": "Model Stub",
"workingDirectory": "models",
"synthesizedModelPath": "models/ModelStub.yml",
"annotations": []
}
}
}
90 changes: 90 additions & 0 deletions .cdktg.out/models/ModelStub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Generated by cdk-threagile

threagile_version: 1.0.0
title: Model Stub
data: 2020-03-31
author:
name: John Doe
homepage: null
business_criticality: important
data_assets:
Some Data Asset:
id: c3976643-942b-4fe1-aebb-a6a0e6879cf6
description: Some Description
usage: business
origin: Some Origin
owner: Some Owner
quantity: many
confidentiality: confidential
integrity: critical
availability: operational
justification_cia_rating: null
technical_assets:
Some Technical Asset:
id: dc9acb35-1218-4007-b777-6affeafa42ee
description: Some Description
type: process
usage: business
used_as_client_by_human: false
out_of_scope: false
justification_out_of_scope: null
size: component
technology: web-service-rest
internet: false
machine: virtual
encryption: none
owner: Some Owner
confidentiality: confidential
integrity: critical
availability: critical
justification_cia_rating: null
multitenant: false
redundant: true
data_assets_processed:
- c3976643-942b-4fe1-aebb-a6a0e6879cf6
data_assets_stored: []
communication_links:
Some Traffic:
target: 441e289d-73f0-4a00-ae53-687be7287540
description: Some Description
protocol: https
authentication: none
authorization: none
vpn: false
ipFiltered: false
readonly: false
usage: business
data_assets_sent:
- c3976643-942b-4fe1-aebb-a6a0e6879cf6
data_assets_received: []
Some Other Technical Asset:
id: 441e289d-73f0-4a00-ae53-687be7287540
description: Some Description
type: process
usage: business
used_as_client_by_human: false
out_of_scope: false
justification_out_of_scope: null
size: component
technology: web-service-rest
internet: false
machine: virtual
encryption: none
owner: Some Owner
confidentiality: confidential
integrity: important
availability: important
justification_cia_rating: null
multitenant: false
redundant: true
data_assets_processed:
- c3976643-942b-4fe1-aebb-a6a0e6879cf6
data_assets_stored: []
trust_boundaries:
Some Trust Boundary:
id: 406c7be2-5aa7-48d2-aeb6-d105d3510dc5
description: Some Description
type: network-dedicated-hoster
technical_assets_inside:
- dc9acb35-1218-4007-b777-6affeafa42ee
trust_boundaries_nested: []
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# cdk-threagile-example
# cdk-threagile-example

The example can be used with the [threagile playground](https://run.threagile.io/)
Binary file added dist/ModelStub/data-asset-diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/ModelStub/data-flow-diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/ModelStub/report.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions dist/ModelStub/risks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"category":"unencrypted-asset","risk_status":"unchecked","severity":"medium","exploitation_likelihood":"unlikely","exploitation_impact":"medium","title":"\u003cb\u003eUnencrypted Technical Asset\u003c/b\u003e named \u003cb\u003eSome Other Technical Asset\u003c/b\u003e","synthetic_id":"unencrypted-asset@441e289d-73f0-4a00-ae53-687be7287540","most_relevant_data_asset":"","most_relevant_technical_asset":"441e289d-73f0-4a00-ae53-687be7287540","most_relevant_trust_boundary":"","most_relevant_shared_runtime":"","most_relevant_communication_link":"","data_breach_probability":"improbable","data_breach_technical_assets":["441e289d-73f0-4a00-ae53-687be7287540"]},{"category":"unencrypted-asset","risk_status":"unchecked","severity":"medium","exploitation_likelihood":"unlikely","exploitation_impact":"medium","title":"\u003cb\u003eUnencrypted Technical Asset\u003c/b\u003e named \u003cb\u003eSome Technical Asset\u003c/b\u003e","synthetic_id":"unencrypted-asset@dc9acb35-1218-4007-b777-6affeafa42ee","most_relevant_data_asset":"","most_relevant_technical_asset":"dc9acb35-1218-4007-b777-6affeafa42ee","most_relevant_trust_boundary":"","most_relevant_shared_runtime":"","most_relevant_communication_link":"","data_breach_probability":"improbable","data_breach_technical_assets":["dc9acb35-1218-4007-b777-6affeafa42ee"]},{"category":"missing-authentication","risk_status":"unchecked","severity":"elevated","exploitation_likelihood":"likely","exploitation_impact":"medium","title":"\u003cb\u003eMissing Authentication\u003c/b\u003e covering communication link \u003cb\u003eSome Traffic\u003c/b\u003e from \u003cb\u003eSome Technical Asset\u003c/b\u003e to \u003cb\u003eSome Other Technical Asset\u003c/b\u003e","synthetic_id":"missing-authentication@dc9acb35-1218-4007-b777-6affeafa42ee\u003esome-traffic@dc9acb35-1218-4007-b777-6affeafa42ee@441e289d-73f0-4a00-ae53-687be7287540","most_relevant_data_asset":"","most_relevant_technical_asset":"441e289d-73f0-4a00-ae53-687be7287540","most_relevant_trust_boundary":"","most_relevant_shared_runtime":"","most_relevant_communication_link":"dc9acb35-1218-4007-b777-6affeafa42ee\u003esome-traffic","data_breach_probability":"possible","data_breach_technical_assets":["441e289d-73f0-4a00-ae53-687be7287540"]},{"category":"server-side-request-forgery","risk_status":"unchecked","severity":"medium","exploitation_likelihood":"likely","exploitation_impact":"low","title":"\u003cb\u003eServer-Side Request Forgery (SSRF)\u003c/b\u003e risk at \u003cb\u003eSome Technical Asset\u003c/b\u003e server-side web-requesting the target \u003cb\u003eSome Other Technical Asset\u003c/b\u003e via \u003cb\u003eSome Traffic\u003c/b\u003e","synthetic_id":"server-side-request-forgery@dc9acb35-1218-4007-b777-6affeafa42ee@441e289d-73f0-4a00-ae53-687be7287540@dc9acb35-1218-4007-b777-6affeafa42ee\u003esome-traffic","most_relevant_data_asset":"","most_relevant_technical_asset":"dc9acb35-1218-4007-b777-6affeafa42ee","most_relevant_trust_boundary":"","most_relevant_shared_runtime":"","most_relevant_communication_link":"dc9acb35-1218-4007-b777-6affeafa42ee\u003esome-traffic","data_breach_probability":"possible","data_breach_technical_assets":["dc9acb35-1218-4007-b777-6affeafa42ee"]},{"category":"missing-hardening","risk_status":"unchecked","severity":"medium","exploitation_likelihood":"likely","exploitation_impact":"low","title":"\u003cb\u003eMissing Hardening\u003c/b\u003e risk at \u003cb\u003eSome Technical Asset\u003c/b\u003e","synthetic_id":"missing-hardening@dc9acb35-1218-4007-b777-6affeafa42ee","most_relevant_data_asset":"","most_relevant_technical_asset":"dc9acb35-1218-4007-b777-6affeafa42ee","most_relevant_trust_boundary":"","most_relevant_shared_runtime":"","most_relevant_communication_link":"","data_breach_probability":"improbable","data_breach_technical_assets":["dc9acb35-1218-4007-b777-6affeafa42ee"]},{"category":"missing-vault","risk_status":"unchecked","severity":"medium","exploitation_likelihood":"unlikely","exploitation_impact":"medium","title":"\u003cb\u003eMissing Vault (Secret Storage)\u003c/b\u003e in the threat model (referencing asset \u003cb\u003eSome Technical Asset\u003c/b\u003e as an example)","synthetic_id":"missing-vault@dc9acb35-1218-4007-b777-6affeafa42ee","most_relevant_data_asset":"","most_relevant_technical_asset":"dc9acb35-1218-4007-b777-6affeafa42ee","most_relevant_trust_boundary":"","most_relevant_shared_runtime":"","most_relevant_communication_link":"","data_breach_probability":"improbable","data_breach_technical_assets":[]},{"category":"missing-waf","risk_status":"unchecked","severity":"low","exploitation_likelihood":"unlikely","exploitation_impact":"low","title":"\u003cb\u003eMissing Web Application Firewall (WAF)\u003c/b\u003e risk at \u003cb\u003eSome Other Technical Asset\u003c/b\u003e","synthetic_id":"missing-waf@441e289d-73f0-4a00-ae53-687be7287540","most_relevant_data_asset":"","most_relevant_technical_asset":"441e289d-73f0-4a00-ae53-687be7287540","most_relevant_trust_boundary":"","most_relevant_shared_runtime":"","most_relevant_communication_link":"","data_breach_probability":"improbable","data_breach_technical_assets":["441e289d-73f0-4a00-ae53-687be7287540"]}]
Binary file added dist/ModelStub/risks.xlsx
Binary file not shown.
1 change: 1 addition & 0 deletions dist/ModelStub/stats.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"risks":{"critical":{"accepted":0,"false-positive":0,"in-discussion":0,"in-progress":0,"mitigated":0,"unchecked":0},"elevated":{"accepted":0,"false-positive":0,"in-discussion":0,"in-progress":0,"mitigated":0,"unchecked":1},"high":{"accepted":0,"false-positive":0,"in-discussion":0,"in-progress":0,"mitigated":0,"unchecked":0},"low":{"accepted":0,"false-positive":0,"in-discussion":0,"in-progress":0,"mitigated":0,"unchecked":1},"medium":{"accepted":0,"false-positive":0,"in-discussion":0,"in-progress":0,"mitigated":0,"unchecked":5}}}
Binary file added dist/ModelStub/tags.xlsx
Binary file not shown.
1 change: 1 addition & 0 deletions dist/ModelStub/technical-assets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"441e289d-73f0-4a00-ae53-687be7287540":{"Id":"441e289d-73f0-4a00-ae53-687be7287540","Title":"Some Other Technical Asset","Description":"Some Description","Usage":0,"Type":1,"Size":3,"Technology":14,"Machine":1,"Internet":false,"MultiTenant":false,"Redundant":true,"CustomDevelopedParts":false,"OutOfScope":false,"UsedAsClientByHuman":false,"Encryption":0,"JustificationOutOfScope":"","Owner":"Some Owner","Confidentiality":3,"Integrity":2,"Availability":2,"JustificationCiaRating":"","Tags":[],"DataAssetsProcessed":["c3976643-942b-4fe1-aebb-a6a0e6879cf6"],"DataAssetsStored":[],"DataFormatsAccepted":[],"CommunicationLinks":[],"DiagramTweakOrder":0,"RAA":1},"dc9acb35-1218-4007-b777-6affeafa42ee":{"Id":"dc9acb35-1218-4007-b777-6affeafa42ee","Title":"Some Technical Asset","Description":"Some Description","Usage":0,"Type":1,"Size":3,"Technology":14,"Machine":1,"Internet":false,"MultiTenant":false,"Redundant":true,"CustomDevelopedParts":false,"OutOfScope":false,"UsedAsClientByHuman":false,"Encryption":0,"JustificationOutOfScope":"","Owner":"Some Owner","Confidentiality":3,"Integrity":3,"Availability":3,"JustificationCiaRating":"","Tags":[],"DataAssetsProcessed":["c3976643-942b-4fe1-aebb-a6a0e6879cf6"],"DataAssetsStored":[],"DataFormatsAccepted":[],"CommunicationLinks":[{"Id":"dc9acb35-1218-4007-b777-6affeafa42ee\u003esome-traffic","SourceId":"dc9acb35-1218-4007-b777-6affeafa42ee","TargetId":"441e289d-73f0-4a00-ae53-687be7287540","Title":"Some Traffic","Description":"Some Description","Protocol":2,"Tags":[],"VPN":false,"IpFiltered":false,"Readonly":false,"Authentication":0,"Authorization":0,"Usage":0,"DataAssetsSent":["c3976643-942b-4fe1-aebb-a6a0e6879cf6"],"DataAssetsReceived":null,"DiagramTweakWeight":1,"DiagramTweakConstraint":true}],"DiagramTweakOrder":0,"RAA":100}}
90 changes: 90 additions & 0 deletions dist/ModelStub/threagile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Generated by cdk-threagile

threagile_version: 1.0.0
title: Model Stub
data: 2020-03-31
author:
name: John Doe
homepage: null
business_criticality: important
data_assets:
Some Data Asset:
id: c3976643-942b-4fe1-aebb-a6a0e6879cf6
description: Some Description
usage: business
origin: Some Origin
owner: Some Owner
quantity: many
confidentiality: confidential
integrity: critical
availability: operational
justification_cia_rating: null
technical_assets:
Some Technical Asset:
id: dc9acb35-1218-4007-b777-6affeafa42ee
description: Some Description
type: process
usage: business
used_as_client_by_human: false
out_of_scope: false
justification_out_of_scope: null
size: component
technology: web-service-rest
internet: false
machine: virtual
encryption: none
owner: Some Owner
confidentiality: confidential
integrity: critical
availability: critical
justification_cia_rating: null
multitenant: false
redundant: true
data_assets_processed:
- c3976643-942b-4fe1-aebb-a6a0e6879cf6
data_assets_stored: []
communication_links:
Some Traffic:
target: 441e289d-73f0-4a00-ae53-687be7287540
description: Some Description
protocol: https
authentication: none
authorization: none
vpn: false
ipFiltered: false
readonly: false
usage: business
data_assets_sent:
- c3976643-942b-4fe1-aebb-a6a0e6879cf6
data_assets_received: []
Some Other Technical Asset:
id: 441e289d-73f0-4a00-ae53-687be7287540
description: Some Description
type: process
usage: business
used_as_client_by_human: false
out_of_scope: false
justification_out_of_scope: null
size: component
technology: web-service-rest
internet: false
machine: virtual
encryption: none
owner: Some Owner
confidentiality: confidential
integrity: important
availability: important
justification_cia_rating: null
multitenant: false
redundant: true
data_assets_processed:
- c3976643-942b-4fe1-aebb-a6a0e6879cf6
data_assets_stored: []
trust_boundaries:
Some Trust Boundary:
id: 406c7be2-5aa7-48d2-aeb6-d105d3510dc5
description: Some Description
type: network-dedicated-hoster
technical_assets_inside:
- dc9acb35-1218-4007-b777-6affeafa42ee
trust_boundaries_nested: []
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"model:analyse": "cdktg analyse"
},
"dependencies": {
"cdktg": "latest",
"cdktg": "^0.0.11",
"constructs": "^10.1.42"
},
"devDependencies": {
Expand Down
8 changes: 5 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const someTechnicalAsset = new cdktg.TechnicalAsset(model, 'Some Technical Asset
redundant: true,
});

someTechnicalAsset.processed(someData);
someTechnicalAsset.process(someData);

const someOtherTechnicalAsset = new cdktg.TechnicalAsset(model, 'Some Other Technical Asset', {
description: 'Some Description',
Expand All @@ -72,9 +72,9 @@ const someOtherTechnicalAsset = new cdktg.TechnicalAsset(model, 'Some Other Tech
redundant: true,
});

someOtherTechnicalAsset.processed(someData);
someOtherTechnicalAsset.process(someData);

const someTraffic = someTechnicalAsset.communicatedWith('Some Traffic', someOtherTechnicalAsset, {
const someTraffic = someTechnicalAsset.communicateWith('Some Traffic', someOtherTechnicalAsset, {
description: 'Some Description',
protocol: cdktg.Protocol.HTTPS,
authentication: cdktg.Authentication.NONE,
Expand All @@ -85,4 +85,6 @@ const someTraffic = someTechnicalAsset.communicatedWith('Some Traffic', someOthe
usage: cdktg.Usage.BUSINESS,
});

someTraffic.send(someData);

project.synth();
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ axios@^0.27.2:
follow-redirects "^1.14.9"
form-data "^4.0.0"

cdktg@latest:
version "0.0.6"
resolved "https://registry.yarnpkg.com/cdktg/-/cdktg-0.0.6.tgz#c70aae19fb48bbabcc36de89995c777868b542e3"
integrity sha512-CW4l/g1y9xBH1imqiXbA0RpQYxItXPBysGbiTELFKS93VCYIuuH1OYk4kx3clrbWC+aTkIYXCQLFU1eEmrxXAQ==
cdktg@^0.0.11:
version "0.0.11"
resolved "https://registry.yarnpkg.com/cdktg/-/cdktg-0.0.11.tgz#21585746b96ca2b08c73b2e7a9237f771f9c8e92"
integrity sha512-6mvr9cLMQj62iracvkqVGatpH76e/Wyd8BBGPn+Gb32z1Ntk7e8QKx1Ro6rG5lIHC20zuNgamuEG36u4AMg1Tg==
dependencies:
adm-zip "0.5.6"
axios "^0.27.2"
Expand Down

0 comments on commit efac3e4

Please sign in to comment.