43
Copyright © 2006 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike 2.5 License. To view this license, visit http://creativecommons.org/licenses/by-sa/2.5/ The OWASP Foundation OWASP AppSec Seattle Oct 2006 http://www.owasp.org / Agile and Secure: Can We Be Both? Keith Landrus Director of Technology Denim Group Ltd. [email protected] (210) 572-4400

Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

Copyright © 2006 - The OWASP FoundationPermission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike 2.5 License. To view this license, visit http://creativecommons.org/licenses/by-sa/2.5/

The OWASP Foundation

OWASPAppSecSeattle

Oct 2006

http://www.owasp.org/

Agile and Secure:Can We Be Both?

Keith LandrusDirector of TechnologyDenim Group [email protected](210) 572-4400

Page 2: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

2OWASP AppSec Seattle 2006

The Agile Practitioner’s Dilemma

Agile Forces:More responsive to business concerns

Increasing the frequency of stable releases

Decreasing the time it takes to deploy new features

Secure Forces:More aggressive regulatory environment

Increasing focus on need for security

Traditional approaches are top-down, document centric

Page 3: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

3OWASP AppSec Seattle 2006

Objectives

Background

Goals of Agile Methods

Goals of Secure Development Lifecycle (SDL)

Review the Momentum of Agile Methods

Look at An Integrated Process

Challenges & Compromises

Page 4: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

4OWASP AppSec Seattle 2006

Notable Agile Methods

eXtreme Programming (XP)Feature Driven Development (FDD)SCRUMMSF for Agile Software DevelopmentAgile Unified Process (AUP)Crystal ClearDynamic Systems Development Method (DSDM)

Page 5: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

5OWASP AppSec Seattle 2006

Manifesto for Agile Software Development

Individuals and interactions over processes and tools

Working software over comprehensive documentation

Customer collaboration over contract negotiation

Responding to change over following a plan

Source: http://www.agilemanifesto.org/

Page 6: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

6OWASP AppSec Seattle 2006

Agile’s Core Values

Communication

Simplicity

Feedback

Courage

Page 7: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

7OWASP AppSec Seattle 2006

Principles of Agile Development

Rapid Feedback

Simple Design

Incremental Change

Embracing Change

Quality Work

• The system is appropriate for the intended audience.

• The code passes all the tests.

• The code communicates everything it needs to.

• The code has the smallest number of classes and methods.

Page 8: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

8OWASP AppSec Seattle 2006

Agile Practices

The Planning Game

The Driving Metaphor

Shared Vision

On-Site Customer

Small Releases

• Customer: scope, priorities and release dates

• Developer: estimates, consequences and detailed scheduling

• Development iterations or cycles that last 1-4 weeks.

• Release iterations as soon as possible (weekly, monthly, quarterly).

Page 9: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

9OWASP AppSec Seattle 2006

More Agile Practices

Test Driven

Collective Ownership

Coding Standards

Pair Programming

Continuous Integration

• Programmer tests guide the development process. Red, Green, Refactor

• Customer tests provide feedback to the team that the system is working as expected.

Continuously build, deploy and execute all of the system’s tests multiple times per day.

Page 10: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

10OWASP AppSec Seattle 2006

Agile Methods strive to…

Adapt to ever-changing customer needs.

Bring together small teams of highly talented individuals and remove obstacles that get in the way of developing quality systems.

Maintain a strong emphasis on testing.

Page 11: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

11OWASP AppSec Seattle 2006

A secure product is one that protects the confidentiality, integrity, and availability of the customers’ information, and the integrity and availability of processing resources under control of the system’s owner or administrator.

-- Source: Writing Secure Code (Microsoft.com)

Page 12: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

12OWASP AppSec Seattle 2006

A Secure Development Process…

Strives To Be A Repeatable Process

Requires Team Member Education

Tracks Metrics and Maintains Accountability

Sources:“Writing Secure Code” 2nd Ed., Howard & LeBlanc

“The Trustworthy Computing Security Development Lifecycle”by Lipner & Howard

Page 13: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

13OWASP AppSec Seattle 2006

Secure Development Principles

