Developing secure software: how to implement the OWASP top 10 Proactive Controls | Snyk (2024)

Recently, I was thinking back at a great opening session of DevSecCon community we had last year, featuring no other than Jim Manico.

In this session, Jim walked us through the list of OWASP Top 10 proactive controls and how to incorporate them into our web applications. The proactive controls document, written by Manico himself, along with Katy Anton and Jim Bird, provides a security overview for developers wanting to jump into web security, understand the different layers of security risks, and how to protect against them.

If you find this interesting, then keep reading as we dive into the OWASP top 10 Proactive Controls, one by one!

OWASP top 10 Proactive Controls 2020

  1. Define Security Requirements

  2. Leverage Security Frameworks and Libraries

  3. Secure Database Access

  4. Encode and Escape Data

  5. Validate All Inputs

  6. Implement Digital Identity

  7. Enforce Access Controls

  8. Protect Data Everywhere

  9. Implement Security Logging and Monitoring

  10. Handle All Errors and Exceptions

OWASP Proactive Control 1 — define security requirements

Building a secure product begins with defining what are the security requirements we need to take into account. Just as business requirements help us shape the product, security requirements help us take into account security from the get-go.

A prominent OWASP project named Application Security Verification Standard—often referred to as OWASP ASVS for short—provides over two-hundred different requirements for building secure web application software.

It lists security requirements such as authentication protocols, session management, and cryptographic security standards. Most importantly, the ASVS provides a phased approach to gradually implement security requirements as you are making your first steps.

Developing secure software: how to implement the OWASP top 10 Proactive Controls | Snyk (1)

Source: GitHub

OWASP Proactive Control 2 — leverage security frameworks and libraries

What tools do you need to help you build secure software?

The list goes on from injection attacks protection to authentication, secure cryptographic APIs, storing sensitive data, and so on. To address these concerns, use purposely-designed security libraries.

Make sure you track the use of open source libraries and maintain an inventory of versions, their licenses and vulnerabilities such as OWASP's top 10 vulnerabilities using tools like OWASP’s Dependency Check or Snyk.

OWASP Proactive Control 3 — securing database access

Databases are often key components for building rich web applications as the need for state and persistency arises.

Database security expands to numerous areas including

  • protection from SQL injections with techniques such as parameter binding. It is also of great importance to monitor for vulnerabilities in ORM and SQL libraries that you make use of as we’ve seen with the recent incident of Sequelize ORM npm library found vulnerable to SQL Injection attacks.

  • secure and strong database authentication and overall configuration.

  • secure communication between the database and its client.

Interested in reading more about SQL injection attacks and why it is a security risk? Jim gave some tips on bobby-tables.com.

OWASP Proactive Control 4 — encode and escape data

Always treat data as untrusted, since it can originate from different sources which you may not always have insights into.

Cross-site Scripting (XSS) vulnerabilities are an excellent example of how data may flow through the system and end up employing malicious code in a browser context, such as JavaScript, that get evaluated and compromises the browser.

Other examples that require escaping data are operating system (OS) command injection, where a component may execute system commands that originate from user input, and hence carry the risk of malicious commands being executed.

I am pulling data from the database. Should I escape it? The secure developer definitely does. It is impractical to track and tag whether a string in a database was tainted or not. Instead, you build proper controls in the presentation layer, such as the browser, to escape any data provided to it.

An extreme exception to that rule is when you have decided to build a web page DOM element, or more, from the database input, in which case, you are sailing dangerous waters and should think carefully on your model and what controls help you to mitigate dangers that come along with it.

Here are some libraries to help you with data sanitization:

Important to note that the OWASP ESAPI project is behind on active maintenance and you’d better seek out other solutions.

Finally, we wrote about command injection: how it works, what are the risks and how to prevent it which I highly recommend as a follow-up read.

OWASP Proactive Control 5 — validate all inputs

Just as you’d often leverage the typing system, like TypeScript, to ensure expected and valid variables are passed around your code, you should also be validating the input you received matches your expectations or models of that data.

