Skip to content

Commit 64be7f5

Browse files
committed
Adjust maturity-level-0.md
1 parent 83f2416 commit 64be7f5

1 file changed

Lines changed: 50 additions & 294 deletions

File tree

Lines changed: 50 additions & 294 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
---
2-
This article explains the usage of DSOMM, the dimensions and
3-
corresponding sub-dimensions.
4-
51
# Pre-Requirements
62

7-
Before you start, there is kind of maturity level 0.
3+
Before you start using DSOMM in your organization, there are a few activities that might help you to implement a better security regime.
84

9-
The pre-requirements are highly based (mostly copied) on
10-
[AppSecure NRW](https://github.com/AppSecure-nrw/security-belts/tree/master/white).
115

12-
## Risk management
6+
These pre-requirements are highly based on (mostly copied)
7+
from AppSecure NRW's first level of [security-belts](https://github.com/AppSecure-nrw/security-belts/tree/master/white).
138

14-
[NIST defines `risk`](https://csrc.nist.gov/glossary/term/risk) as
9+
## Risk management
10+
Understand what the term _risk_ means in this context.
11+
<details><summary>Definition of risk</summary>
12+
NIST defines risk as:
1513

16-
> a measure of the extent to which an entity is threatened by a potential
17-
circumstance or event, and typically is a function of:
14+
> a measure of the extent to which an entity is threatened by a potential circumstance or event, and typically is a function of:
1815
> 1. the adverse impact, or magnitude of harm, that would arise
1916
> if the circumstance or event occurs; and
2017
> 2. the likelihood of occurrence.
2118
19+
_Source: https://csrc.nist.gov/glossary/term/risk_
20+
</details>
21+
22+
<details><summary>Definition of risk in a information security context</summary>
2223
In information security, risks arise from the loss of:
2324

2425
- confidentiality,
@@ -40,17 +41,44 @@ A risk then tied to a **threat**, its **probability** and its **impacts**.
4041
If you are interested in Risk Management frameworks and
4142
strategies, you can start from
4243
[FISMA](https://csrc.nist.gov/Projects/risk-management/).
44+
</details>
45+
46+
<details><summary>Definition of risk appetite</summary>
47+
Risk appetite is defined as:
48+
49+
> The types and amount of risk, on a broad level, [an organization] is willing to accept in its pursuit of value
50+
51+
_Source: https://csrc.nist.gov/glossary/term/risk_appetite_
52+
53+
Organizations have different risk appetite. It is important to understand what risks your organization is willing to accept, and which are not acceptable. Understanding this will
54+
- help you translate application security risks for your management
55+
- help you focus on risks that matters the most for your organization
56+
</details>
57+
58+
<details><summary>Definition of risk tolerance</summary>
59+
Risk <i>tolerance</i> is highly connected to risk <i>appetite</i>. NIST's definition is almost identical to its own definition for risk appetit.
60+
61+
[ISACA](https://en.wikipedia.org/wiki/ISACA), however, defines <i>risk tolerance</i> as:
62+
63+
> the acceptable deviation from the level set by the risk appetite and business objectives.
64+
65+
Explaining that:
66+
67+
> Risk appetite and risk tolerance can be viewed as the “two sides of the same coin” as they relate to organizational performance over time. Risk appetite is about “taking risk” and risk tolerance is about “controlling risk.” For risk appetite to be adopted successfully in decision making, it must be integrated with control environment of the organization through risk tolerance
4368
44-
## Onboard Product Owner and other Managers
69+
_Source: https://www.isaca.org/resources/news-and-trends/isaca-now-blog/2022/risk-appetite-vs-risk-tolerance-what-is-the-difference_
70+
</details>
71+
72+
## Onboard Product Owner and other managers
4573

4674
To adopt a DSOMM in a product or a project, it is important to identify
4775
the person or the team which is responsible to ensure
4876
that risk-related considerations reflects the organizational
49-
risk tolerance
77+
risk appetite and tolerance
5078
(see [Risk Executive](https://csrc.nist.gov/glossary/term/risk_executive)
5179
for a more complete view).
5280

53-
Depending on the project, this "Risk Manager" - which in layman terms
81+
Depending on the project, this "Risk Manager" - which in layman's terms
5482
is responsible for judging "risks vs. costs" of the product -
5583
can be the `Project Manager`, the `Product Owner` or else:
5684
it is important that he has the proper risk management
@@ -63,18 +91,20 @@ to minimize risk and build better products.
6391
The first steps for deploying DSOMM are then the following:
6492

6593
1. identify the persons in charge for risk decisions
66-
1. make them aware of information security risks, showing the impacts of
67-
threats and their probability.
68-
1. convince them that security requires continuous efforts
94+
1. ask them about their _risk appetite_
95+
1. make them aware of information security risks
96+
- show the impacts of threats and their probability
97+
1. convince them that security requires _continuous_ efforts
6998

7099
### Benefits
71100

72101
- The "Risk Manager" is aware that all software have security vulnerabilities,
73-
and that the related risks should be minimized.
102+
and that the related risks should be minimized
103+
- Knowing the risk appetite XXXXXX
74104
- Resources must be allocated to improve security and
75-
to avoid, detect and fix vulnerabilities.
105+
to avoid, detect and fix vulnerabilities
76106
- Management can perform well informed risk decisions
77-
- The "Risk Manager" has transparent knowledge on how secure the product is.
107+
- The "Risk Manager" has transparent knowledge on how secure the product is
78108

79109
## Get to Know Security Policies
80110

@@ -141,277 +171,3 @@ from the Security Champion Guild to get you started.
141171
- Starting to implement security belt activities with guidance is easier.
142172
- The team is improving its software security while avoiding previously
143173
made mistakes.
144-
145-
# Dimensions
146-
147-
This section describes the various dimensions
148-
and the corresponding sub dimension.
149-
150-
The descriptions are highly based (mostly copied)
151-
on the [OWASP Project Integration Project Writeup](https://github.com/OWASP/www-project-integration-standards/blob/master/writeups/owasp_in_sdlc/index.md).
152-
153-
## Implementation
154-
155-
This dimension covers topic of "traditional"
156-
hardening of software and infrastructure components.
157-
158-
There is an abundance of libraries and frameworks implementing
159-
secure defaults.
160-
For frontend development, [ReactJS](https://reactjs.org/) seems to be
161-
the latest favourite in the Javascript world.
162-
163-
On the database side, there are [ORM](https://sequelize.org/) libraries
164-
and [Query Builders](https://github.com/kayak/pypika) for most languages.
165-
166-
If you write in Java,
167-
the [ESAPI project](https://www.javadoc.io/doc/org.owasp.esapi/esapi/latest/index.html)
168-
offers several methods to securely implement features,
169-
ranging from Cryptography to input escaping and output encoding.
170-
171-
**Example low maturity scenario:**
172-
173-
The API was queryable by anyone and GraphQL introspection was enabled since
174-
all components were left in debug configuration.
175-
176-
Sensitive API paths were not whitelisted.
177-
The team found that the application was attacked when the server showed very
178-
high CPU load.
179-
The response was to bring the system down, very little information about
180-
the attack was found apart from the fact that someone
181-
was mining cryptocurrencies on the server.
182-
183-
**Example Low Maturity Scenario:**
184-
185-
The team attempted to build the requested features using vanilla NodeJS,
186-
connectivity to backend systems is validated by firing an internal request
187-
to `/healthcheck?remoteHost=<xx.xx.xx>` which attempts to run a ping
188-
command against the IP specified.
189-
All secrets are hard coded.
190-
The team uses off the shelf GraphQL libraries but versions
191-
are not checked using [NPM Audit](https://docs.npmjs.com/cli/audit).
192-
Development is performed by pushing to master which triggers a webhook that
193-
uses FTP to copy latest master to the development server which will become production once development is finished.
194-
195-
**Example High Maturity Scenario:**
196-
197-
Team members have access to comprehensive documentation
198-
and a library of code snippets they can use to accelerate development.
199-
200-
Linters are bundled with pre-commit hooks
201-
and no code reaches master without peer review.
202-
203-
Pre-merge tests are executed before merging code into master.
204-
Tests run a comprehensive suite of tests covering unit tests,
205-
service acceptance tests,
206-
unit tests as well as regression tests.
207-
208-
Once a day a pipeline of specially configured
209-
static code analysis tools runs against
210-
the features merged that day, the results are
211-
triaged by a trained security team and fed to engineering.
212-
213-
There is a cronjob executing Dynamic Analysis tools against Staging
214-
with a similar process.
215-
216-
Pentests are conducted against features released on every release
217-
and also periodically against the whole software stack.
218-
219-
# Culture and Organization
220-
221-
This section covers topics related to culture and organization like
222-
processes, education and the design phase.
223-
224-
Once requirements are gathered and analysis is performed,
225-
implementation specifics need to be defined.
226-
The outcome of this stage is usually a diagram outlining data flows
227-
and a general system architecture.
228-
This presents an opportunity for both threat modeling
229-
and attaching security considerations
230-
to every ticket and epic that is the outcome of this stage.
231-
232-
### Design
233-
234-
There is some great advice on threat modeling out there
235-
*e.g.* [this](https://arstechnica.com/information-technology/2017/07/how-i-learned-to-stop-worrying-mostly-and-love-my-threat-model/)
236-
article or [this](https://www.microsoft.com/en-us/securityengineering/sdl/threatmodeling) one.
237-
238-
A bite sized primer by Adam Shostack himself can be found
239-
[here](https://adam.shostack.org/blog/2018/03/threat-modeling-panel-at-appsec-cali-2018/).
240-
241-
OWASP includes a short [article](https://wiki.owasp.org/index.php/Category:Threat_Modeling)
242-
on Threat Modeling along with a relevant [Cheatsheet](https://cheatsheetseries.owasp.org/cheatsheets/Threat_Modeling_Cheat_Sheet.html).
243-
Moreover, if you're following OWASP SAMM, it has a short section on [Threat Assessment](https://owaspsamm.org/model/design/threat-assessment/).
244-
245-
There's a few projects that can help with creating Threat Models
246-
at this stage, [PyTM](https://github.com/izar/pytm) is one,
247-
[ThreatSpec](https://github.com/threatspec/threatspec) is another.
248-
249-
> Note: _A threat model can be as simple as a data flow diagram with attack vectors on every flow and asset and equivalent remediations.
250-
An example can be found below._
251-
252-
![Threat Model](https://github.com/OWASP/www-project-integration-standards/raw/master/writeups/owasp_in_sdlc/images/threat_model.png "Threat Model")
253-
254-
Last, if the organisation maps Features to Epics, the Security Knowledge Framework (SKF) can be used to facilitate this process by leveraging it's questionnaire function.
255-
256-
![SKF](https://github.com/OWASP/www-project-integration-standards/raw/master/writeups/owasp_in_sdlc/images/skf_qs.png "SKF")
257-
258-
This practice has the side effect that it trains non-security specialists to think like attackers.
259-
260-
The outcomes of this stage should help lay the foundation of secure design and considerations.
261-
262-
**Example Low Maturity Scenario:**
263-
264-
Following vague feature requirements the design includes caching data to a local unencrypted database with a hardcoded password.
265-
266-
Remote data store access secrets are hardcoded in the configuration files.
267-
All communication between backend systems is plaintext.
268-
269-
Frontend serves data over GraphQL as a thin layer between caching system and end user.
270-
271-
GraphQL queries are dynamically translated to SQL, Elasticsearch and NoSQL queries.
272-
Access to data is protected with basic auth set to _1234:1234_ for development purposes.
273-
274-
**Example High Maturity Scenario:**
275-
276-
Based on a detailed threat model defined and updated through code, the team decides the following:
277-
278-
* Local encrypted caches need to expire and auto-purged.
279-
* Communication channels encrypted and authenticated.
280-
* All secrets persisted in shared secrets store.
281-
* Frontend designed with permissions model integration.
282-
* Permissions matrix defined.
283-
* Input is escaped output is encoded appropriately using well established libraries.
284-
285-
### Education and Guidence
286-
287-
Metrics won't necessarily improve without training engineering teams and somehow building a security-minded culture.
288-
Security training is a long and complicated discussion.
289-
There is a variety of approaches out there, on the testing-only end of the spectrum there is fully black box virtual machines such as [DVWA](http://www.dvwa.co.uk/), [Metasploitable series](https://metasploit.help.rapid7.com/docs/metasploitable-2) and the [VulnHub](https://www.vulnhub.com/) project.
290-
291-
The code & remediation end of the spectrum isn't as well-developed,
292-
mainly due to the complexity involved in building and distributing such material.
293-
However, there are some respectable solutions, [Remediate The Flag](https://www.remediatetheflag.com/)
294-
can be used to setup a code based challenge.
295-
296-
![Remediate the Flag](https://github.com/OWASP/www-project-integration-standards/raw/master/writeups/owasp_in_sdlc/images/rtf.png "Remediate the Flag")
297-
298-
However, if questionnaires are the preferred medium, or if the organisation
299-
is looking for self-service testing, [Secure Coding Dojo](https://github.com/trendmicro/SecureCodingDojo) is an interesting solution.
300-
301-
More on the self-service side, the Security Knowledge Framework has released
302-
several [Labs](https://owasp-skf.gitbook.io/asvs-write-ups/) that each
303-
showcase one vulnerability and provides information on how to exploit it.
304-
305-
However, to our knowledge, the most flexible project out there is probably
306-
the [Juice Shop](https://github.com/bkimminich/juice-shop), deployed
307-
on Heroku with one click, it offers both CTF functionality and a self-service
308-
standalone application that comes with solution detection
309-
and a comprehensive progress-board.
310-
311-
![Juice Shop](https://github.com/OWASP/www-project-integration-standards/raw/master/writeups/owasp_in_sdlc/images/juiceshop.png "Juice Shop")
312-
313-
### Process
314-
315-
**Example High Maturity Scenario:**
316-
317-
Business continuity and Security teams run incident management drills
318-
periodically to refresh incident playbook knowledge.
319-
320-
# Test and Verification
321-
322-
At any maturity level, linters can be introduced to ensure that consistent
323-
code is being added.
324-
For most linters, there are IDE integrations providing software engineers
325-
with the ability to validate code correctness during development time.
326-
Several linters also include security specific rules.
327-
This allows for basic security checks before the code is even committed.
328-
For example, if you write in Typescript, you can use
329-
[tslint](https://github.com/palantir/tslint) along
330-
with [tslint-config-security](https://www.npmjs.com/package/tslint-config-security)
331-
to easily and quickly perform basic checks.
332-
333-
However, linters cannot detect vulnerabilities in third party libraries,
334-
and as software supply chain attacks spread, this consideration becomes more important.
335-
To track third party library usage and audit their security you can use [Dependency Check/Track](https://dependencytrack.org/).
336-
337-
![SKF Code](https://github.com/OWASP/www-project-integration-standards/raw/master/writeups/owasp_in_sdlc/images/skf_code.png "SKF Code")
338-
339-
This stage can be used to validate software correctness and it's results as a
340-
metric for the security related decisions of the previous stages.
341-
At this stage both automated and manual testing can be performed.
342-
SAMM again offers 3 maturity levels across Architecture Reviews, Requirements testing, and Security Testing.
343-
Instructions can be found [here](https://owaspsamm.org/model/verification/) and a screenshot is listed below.
344-
345-
![SAMM Testing](https://github.com/OWASP/www-project-integration-standards/raw/master/writeups/owasp_in_sdlc/images/samm_testing.png "SAMM Testing")
346-
347-
Testing can be performed several ways and it highly depends on the nature
348-
of the software, the organisation's cadence, and the regulatory requirements among other things.
349-
350-
If available, automation is a good idea as it allows detection of easy to find vulnerabilities without much human interaction.
351-
352-
If the application communicates using a web-based protocol, the [ZAP](https://github.com/zaproxy/zaproxy) project can be used to automate a great number of web related attacks and detection.
353-
ZAP can be orchestrated using its REST API and it can even automate multi-stage attacks by leveraging its Zest scripting support.
354-
355-
Vulnerabilities from ZAP and a wide variety of other tools can be imported and managed using a dedicated defect management platform such as [Defect Dojo](https://github.com/DefectDojo/django-DefectDojo)(screenshot below).
356-
357-
![Defect Dojo](https://github.com/OWASP/www-project-integration-standards/raw/master/writeups/owasp_in_sdlc/images/defectdojo.png "Defect Dojo")
358-
359-
For manual testing the [Web](https://github.com/OWASP/wstg) and [Mobile](https://github.com/OWASP/owasp-mstg) Security Testing Guides can be used to achieve a base level of quality for human driven testing.
360-
361-
**Example Low Maturity Scenario:**
362-
363-
The business deployed the system to production without testing.
364-
Soon after, the client's routine pentests uncovered deep flaws with access to backend data and services.
365-
The remediation effort was significant.
366-
367-
**Example High Maturity Scenario:**
368-
369-
The application features received Dynamic Automated testing when each reached staging, a trained QA team validated business requirements that involved security checks.
370-
A security team performed an adequate pentest and gave a sign-off.
371-
372-
# Build and Deployment
373-
374-
Secure configuration standards can be enforced during the deployment using the [Open Policy Agent](https://www.openpolicyagent.org/).
375-
376-
![SAMM Release](https://github.com/OWASP/www-project-integration-standards/raw/master/writeups/owasp_in_sdlc/images/samm_release.png "SAMM Release")
377-
378-
**Example Low Maturity scenario:**
379-
380-
_please create a PR_
381-
382-
**Example High Maturity scenario:**
383-
384-
The CI/CD system, when migrating successful QA environments to production, applies appropriate configuration to all components.
385-
Configuration is tested periodically for drift.
386-
387-
Secrets live in-memory only and are persisted in a dedicated Secrets Storage solution such as Hashicorp Vault.
388-
389-
## Information Gathering
390-
391-
Concerning metrics, the community has been quite vocal on what to measure
392-
and how important it is.
393-
The OWASP CISO guide offers 3 broad categories of SDLC metrics[1] which can
394-
be used to measure effectiveness of security practices.
395-
Moreover, there is a number of presentations on what could be leveraged
396-
to improve a security programme, starting from Marcus' Ranum's [keynote](https://www.youtube.com/watch?v=yW7kSVwucSk)
397-
at Appsec California[1],
398-
Caroline Wong's similar [presentation](https://www.youtube.com/watch?v=dY8IuQ8rUd4)
399-
and [this presentation](https://www.youtube.com/watch?v=-XI2DL2Uulo) by J. Rose and R. Sulatycki.
400-
These among several writeups by private companies all offering their own version of what could be measured.
401-
402-
Projects such as the [ELK stack](https://www.elastic.co/elastic-stack), [Grafana](https://grafana.com/)
403-
and [Prometheus](https://prometheus.io/docs/introduction/overview/) can be used to aggregate
404-
logging and provide observability.
405-
406-
However, no matter the WAFs, Logging, and secure configuration enforced
407-
at this stage, incidents will occur eventually.
408-
Incident management is a complicated and high stress process.
409-
To prepare organisations for this, SAMM includes a section on [incident management](https://owaspsamm.org/model/operations/incident-management/) involving simple questions for stakeholders to answer so you can determine incident preparedness accurately.
410-
411-
**Example High Maturity scenario:**
412-
413-
Logging from all components gets aggregated in dashboards and alerts
414-
are raised based on several Thresholds and events.
415-
There are canary values and events fired against monitoring
416-
from time to time to validate it works.
417-

0 commit comments

Comments
 (0)