SD3: Secure by Design, Secure by Default, and in DeploymentLearn From MistakesMinimize Your Attack SurfaceAssume External Systems Are InsecurePlan On Failure Never Depend on Security Through Obscurity

AloneFix Security Issues Correctly

Page 14: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

14OWASP AppSec Seattle 2006

Secure Development Practices

Education, Education, Education

Threat Modeling

Secure Coding Techniques

Security Testing

Security Code Reviews

Page 15: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

15OWASP AppSec Seattle 2006

Microsoft’s Secure Development Lifecycle (SDL)

Requirements DesignImplementationVerificationRelease

Page 16: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

16OWASP AppSec Seattle 2006

SDL: Requirements Phase Activities

Determine (or make contact with) the security advisor “security buddy”

Identify key security objectives for the system

Consider Security Feature Requirements

Page 17: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

17OWASP AppSec Seattle 2006

SDL: Design Phase Activities

Define Security Architecture and Design Guidelines

Document the Attack Surface

Conduct Threat Modeling

Define Supplemental Ship Criteria

Page 18: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

18OWASP AppSec Seattle 2006

SDL: Implementation Phase Activities

Apply Common Coding Standards

Apply Security-Testing Tools

Apply Static-Analysis Code Scanning Tools

Conduct Security Code Reviews

Page 19: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

19OWASP AppSec Seattle 2006

SDL: Verification Phase Activities

Conduct the “Security Push”Additional Security Code ReviewsFocused Security Testing

Page 20: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

20OWASP AppSec Seattle 2006

SDL: Release, Support & Servicing Activities

Conduct the Final Security Review (FSR) Prior to Release

Prepare to Respond to Vulnerability Reports

Learn from Errors and Mistakes

Page 21: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

21OWASP AppSec Seattle 2006

Observations of the SDL in Practice

Threat Modeling is the Highest-Priority Component

Penetration Testing Alone is Not the Answer

Tools Should be Complementary

Microsoft’s experience has indicated that the SDL has been effective at reducing security vulnerabilities in their products.

Page 22: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

22OWASP AppSec Seattle 2006

Dr. Dobb’s says Agile Methods Are Catching On

41% of organizations have adopted an agile methodology

65% have adopted one or more agile techniques

Of the 2,611 respondents doing agile…

37% using eXtreme Programming19% using Feature Driven Development (FDD)16% using SCRUM7% using MSF for Agile Software Development

Source: http://www.ddj.com/dept/architect/191800169

Page 23: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

23OWASP AppSec Seattle 2006

Agile Teams are “Quality Infected”

60% reported increased productivity6% reported a decrease

66% reported improved quality

58% improved stakeholder satisfaction3% reported a decrease

Page 24: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

24OWASP AppSec Seattle 2006

Adoption Rate for Agile Practices

Of the respondents using an agile method…

36% have active customer participation

61% have adopted common coding guidelines

53% perform code regression testing

37% utilize pair programming

Page 25: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

25OWASP AppSec Seattle 2006

Let’s Look at Some Specific Agile Methods

eXtreme Programming (XP)

Feature Driven Development (FDD)

SCRUM

MSF for Agile Software Development

Page 26: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

26OWASP AppSec Seattle 2006

eXtreme Programming (XP)

Light-weight, small-to-medium sized teamsWork on things that really matter every dayGet the most possible value out of every development weekTakes commonsense principles and practices to extreme levels.

Page 27: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

27OWASP AppSec Seattle 2006

Feature Driven Development (FDD)

Startup Phase

Develop an Overall Model

BuildFeatures

ListPlanning

Designby

Feature

Buildby

Feature

Construction Phase

Source: http://featuredrivendevelopment.com/

Page 28: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

28OWASP AppSec Seattle 2006

SCRUM

Commonly Used to Enhance Existing Systems Feature Backlog 30 Day SprintsDaily Team Meeting

Source: http://www.controlchaos.com/

Page 29: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

29OWASP AppSec Seattle 2006

MSF for Agile Software Development

Adapted from the MSF’s Spiral / Waterfall Hybrid

Product definition, development and testing occurs in overlapping iterations