General guidelines:

  • Do not rely on validation as a countermeasure for data escaping, as they are not exchangeable security controls.

  • When validating data input,s strive to apply size limits for all types of inputs.

OWASP Proactive Control 6 — implement digital identity

How do you identify a user’s identity? The answer is with security controls such as authentication, identity proofing, session management, and so on.

For any of these decisions, you have the ability to roll your own–managing your own registration of users and keeping track of their passwords or means of authentication. As an alternative, you can choose to managed services and benefit from the cloud’s Serverless architecture of services like Auth0.

This topic is broad and when in need to verify and confirm a digital identity layer is handled in a secure manner, refer to NIST 800-63-3B for digital identity guidelines. The NIST document helps with defining how to address password security.

OWASP Proactive Control 7 — enforce access control

It’s highly likely that access control requirements take shape throughout many layers of your application. For example, when pulling data from the database in a multi-tenant SaaS application, where you need to ensure that data isn’t accidentally exposed for different users. Another example is the question of who is authorized to hit APIs that your web application provides.

One tip from Jim here is to avoid referring to roles related data access through code, which leads to hard-coding the policy access. As an example for that, think about checks in code, such as if (user.role === 'admin'). Instead, a capability-like approach such as permissions based access control doesn’t enforce the actual policy. An example for that is if (user.canDelete(blogPostId).

OWASP Proactive Control 8 — protect data everywhere

In the Snyk app, as we deal with data of our users and our own, it is crucial that we treat our application with the out-most care in terms of its security and privacy, protecting it everywhere needed.

Consider the following action items when handling data:

  • Protect data over the transport, by employing HTTPS in a properly configured manner / up to date security protocols, such as TLS 1.3 and strong cryptographic ciphers.

  • Make use of secure HTTP headers that leverage the browser’s security capabilities, such as HTTP Strict Transport Security (HSTS) and establishing a Content Security Policy (CSP) for data trust.

  • When performing cryptography-related tasks always leverage well-known libraries and do not roll your own implementations of these.

OWASP Proactive Control 9 — implement security logging and monitoring

As application developers, we are used to logging data that helps us debug and trace issues concerning wrong business flows or exceptions thrown. Security-focused logging is another type of data logs that we should strive to maintain in order to create an audit trail that later helps track down security breaches and other security issues.

Here are some suggestions for security logging:

  • all input validation failures

  • all authentication events, good and bad passwords, logins, or session-related data

  • all access control failures such as attempts for privilege escalation

OWASP Proactive Control 10 — handle all errors and exceptions

Properly handling errors and exceptions from web applications is not only good for an applications’ health but also ensures that no sensitive data is leaked.

Follow these guidelines:

  • Manage any exceptions in a centralized manner.

  • Ensure that unhandled behavior is caught and handled correctly using a standardized methodology throughout.

  • Ensure that all data being captured avoids sensitive information such as stack traces, or cryptographic error codes.

Join the DevSecCon community

I invite you to join the DevSecCon community and learn more through our webinars and online Snyk User Community that help developers get into security and write secure code!

Live Hack: Exploiting AI-Generated Code

Gain insights into best practices for utilizing generative AI coding tools securely in our upcoming live hacking session.

Register now

Developing secure software: how to implement the OWASP top 10 Proactive Controls | Snyk (2024)

FAQs

Developing secure software: how to implement the OWASP top 10 Proactive Controls | Snyk? ›

OWASP, or the Open Web Application Security Project, is a nonprofit entity aimed at bolstering the security of software. It's a collaborative platform where security experts and developers contribute to creating open-source tools and resources for secure software development within the software development lifecycle.

How to implement OWASP? ›

Developer Guide (draft)
  1. Introduction.
  2. Foundations. 2.1 Security fundamentals. ...
  3. Requirements. 3.1 Requirements in practice. ...
  4. Design. 4.1 Threat modeling. ...
  5. Implementation. 5.1 Documentation. ...
  6. Verification. 6.1 Guides. ...
  7. Training and Education. 7.1 Vulnerable Applications. ...
  8. Culture building and Process maturing. 8.1 Security Champions Playbook.

What do developers use for OWASP Top 10? ›

What is the OWASP Top 10?
  • A01:2021-Broken Access Control.
  • A02:2021-Cryptographic Failures.
  • A03:2021-Injection.
  • A04:2021-Insecure Design.
  • A05:2021-Security Misconfiguration.
  • A06:2021-Vulnerable and Outdated Components.
  • A07:2021-Identification and Authentication Failures.
  • A08:2021-Software and Data Integrity Failures.

What is OWASP in software development? ›

OWASP, or the Open Web Application Security Project, is a nonprofit entity aimed at bolstering the security of software. It's a collaborative platform where security experts and developers contribute to creating open-source tools and resources for secure software development within the software development lifecycle.

Which OWASP Top 10 item best relates to implementing strong password policies? ›

What is the OWASP Top 10?
  • Injection. ...
  • Broken Authentication. ...
  • Sensitive Data Exposure. ...
  • XML External Entities (XEE) ...
  • Broken Access Control. ...
  • Security Misconfiguration. ...
  • Cross-Site Scripting. ...
  • Insecure Deserialization.

What are OWASP proactive controls? ›

The OWASP Top 10 Proactive Controls 2024 is a list of security techniques every software architect and developer should know and heed. The main goal of this document is to provide concrete, practical guidance that helps developers build secure software.

How do you implement basic cyber security control? ›

Deny/Prevent Access through a preventative control such as access permissions or authentication. Detect the risk, making sure to log the detection, such as with endpoint protection software. Delay the process of the risk from happening again, such as with a "too many attempts" function for a password entry.

What is OWASP secure coding? ›

The Secure Coding Practices Quick Reference Guide is a technology agnostic set of general software security coding practices, in a comprehensive checklist format, that can be integrated into the development lifecycle.

What is OWASP Top 10 in simple words? ›

The OWASP Top 10 is a standard awareness document for developers and web application security. It represents a broad consensus about the most critical security risks to web applications. Globally recognized by developers as the first step towards more secure coding.

Is OWASP Top 10 still relevant? ›

Is OWASP still relevant? The most recent OWASP Top 10 was released in 2021. Before this, there had not been a substantial update since 2017. While there have been several significant security developments since then, the 2021 edition remains relevant and well-respected in cybersecurity.

What is OWASP in Devops? ›

The OWASP® Foundation works to improve the security of software through its community-led open source software projects, hundreds of chapters worldwide, tens of thousands of members, and by hosting local and global conferences.

What is OWASP methodology? ›

All things considered, the OWASP methodology is a tried-and-true way of identifying and mitigating security threats in web applications. It is regarded as a best practice for web application security testing and has been widely implemented by enterprises worldwide.

Is OWASP a security framework? ›

The OWASP Security Knowledge Framework is incredibly relevant to current application security and should be required in any organization for training developers, security researchers, and even gathering requirements.

What benefits do developers gain from the OWASP Top 10? ›

The OWASP Top 10 is important because it gives organisations a priority over which risks to focus on and helps them understand, identify, mitigate, and fix vulnerabilities in their technology. Each identified risk is prioritised according to prevalence, detectability, impact and exploitability.

What is the difference between NIST and OWASP? ›

OWASP focuses more on the technical aspects of web security, such as identifying and preventing common vulnerabilities and attacks. NIST focuses more on the organizational aspects of web security, such as establishing and maintaining a security culture and governance.

How to secure a web application from vulnerabilities? ›

Web Application Security Eco-system Encompasses The Following Technologies:
  1. Input testing.
  2. White box testing. Employing source code analyzers.
  3. Black box testing using security scanners for vulnerabilities and penetration.
  4. Brute force attacks testing.
  5. DoS attacks testing.
Dec 27, 2023

What is the main way to get involved in OWASP? ›

The primary way members first get involved is by supporting a Project or attending local chapter meetings.

What is OWASP and how it works? ›

The Open Web Application Security Project (OWASP) is a non-profit organization founded in 2001, with the goal of helping website owners and security experts protect web applications from cyber attacks. OWASP has 32,000 volunteers around the world who perform security assessments and research.

How do you automate OWASP? ›

The Automation Framework. The Automation Framework (AF) allows you to control ZAP with one yaml file. There are other ways to automate ZAP, but the AF is recommended for most OWASP ZAP users. You can create the yaml file in a text editor.

How do you implement a security management system? ›

9 Steps on Implementing an Information Security Program
  1. Step 1: Build an Information Security Team. ...
  2. Step 2: Inventory and Manage Assets. ...
  3. Step 3: Assess Risk. ...
  4. Step 4: Manage Risk. ...
  5. Step 5: Develop an Incident Management and Disaster Recovery Plan. ...
  6. Step 6: Inventory and Manage Third Parties. ...
  7. Step 7: Apply Security Controls.
Jan 8, 2024

Top Articles
The Best Stuffing Recipe Ever | Thanksgiving Stuffing Recipe
50+ Air Fryer Recipes • The Healthy Kitchen Shop
neither of the twins was arrested,传说中的800句记7000词
Paris 2024: Kellie Harrington has 'no more mountains' as double Olympic champion retires
Doby's Funeral Home Obituaries
Learn How to Use X (formerly Twitter) in 15 Minutes or Less
Aries Auhsd
Immediate Action Pathfinder
Busted Newspaper S Randolph County Dirt The Press As Pawns
House Party 2023 Showtimes Near Marcus North Shore Cinema
Truck Trader Pennsylvania
What Happened To Anna Citron Lansky
Aucklanders brace for gales, hail, cold temperatures, possible blackouts; snow falls in Chch
WEB.DE Apps zum mailen auf dem SmartPhone, für Ihren Browser und Computer.
Water Days For Modesto Ca
How to Create Your Very Own Crossword Puzzle
Watch The Lovely Bones Online Free 123Movies
V-Pay: Sicherheit, Kosten und Alternativen - BankingGeek
Allybearloves
Hampton University Ministers Conference Registration
F45 Training O'fallon Il Photos
Wiseloan Login
Essence Healthcare Otc 2023 Catalog
Manuela Qm Only
Panolian Batesville Ms Obituaries 2022
Nk 1399
Greater Orangeburg
Craigs List Tallahassee
Abga Gestation Calculator
Pokemmo Level Caps
O'reilly Auto Parts Ozark Distribution Center Stockton Photos
Here’s how you can get a foot detox at home!
Litter-Robot 3 Pinch Contact & DFI Kit
How to Get Into UCLA: Admissions Stats + Tips
Federal Student Aid
Truckers Report Forums
Family Fare Ad Allendale Mi
Keeper Of The Lost Cities Series - Shannon Messenger
SF bay area cars & trucks "chevrolet 50" - craigslist
Skill Boss Guru
Vision Source: Premier Network of Independent Optometrists
Pekin Soccer Tournament
Content Page
Iupui Course Search
Suntory Yamazaki 18 Jahre | Whisky.de » Zum Online-Shop
Devotion Showtimes Near Showplace Icon At Valley Fair
Wood River, IL Homes for Sale & Real Estate
Marine Forecast Sandy Hook To Manasquan Inlet
Strawberry Lake Nd Cabins For Sale
Ingersoll Greenwood Funeral Home Obituaries
Bomgas Cams
Dr Seuss Star Bellied Sneetches Pdf
Latest Posts
Article information

Author: Aracelis Kilback

Last Updated:

Views: 5762

Rating: 4.3 / 5 (44 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Aracelis Kilback

Birthday: 1994-11-22

Address: Apt. 895 30151 Green Plain, Lake Mariela, RI 98141

Phone: +5992291857476

Job: Legal Officer

Hobby: LARPing, role-playing games, Slacklining, Reading, Inline skating, Brazilian jiu-jitsu, Dance

Introduction: My name is Aracelis Kilback, I am a nice, gentle, agreeable, joyous, attractive, combative, gifted person who loves writing and wants to share my knowledge and understanding with you.