OWASP Security Culture-1.0
OWASP Security Culture-1.0
OWASP Security Culture-1.0
Nick Miller
1
OWASP Security Culture 1.0
Contents
Frontispiece 3
Introduction 4
Security Champions 10
Activities 14
Threat modelling 17
Why should developers perform threat modelling? . . . . . . . . . . . . . . . . 17
Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
A simplified step-by-step guide of the threat modelling process . . . . . . . . . . 18
Gamification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Security testing 21
Using security tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Adding security tests into the development pipeline . . . . . . . . . . . . . . . 21
Types of security tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Vulnerability management . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Penetration testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Metrics 24
2
OWASP Security Culture 1.0
Frontispiece
Copyright and Licensee
Copyright (c) 2022 The OWASP Foundation.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International
License. Please read and understand the license and copyright conditions.
Leaders
• Nick Miller
Reviewers
• Daniel Burn
• John Lowe
3
OWASP Security Culture 1.0
Introduction
This guide will discuss the importance and benefits of establishing a security culture when
building an application security program. Security should be considered at each stage of the
Software Development LifeCycle (SDLC), helping to create secure development practices.
This guide can be used by a broad range of roles: security; developers; testers and team
leaders. The guide does not assume a particular SDLC, it can be used for any SDLC and
software development approach.
This guide will introduce ideas and activities to help uplift security, such as threat modelling,
but does not seek to be an authoritative source for these activities. References to more
comprehensive material on these activities will instead be provided.
The first step to building an application security program is defining a maturity goal which
sets a target to be measured against. To be able to meet the defined maturity goal, the
appropriate resources need to be assigned. This requires having management buyin. The
importance of security needs to be understood by roles from the development team manager
to the product manager to ensure that security work can be prioritised accordingly.
Collaboration between the security team and development teams is essential. The security
team expects the development team to write secure code, but they need to provide guidance
on application security. With security team collaboration, security can be distributed across
the development team.
A good way to distribute security across development teams is by using ”Security Cham-
pions”. A Security Champion acts as a point of contact for the developers to ask security
questions. This helps scale out security, as there are often fewer security team members
than development team members.
Activities help build the security mindset into development teams. Interactive labs and vul-
nerable by design applications help developers learn different security vulnerabilities and how
to fix them. Capture the Flag (CTF) events and gamification are interesting and engaging
activities to help build security.
Threat modelling is a useful task for developers to use to identify potential security issues
early in the development lifecycle. This task need not be only performed by security archi-
tects, but can be done by developers in another way to scale out security.
Security testing is used to ensure code delivered is secure. However, tests can be added
at multiple stages of the development lifecycle, not just the end. It is beneficial to involve the
development team in the deployment of the security testing tools used. Ensure that the tool
will provide value and have minimal false positives. It is also beneficial to have penetration
testing reports that are provided to the development team be free from false positives and
give details on how to remediate particular findings.
Lastly, the use of metrics is important to measure progress of the security uplift. Metrics from
the Security Champions program, threat modelling, code review, security testing, and other
activities are all useful to give an indication of how the application security uplift is improving
over time. This allows adjustments to be made to the overall program to ensure the defined
maturity goals are met.
4
OWASP Security Culture 1.0
5
OWASP Security Culture 1.0
1
OWASP. Web Security Testing Guide 4.2. 2020. https://github.com/OWASP/wstg/releases/download/v4.2/wstg-
v4.2.pdf
2
Ibid., 5.
6
OWASP Security Culture 1.0
7
OWASP Security Culture 1.0
awareness at all levels of the organisation helps work to be prioritised. Development team
managers and product owners will understand security is important and allocate resources
to it.
Security work should be visible and be subject to normal business processes. By having
security work use the same process, providing work hour estimates and including it in the
roadmap alongside other work, it will ensure that security work is not forgotten about and is
assigned the appropriate resources. The amount of security work to include in a roadmap
will depend on the organisation’s risk appetite. A financial organisation will be risk averse
and require a significant investment in security work.
It is useful to have a risk register to track outstanding security risks. These are reviewed pe-
riodically by senior management to accept or mitigate as per the organisation’s risk appetite.
8
OWASP Security Culture 1.0
items pose the most risk. When the development team understands how the risk ratings are
calculated and the impact a particular vulnerability has on the business, it can be easier for
the security team to have the attention of the development team in the prioritisation of the
vulnerabilities remediation.
Use secure defaults and secure guard rails or paved roads as an effective way to ensure
security is built into the development process4 . Infrastructure used by developers should be
set up in a secure manner, such that no additional work is needed to make the environment
secure. Any modules that developers use should be secure by default. Rather than provide
all options to the development team which may include insecure options, make available
only the secure options that follow the organisation’s security policy. Sample secure code
or complete secure modules can be provided to developers to make it easier for them to
integrate into their implementation. This makes the easy way to do something also the most
secure way.
Security teams can ensure new solution architecture designs are secure by providing de-
velopers with sample solution architecture that has the required security controls in place.
Security policies help guide developers in a secure design, but more beneficial is for the se-
curity team to provide a solution architecture, and ideally a sample application or code, that
includes all the security controls they expect the developer to use. A developer can then
simply take a sample application or solution architecture and incorporate it in a new solution,
and the security team can be assured that the security controls they require will be in place.5
The speed at which security is introduced into the development team will depend on how
much time is available to them and their current knowledge and interest. It is important for
management to set aside the appropriate time for developers to focus on learning security,
and for the security team to provide interesting relevant learning material. Improving security
is a gradual process that needs maintenance and attention.
4
Astha Singhal, Scaling Appsec at Netflix. 2019. https://netflixtechblog.medium.com/scaling-appsec-at-
netflix-6a13d7ab6043
5
Anunay Bhatt, Uncomplicate Security for Developers using Reference Architectures. 2021.
https://ab-lumos.medium.com/embedding-security-into-sdlc-using-reference-architectures-for-developers-
29403c00fb3d
9
OWASP Security Culture 1.0
Security Champions
It can be hard to introduce security across the development team using the security team
alone. Information Security people do not scale across teams of developers. A good way
to scale security and distribute security across the development teams is by using Security
Champions.
Security Champions act as a single point of contact in regards to security for their team. The
Security Champion is in contact with a member of the security team to ask for guidance. The
Security Champion can monitor security best practices, and help the security team run and
promote security uplift activities such as a CTF (Capture the Flag) event.
Security Champions help to improve the communication between the development teams
and the security team. A Security Champion will know the pain points of their teammates’
code bases and culture, they are then in a good position to present security in a way that
directly connects with them. Security Champions are a key element of improving application
security maturity as referenced in maturity frameworks such as OWASP SAMM.
It is important to have management buyin for the implementation of the Security Champions
program. A Security Champion will need to have a percentage of time set aside from their
regular position to spend on fulfilling this new role. A Security Champion will dedicate time to
security initiatives, such that they have less time to spend on development. This time spent
on security is worthwhile when weighed against the cost of not spending time on security,
resulting in costly security issues to fix. When planning on implementing a Security Cham-
pions program, it may be beneficial to start with a proof of concept consisting of one or two
Security Champions. When the program has been proven successful it can be rolled out
across all development teams.
A large organisation that has a mature Security Champions program may next look towards
establishing a Community of Practice for security.
The following section will describe the steps defined in the OWASP Security Champions
Playbook
1. Identify teams
Identify the teams involved that you want to add Security Champions to and how they work.
Identify team structure: In the initial step, the organisational structure is mapped to under-
stand the teams that will be involved and their structure. For example, a team may consist
of 5 engineers, 1 product owner, 1 QA and 1 team lead.
Identify technologies used: Identify what technologies are used in each team, such as
programming language and framework.
Identify current security state: understand the existing security posture, so as to establish
a baseline to use to measure improvement. This could describe any code reviews that are
performed or automated security testing implemented.
Identify processes: Identify any existing communication channels, and what process is
used to report a security issue and assign it to a team member.
10
OWASP Security Culture 1.0
3. Nominate Champions
A Security Champion may be a developer, operations or QA role. Security Champions should
be nominated, rather than assigned.
Management buyin: get agreement from management on the defined role responsibilities
and time commitment of a Security Champion, such as 20% of their role.
Scale: 1 security staff member may support 5 Security Champions, who each support their
team.
Assign to relevant team: It is useful to add Security Champions by technology platform, so
that their specific technical skills can be used. For example, frontend; backend; mobile.
Converse with team manager and nominated team member: discuss with the team man-
ager about possible Security Champion candidates. Nominations may come from the team
manager as well as having a call for interested candidates. Then discuss with the candidates
about the role and its benefits to see if they are a good fit. Discuss the benefits of learning
application security and how it can help their career and stand out.
Present the Security Champions to the organisation: once the champions have been
nominated, communicate the Security Champion program and its members to the organisa-
tion.
11
OWASP Security Culture 1.0
6. Maintain interest
Keep the Security Champions motivated and engaged to ensure they can continue to enthu-
siastically promote security in their assigned team. Use activities such as Capture the Flag
events to promote security. Recognise the work done by Security Champions and commu-
nicate their achievements to the wider organisation.
Activities: Security Champions can attend conferences together and a conference calen-
dar can be created that contains relevant upcoming conferences. Security Champions can
organise events such as Capture the Flag (CTF) and hackathons. Gamification can be used
to help drive engagement - such as the use of a scoreboard during a CTF event, and the
awarding of prizes like branded clothing or stickers. See Activities chapter.
Recognise and reward: It is important to recognise the achievements by the Security Cham-
pions, such as providing updates on progress in regular newsletters. Gamification can be
used to indicate progress for the Security Champion, through the use of levels. This can help
the Security Champion to have something to work towards and mark their success in their
security journey. An organisation may formalise a Security Champion position with their HR
department to help motivate individuals to join.
12
OWASP Security Culture 1.0
Measure progress: Security Champions can have goals to achieve, such as security Objec-
tives and Key Results (OKR). For example, to close a percentage of critical and high vulner-
abilities; conduct a certain number of threat modelling activities; complete security training
modules. Defined maturity levels can be used to mark progress of individual Security Cham-
pions and the overall program. For example OWASP Top 10 Maturity Categories for Security
Champions.
13
OWASP Security Culture 1.0
Activities
Use activities to build security skills and knowledge. Activities also help maintain enthusiasm
and interest in security. This chapter will discuss different types of activities that can be used.
Activities must be relevant and targeted to the particular developers and development teams.
Security teams can start by first understanding the developers’ security knowledge and
experience, and then teach the required security skills using appropriate engaging activities.
Initially, a simple quiz asking developers for their familiarity with application security such as
the OWASP Top Ten can be useful. The skills to focus on will draw from the maturity goals
set.
Make Learning material relevant. Learning material should target the developers’ relevant
programming languages and platform. There may be some security aspects that are more
applicable for a frontend developer compared to a backend developer. It is also important to
know the individual’s current skill level, to be able to provide learning material that is appro-
priate.
Provide learning material in different formats, as individual people learn in different ways.
Some may prefer reading to videos. Learning material that includes interactive labs can be
an engaging and interesting way to develop hands on application security skills.
The type of activities selected should also be targeted to the individual developers and de-
velopment teams. Some may enjoy interactive hackathons and secure coding labs, while
others may prefer audio and video shows.
Developers may find it hard to find somewhere to start learning security. Helping developers
learn security need not be difficult and extensively time consuming. Short, practical, targeted
learning activities can be a good way to build security knowledge. Starting with the OWASP
Top Ten which addresses commonly found vulnerabilities, can be a good approach.
Security conferences
Application security conferences are a good way for developers to learn from security profes-
sionals. Presentations can include secure coding practices, new security vulnerabilities and
new security tools.
Resources:
• OWASP Events Page
Security shows
Audio and video security shows provide regular presentations on various aspects of applica-
tion security. They may provide updates on security events or in depth analysis of a particular
14
OWASP Security Culture 1.0
Vulnerable applications
Intentionally vulnerable applications give developers hands-on experience in finding and ex-
ploiting vulnerabilities. Intentionally vulnerable applications are created for educational pur-
poses to contain vulnerabilities that are often found in real world applications. Vulnerable
applications can be used as part of a group training event or independent training.
Resources:
• OWASP Juice Shop (written in JavaScript)
• OWASP WebGoat (written in Java)
• OWASP Vulnerable Web Applications Directory
15
OWASP Security Culture 1.0
Hackathon
A hackathon event can be used internally for an organisation to find vulnerabilities in their
applications. Similar to a bug hunt, a hackathon event dedicates time for development team
members to identify possible vulnerabilities that may exist in a system’s architecture or de-
ployed code. Hackathons can be a good opportunity to identify and address security debt
that has built up that teams have not had time to address during their normal operations.
Gamification
Build security knowledge in a development team in an engaging way using gamification.
Developers can be awarded points or badges for completing security learning material or
demonstrating security knowledge. This may provide an incentive to complete security train-
ing. Receiving a badge for an accomplishment helps mark an individual’s progress in appli-
cation security. A competitive points system and team leaderboard can also help to provide
some motivation to engage with security learning activities.
Resources:
• OWASP Security Pins
16
OWASP Security Culture 1.0
Threat modelling
Use threat modelling to identify potential security issues early in the development lifecycle.
Identifying issues early results in a reduction of vulnerabilities in a deployed system. This
section will discuss why it is useful for developers to do threat modelling, give a step by step
guide of the threat modelling activity, and how to introduce the activity to development teams
by using gamification.
The goal of the threat modelling activity is to create the security requirements for a system.
When building the system, the security requirements are incorporated, with appropriate se-
curity controls addressing identified areas of vulnerability. Security testing is later used to
ensure the security controls are in place, verifying that the security requirements have been
met. This gives assurance that the system is secure.
17
OWASP Security Culture 1.0
other team member knowledgeable in security, who is able to convey possible attack patterns
and appropriate security controls. It can be helpful for this person to be present in the initial
threat modelling activities to provide guidance, before the development team manages the
activity themselves.
To introduce threat modelling to the development team, use a system that the team is familiar
with.
Terminology
Terminology used as part of threat modelling and risk management:
• Vulnerability: a weakness in the software or missing security control
• Threat agent: an attacker who exploits a vulnerability
• Risk severity: the risk posed to the organisation by a particular vulnerability. Risk
severity is calculated from the Impact and Likelihood values.
• Impact: the business impact resulting from a threat
• Likelihood: the likelihood of the threat occurring
• Security Controls: reduce Likelihood or Impact of a threat by addressing the associ-
ated vulnerability
For example, the threat of a Cross-Site Scripting attack (in which the threat agent causes
unauthorised javascript to run in the victim’s web browser) attempts to exploit a vulnerability
in the lack of input validation and use of escaping functions in a web application. An appropri-
ate security control is to use input validation and escaping libraries, and a Web Application
Firewall (WAF).
Example: threat model of a payment gateway A data flow diagram created in OWASP
Threat Dragon showing the flow from a web browser using a merchant system to make
a payment. The merchant system accesses a payment gateway, which uses a payment
processing system, storing transaction details in a database.
18
OWASP Security Culture 1.0
19
OWASP Security Culture 1.0
4. Determine mitigations
• Determine risk treatment strategy for each risk: reduce, transfer, avoid, accept
• Agree on risk mitigation with risk owner and stakeholders
• Select appropriate controls according to strategy. Consider using the OWASP Top Ten
Proactive Controls
• Write security tests to test the controls are in place
• Reevaluate risk rating after controls applied
• Periodically retest risk
Gamification
Use gamification as a way to introduce the threat modelling activity to the development team.
Gamification can ensure all members of a team are involved and given the opportunity to pro-
vide input. A security team member can initially run and record the results of the gamification
activity, before handing over to the development team.
The OWASP Cornucopia card game is designed to help developers think about possible
threats in a solution design, and derive a set of security requirements to build against. Team
members are each dealt cards which describe particular threats. They then take turns trying
to make a case for their particular threat posing a risk to the solution design, scoring points
if they are able to do so.
OWASP Cornucopia uses threats grouped into areas that are particularly relevant to software
developers, such as authentication; authorisation; data validation. The threats are derived
from OWASP Application Security Verification Standard (ASVS) and OWASP Web Security
Testing Guide. Using OWASP Cornucopia can be useful when it is desired to have security
requirements aligned with these standards.
20
OWASP Security Culture 1.0
Security testing
Use security tests to verify that the required security controls are in place, as defined in
the security requirements. This chapter will discuss the selection of security tools; adding
security tests into the development pipeline; the types of testing and tools that can be used;
vulnerability management; and the use of penetration testing. For a detailed guide on how
to conduct security testing refer to the OWASP Web Security Testing Guide.
21
OWASP Security Culture 1.0
22
OWASP Security Culture 1.0
Vulnerability management
As vulnerabilities are identified from security testing tools they need to be recorded and man-
aged. As mentioned in the threat modelling section, vulnerabilities should be defined with an
Impact and Likelihood risk rating. Risk ratings use a quantitative rating such as the OWASP
Risk Rating Methodology, or qualitative using for example low; medium; high. When vulner-
abilities are assigned a risk rating, this allows their remediation to be prioritised accordingly.
An organisation may implement a required timeframe that vulnerabilities of a particular risk
rating are to be remediated.
• OWASP Defect dojo
Penetration testing
A penetration tester plays the role of the attacker to find and exploit vulnerabilities. This
helps provide a more accurate risk rating than vulnerability scans alone. Although penetration
testing occurs at the end of the SDLC, the results of the penetration test can provide feedback
for tests in the earlier phases. Such as additional rules for SAST and DAST scanners, and
to use SCA to confirm vulnerabilities found by the penetration test7 .
A penetration test report should clearly detail found vulnerabilities, and how to fix them. It
is also helpful to show how the vulnerability was exploited. This helps a developer test that
their fix has worked.
A security team needs to help the development team interpret the penetration test report and
provide guidance. An application security engineer may first check the report to remove any
false positives before assigning developers to address the found vulnerabilities.
7
Daniel Krasnokucki, Feedback loop in DevSecOps - mature security process and dev cooperation, OWASP
20th Anniversary. 2021.
23
OWASP Security Culture 1.0
Metrics
Use metrics to measure the progress of the security uplift program. According to OWASP
SAMM metrics ”evaluate the effectiveness and efficiency of the application security pro-
gram”8 . Metrics help to improve the security maturity by measuring the progress on the
defined maturity goals, and allow for adjustments to the security program to ensure the ma-
turity goals are met.
Metrics are used to tell a story to justify an action, such as a security budget, and argue for
change9 . Metrics are a useful tool to present to management to highlight where there may
be gaps in the organisation’s security posture that require additional resources to address,
or to show that resources spent on security are having the desired effect of reducing risk to
the organisation.
To start, examine business processes to see where they can be quantified and measured.
Metrics are measured over time, such as quarterly, to show a trend. It is important to know
what the desired direction for the metric to move is, up or down, and what activity may have
caused significant movement.10
Take note of which Software Development Lifecycle (SDLC) phase has identified the most
security issues. It is more expensive to fix security issues later in the development cycle.11
Aim to identify issues sooner in the SDLC in accordance with maturity goals.
Example metrics
Design - Threat Modelling
• number of threat models or threat modelling activities conducted
• number of findings from threat models
24
OWASP Security Culture 1.0
Security champions
• number of security champions onboarded
Training activities
• number of training activities introduced to developers
• number of developers onboarded to training activities
• number of developers engaged in particular training activities
25
OWASP Security Culture 1.0
26