Different iterations have a different focus

Page 30: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

30OWASP AppSec Seattle 2006

Let’s Look at an Integrated Process

Making Agile Trustworthy

Page 31: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

31OWASP AppSec Seattle 2006

Project Roles

Product Manager / CustomerProgram Manager / CoachArchitectDeveloperTesterSecurity Adviser

Page 32: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

32OWASP AppSec Seattle 2006

Project Setup

Education & Training (include Security)DevelopersTestersCustomers

User Stories / Use Case Development

Architecture Decisions (spikes)

Page 33: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

33OWASP AppSec Seattle 2006

Release Planning

User Stories / Use Cases Drive…Acceptance Test ScenariosEstimations may affect priorities and thus the

composition of the releaseInputs for Threat ModelingSecurity Testing Scenarios

Finalize Architecture & Development GuidelinesCommon Coding Standards (include security)Conduct Initial Threat Modeling (assets & threats)Designer’s Security Checklist

Page 34: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

34OWASP AppSec Seattle 2006

Iteration Planning

1-4 Weeks in Length (2 weeks is very common)

Begins with an Iteration Planning Meeting User Stories are broken down into Development

TasksDevelopers estimate their own tasksDocument the Attack Surface (Story Level)

Never Slip the DateAdd or Remove Stories As Necessary

Page 35: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

35OWASP AppSec Seattle 2006

Anatomy of a 2 Week Iteration

Day 10:- Iteration close out- Security testing

Days 4 – 9:- Developers complete tasks- Testers implement automated acceptance testsDay 9:- Security Code Review

Days 2 & 3:- Architectural spikes

- Agile Modeling- Attack surface & Threat Modeling

Day 1:-Iteration Planning Meeting

- Developers signup for tasks

Page 36: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

36OWASP AppSec Seattle 2006

Executing an Iteration

Daily Stand-ups

Continuous IntegrationCode Scanning ToolsSecurity Testing Tools

Adherence to Common Coding Standards and Security Guidelines

Pair ProgrammingNew Features, Refactoring, Hazardous Components

Developer’s Checklist

Page 37: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

37OWASP AppSec Seattle 2006

Stabilizing a Release

Just like any other iteration

Schedule Defects & Vulnerabilities based on customer priorities

Final Security Review (FSR)

Page 38: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

38OWASP AppSec Seattle 2006

Challenges & Compromises

Balance of Code Review vs. Pair Programming

SDL Techniques practices in small doses throughout the duration of the project

Threat Modeling performed against a moving target

Page 39: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

39OWASP AppSec Seattle 2006

Can We Be Both?

Communication

Simplicity

Feedback

Courage

Trustworthy

Page 40: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

40OWASP AppSec Seattle 2006

Book Resources

Extreme Programming Explained: Embrace Change, Kent Beck, Addison Wesley

Planning Extreme Programming, Kent Beck and Martin Fowler, Addison Wesley

Writing Secure Code 2nd Edition, Michael Howard and David LeBlanc, Microsoft Press

Page 41: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

41OWASP AppSec Seattle 2006

Article Resources

The New Methodology, Martin Fowlerhttp://www.martinfowler.com/articles/newMethodology.html

The Trustworthy Computing Security Development Lifecycle, SteveLipner and Michael Howardhttp://msdn.microsoft.com/security/default.aspx

Survey Says: Agile Works in Practice, Scott Amblerhttp://www.ddj.com/dept/architect/191800169

SCRUM Development Process, Ken Schwaber, Advanced Development Methodshttp://jeffsutherland.com/oopsla/schwapub.pdf

Page 42: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

42OWASP AppSec Seattle 2006

Web Site Resources

http://www.agilealliance.org

http://www.xprogramming.com

http://www.featuredrivendevelopment.com

http://www.controlchaos.com

http://msdn.microsoft.com/vstudio/teamsystem/msf/msfagile

Page 43: Can We Be Both? - OWASP · Agile Practices The Planning Game The Driving Metaphor Shared Vision On-Site Customer Small Releases •Customer:scope, priorities and release dates •

43OWASP AppSec Seattle 2006

Questions & Answers