1. Trang chủ
  2. » Công Nghệ Thông Tin

Agile application security enabling security in a continuous delivery pipeline

705 341 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Cấu trúc

  • Preface

    • Who Should Read This Book

      • The Agile Practitioner

      • The Security Practitioner

      • The Agile Security Practitioner

    • Navigating This Book

      • Part 1: Fundamentals

      • Part 2: Agile and Security

      • Part 3: Pulling It All Together

    • Conventions Used in This Book

    • O’Reilly Safari

    • How to Contact Us

    • Acknowledgments

  • 1. Getting Started with Security

    • This Isn’t Just a Technology Problem

    • Not Just for Geeks

    • Security Is About Risk

      • Vulnerability: Likelihood and Impact

      • We Are All Vulnerable

      • Not Impossible, Just Improbable

      • Measuring the Cost

      • Risk Can Be Minimized, Not Avoided

      • An Imperfect World Means Hard Decisions

    • Threat Actors and Knowing Your Enemy

      • There Is an Attacker for Everyone

      • Motivation, Resources, Access

    • Security Values: Protecting Our Data, Systems, and People

      • Know What You Are Trying to Protect

      • Confidentiality, Integrity, and Availability

        • Confidentiality: Keep It Secret

        • Integrity: Keep It Safe

        • Availability: Keeping the Doors Open and the Lights On

      • Nonrepudiation

      • Compliance, Regulation, and Security Standards

    • Common Security Misconceptions or Mistakes

      • Security Is Absolute

      • Security Is a Point That Can Be Reached

      • Security Is Static

      • Security Requires Special [Insert Item/Device/Budget]

    • Let’s Get Started

  • 2. Agile Enablers

    • Build Pipeline

    • Automated Testing

    • Continuous Integration

    • Infrastructure as Code

    • Release Management

    • Visible Tracking

    • Centralized Feedback

    • The Only Good Code Is Deployed Code

    • Operating Safely and at Speed

  • 3. Welcome to the Agile Revolution

    • Agile: A Potted Landscape

    • Scrum, the Most Popular of Agile Methodologies

      • Sprints and Backlogs

      • Stand-ups

      • Scrum Feedback Loops

    • Extreme Programming

      • The Planning Game

      • The On-Site Customer

      • Pair Programming

      • Test-Driven Development

      • Shared Design Metaphor

    • Kanban

      • Kanban Board: Make Work Visible

      • Constant Feedback

      • Continuous Improvement

    • Lean

    • Agile Methods in General

    • What About DevOps?

    • Agile and Security

  • 4. Working with Your Existing Agile Life Cycle

    • Traditional Application Security Models

    • Per-Iteration Rituals

      • Tools Embedded in the Life Cycle

    • Pre-Iteration Involvement

      • Tooling for Planning and Discovery

    • Post-Iteration Involvement

      • Tools to Enable the Team

      • Compliance and Audit Tools

    • Setting Secure Baselines

    • What About When You Scale?

    • Building Security Teams That Enable

      • Building Tools That People Will Use

      • Documenting Security Techniques

    • Key Takeaways

  • 5. Security and Requirements

    • Dealing with Security in Requirements

    • Agile Requirements: Telling Stories

      • What Do Stories Look Like?

      • Conditions of Satisfaction

    • Tracking and Managing Stories: The Backlog

    • Dealing with Bugs

    • Getting Security into Requirements

      • Security Stories

      • Privacy, Fraud, Compliance, and Encryption

      • SAFECode Security Stories

    • Security Personas and Anti-Personas

    • Attacker Stories: Put Your Black Hat On

      • Writing Attacker Stories

    • Attack Trees

      • Building an Attack Tree

      • Maintaining and Using Attack Trees

    • Infrastructure and Operations Requirements

    • Key Takeaways

  • 6. Agile Vulnerability Management

    • Vulnerability Scanning and Patching

      • First, Understand What You Need to Scan

      • Then Decide How to Scan and How Often

      • Tracking Vulnerabilities

      • Managing Vulnerabilities

    • Dealing with Critical Vulnerabilities

    • Securing Your Software Supply Chain

      • Vulnerabilities in Containers

      • Fewer, Better Suppliers

    • How to Fix Vulnerabilities in an Agile Way

      • Test-Driven Security

      • Zero Bug Tolerance

      • Collective Code Ownership

    • Security Sprints, Hardening Sprints, and Hack Days

    • Taking On and Paying Down Security Debt

    • Key Takeaways

  • 7. Risk for Agile Teams

    • Security Says, No

    • Understanding Risks and Risk Management

    • Risks and Threats

    • Dealing with Risk

      • Making Risks Visible

      • Accepting and Transferring Risks

      • Changing Contexts for Risks

    • Risk Management in Agile and DevOps

      • Speed of Delivery

      • Incremental Design and Refactoring

      • Self-Organized, Autonomous Teams

      • Automation

      • Agile Risk Mitigation

    • Handling Security Risks in Agile and DevOps

    • Key Takeaways

  • 8. Threat Assessments and Understanding Attacks

    • Understanding Threats: Paranoia and Reality

      • Understanding Threat Actors

      • Threat Actor Archetypes

        • Insiders

        • Outsiders

      • Threats and Attack Targets

      • Threat Intelligence

      • Threat Assessment

    • Your System’s Attack Surface

      • Mapping Your Application Attack Surface

      • Managing Your Application Attack Surface

    • Agile Threat Modeling

      • Understanding Trust and Trust Boundaries

      • Building Your Threat Model

      • “Good Enough” Is Good Enough

      • Thinking Like an Attacker

      • STRIDE: A Structured Model to Understand Attackers

      • Incremental Threat Modeling and Risk Assessments

      • Assess Risks Up Front

      • Review Threats as the Design Changes

      • Getting Value Out of Threat Modeling

    • Common Attack Vectors

    • Key Takeaways

  • 9. Building Secure and Usable Systems

    • Design to Resist Compromise

    • Security Versus Usability

    • Technical Controls

      • Deterrent Controls

      • Resistive Controls

      • Protective Controls

      • Detective Controls

      • Compensating Controls

    • Security Architecture

      • Perimeterless Security

      • Assume Compromised

    • Complexity and Security

    • Key Takeaways

  • 10. Code Review for Security

    • Why Do We Need to Review Code?

    • Types of Code Reviews

      • Formal Inspections

      • Rubber Ducking or Desk Checking

      • Pair Programming (and Mob Programming)

    • Peer Code Reviews

      • Code Audits

      • Automated Code Reviews

      • What Kind of Review Approach Works Best for Your Team?

    • When Should You Review Code?

      • Before Code Changes Are Committed

      • Gated Checks Before Release

      • Postmortem and Investigation

    • How to Review Code

      • Take Advantage of Coding Guidelines

      • Using Code Review Checklists

      • Don’t Make These Mistakes

      • Review Code a Little Bit at a Time

      • What Code Needs to Be Reviewed?

    • Who Needs to Review Code?

      • How Many Reviewers?

      • What Experience Do Reviewers Need?

    • Automated Code Reviews

      • Different Tools Find Different Problems

        • Compiler warnings

        • Code style and code smells

        • Bug patterns

        • Security vulnerabilities (SAST)

        • Custom greps and detectors

        • Catching mistakes as you are coding

        • Vulnerable dependencies

        • Code complexity analysis and technical debt metrics

      • What Tools Are Good For, and What They’re Not Good For

      • Getting Developers to Use Automated Code Reviews

      • Self-Service Scanning

      • Reviewing Infrastructure Code

    • Code Review Challenges and Limitations

      • Reviews Take Time

      • Understanding Somebody Else’s Code Is Hard

      • Finding Security Vulnerabilities Is Even Harder

    • Adopting Secure Code Reviews

      • Build on What the Team Is Doing, or Should Be Doing

        • Make code reviews as easy as possible

        • Build on collective code ownership in Agile

      • Refactoring: Keeping Code Simple and Secure

      • Fundamentals Will Take You a Long Way to Secure, Safe Code

    • Reviewing Security Features and Controls

    • Reviewing Code for Insider Threats

    • Key Takeaways

  • 11. Agile Security Testing

    • How Is Testing Done in Agile?

    • If You Got Bugs, You’ll Get Pwned

    • The Agile Test Pyramid

    • Unit Testing and TDD

      • What Unit Testing Means to System Security

      • Get Off the Happy Path

    • Service-Level Testing and BDD Tools

      • Gauntlt (“Be Mean to Your Code”)

      • BDD-Security

      • Let’s Look Under the Covers

    • Acceptance Testing

    • Functional Security Testing and Scanning

      • ZAP Tutorial

      • ZAP in Continuous Integration

      • BDD-Security and ZAP Together

      • Challenges with Application Scanning

    • Testing Your Infrastructure

      • Linting

      • Unit Testing

      • Acceptance Testing

        • Test Kitchen

        • Serverspec

    • Creating an Automated Build and Test Pipeline

      • Nightly Build

      • Continuous Integration

      • Continuous Delivery and Continuous Deployment

      • Out-of-Band Testing and Reviews

      • Promoting to Production

      • Guidelines for Creating a Successful Automated Pipeline

      • Where Security Testing Fits Into Your Pipeline

    • A Place for Manual Testing in Agile

    • How Do You Make Security Testing Work in Agile and DevOps?

    • Key Takeaways

  • 12. External Reviews, Testing, and Advice

    • Why Do We Need External Reviews?

    • Vulnerability Assessment

    • Penetration Testing

    • Red Teaming

    • Bug Bounties

      • How Bug Bounties Work

      • Setting Up a Bug Bounty Program

      • Are You Sure You Want to Run a Bug Bounty?

    • Configuration Review

    • Secure Code Audit

    • Crypto Audit

    • Choosing an External Firm

      • Experience with Products and Organizations Like Yours

      • Actively Researching or Updating Skills

      • Meet the Technical People

    • Getting Your Money’s Worth

      • Don’t Waste Their Time

      • Challenge the Findings

      • Insist on Results That Work for You

      • Put Results into Context

      • Include the Engineering Team

      • Measure Improvement Over Time

      • Hold Review/Retrospective/Sharing Events and Share the Results

      • Spread Remediation Across Teams to Maximize Knowledge Transfer

      • Rotate Firms or Swap Testers over Time

    • Key Takeaways

  • 13. Operations and OpSec

    • System Hardening: Setting Up Secure Systems

      • Regulatory Requirements for Hardening

      • Hardening Standards and Guidelines

      • Challenges with Hardening

      • Automated Compliance Scanning

      • Approaches for Building Hardened Systems

      • Automated Hardening Templates

    • Network as Code

    • Monitoring and Intrusion Detection

      • Monitoring to Drive Feedback Loops

      • Using Application Monitoring for Security

      • Auditing and Logging

      • Proactive Versus Reactive Detection

    • Catching Mistakes at Runtime

    • Runtime Defense

      • Cloud Security Protection

      • RASP

    • Incident Response: Preparing for Breaches

      • Get Your Exercise: Game Days and Red Teaming

        • Game Days

        • Red Team/Blue Team

      • Blameless Postmortems: Learning from Security Failures

    • Securing Your Build Pipeline

      • Harden Your Build infrastructure

      • Understand What’s in the Cloud

      • Harden Your CI/CD Tools

      • Lock Down Configuration Managers

      • Protect Keys and Secrets

      • Lock Down Repos

      • Secure Chat

      • Review the Logs

      • Use Phoenix Servers for Build and Test

      • Monitor Your Build and Test Systems

    • Shh…Keeping Secrets Secret

    • Key Takeaways

  • 14. Compliance

    • Compliance and Security

    • Different Regulatory Approaches

      • PCI DSS: Rules-Based

      • Reg SCI: Outcome-Based

    • Which Approach Is Better?

    • Risk Management and Compliance

    • Traceability of Changes

    • Data Privacy

    • How to Meet Compliance and Stay Agile

      • Compliance Stories and Compliance in Stories

      • More Code, Less Paperwork

      • Traceability and Assurance in Continuous Delivery

      • Managing Changes in Continuous Delivery

      • Dealing with Separation of Duties

    • Building Compliance into Your Culture

      • Keeping Auditors Happy

      • Dealing with Auditors When They Aren’t Happy

    • Certification and Attestation

      • Continuous Compliance and Breaches

      • Certification Doesn’t Mean That You Are Secure

    • Key Takeaways

  • 15. Security Culture

    • The Importance of Security Culture

      • Defining “Culture”

      • Push, Don’t Pull

    • Building a Security Culture

    • Principles of Effective Security

      • Enable, Don’t Block

      • Transparently Secure

      • Don’t Play the Blame Game

      • Scale Security, Empower the Edges

      • The Who Is Just as Important as the How

    • Security Outreach

      • Securgonomics

      • Dashboards

    • Key Takeaways

  • 16. What Does Agile Security Mean?

    • Laura’s Story

      • Not an Engineer but a Hacker

      • Your Baby Is Ugly and You Should Feel Bad

      • Speak Little, Listen Much

      • Let’s Go Faster

      • Creating Fans and Friends

      • We Are Small, but We Are Many

    • Jim’s Story

      • You Can Build Your Own Security Experts

      • Choose People over Tools

      • Security Has to Start with Quality

      • You Can Make Compliance an Everyday Thing

    • Michael’s Story

      • Security Skills Are Unevenly Distributed

      • Security Practitioners Need to Get a Tech Refresh

      • Accreditation and Assurance Are Dying

      • Security Is an Enabler

    • Rich’s Story

      • The First Time Is Free

      • This Can Be More Than a Hobby?

      • A Little Light Bulb

      • Computers Are Hard, People Are Harder

      • And Now, We’re Here

  • Index

Nội dung

Agile Application Security Enabling Security in a Continuous Delivery Pipeline Laura Bell, Michael Brunton-Spall, Rich Smith, and Jim Bird Agile Application Security by Laura Bell, Michael Brunton-Spall, Rich Smith, and Jim Bird Copyright © 2017 Laura Bell, Rich Smith, Michael Brunton-Spall, Jim Bird All rights reserved Printed in the United States of America Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472 O’Reilly books may be purchased for educational, business, or sales promotional use Online editions are also available for most titles (http://oreilly.com/safari) For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com Editor: Courtney Allen Production Editor: Colleen Cole Copyeditor: Amanda Kersey Proofreader: Sonia Saruba Indexer: Wendy Catalano Interior Designer: David Futato Cover Designer: Karen Montgomery Illustrator: Rebecca Demarest September 2017: First Edition Revision History for the First Edition 2017-09-08: First Release See http://oreilly.com/catalog/errata.csp?isbn=9781491938843 for release details The O’Reilly logo is a registered trademark of O’Reilly Media, Inc Agile Application Security, the cover image, and related trade dress are trademarks of O’Reilly Media, Inc While the publisher and the authors have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work Use of the information and instructions contained in this work is at your own risk If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights 978-1-491-93884-3 [LSI] Preface Software is eating the world Developers are the new kingmakers The internet of things means there will be a computer in every light bulb These statements indicate the growing dominance of software development, to the point where most people in the world will never be further than a meter away from a computer, and we will expect much of our life to interact with computer-assisted objects and environments all the time But this world comes with some dangers In the old world of computing, security was often only considered in earnest for banking and government systems But the rise of ubiquitous computing means a rise in the value that can be realized from the abuse of systems, which increases incentives for misuse, which in turn increases the risks systems face Agile software development techniques are becoming rapidly adopted in most organizations By being responsive to change and dramatically lowering the cost of development, they provide a standard that we expect will continue to grow until the majority of software is built in an Agile manner However, security and Agile have not historically been great bedfellows Security professionals have had their hands full with the aforementioned government, ecommerce, and banking systems, trying to architect, test, and secure those systems, all in the face of a constantly evolving set of threats Furthermore, what is often seen as the most fun and exciting work in security, the things that get covered on the tech blogs and the nightly news, is done by teams of professional hackers focusing on vulnerability research, exploit development, and stunt hacks You can probably name a few recent branded vulnerabilities like Heartbleed, Logjam, or Shellshock (or heaven forbid even recognize their logos), or recognize the teams of researchers who have achieved a jailbreak on the latest iPhones and Android devices But when was the last time a new defensive measure or methodology had a cool, media-friendly name, or you picked up the name of a defender and builder? Security professionals are lagging behind in their understanding and experience of Agile development, and that creates a gap that is scary for our industry Equally, Agile teams have rejected and thrown off the shackles of the past No more detailed requirements specifications, no more system modeling, no more traditional Waterfall handoffs and control gates The problem with this is that Agile teams have thrown the baby out with the bathwater Those practices, while sometimes slow and inflexible, have demonstrated value over the years They were done for a reason, and Agile teams in rejecting them can easily forget and dismiss their value This means that Agile teams rarely consider security as much as they should Some of the Agile practices make a system more secure, but that is often a beneficial side effect rather than the purpose Very few Agile teams have an understanding of the threats that face their system; they don’t understand the risks they are taking; they don’t track or anything to control those risks; and they often have a poor understanding of who it even is that is attacking their creations Who Should Read This Book We don’t know if you are an Agile team leader, or a developer who is curious or wants to know more about security Maybe you are a security practitioner who has just found an entire development team you didn’t know existed and you want to know more This book was written with three main audiences in mind The Agile Practitioner You live, breathe, and Agile You know your Scrum from your Kaizen, your test-driven-development from your feedback loop Whether you are a Scrum Master, developer, tester, Agile coach, Product Owner, or customer proxy, you understand the Agile practices and values This book should help you understand what security is about, what threats exist, and the language that security practitioners use to describe what is going on We’ll help you understand how we model threats, measure risks, build software with security in mind, install software securely, and understand the operational security issues that come with running a service The Security Practitioner Whether you are a risk manager, an information assurance specialist, or a security operations analyst, you understand security You are probably careful how you use online services, you think about threats and risks and mitigations all of the time, and you may have even found new vulnerabilities and exploited them yourself This book should help you understand how software is actually developed in Agile teams, and what on earth those teams are talking about when they talk about sprints and stories You will learn to see the patterns in the chaos, and that should help you interact with and influence the team This book should show you where you can intervene or contribute that is most valuable to an Agile team and has the best effect The Agile Security Practitioner From risk to sprints, you know it all Whether you are a tool builder who is trying to help teams security well, or a consultant who advises teams, this book is also for you The main thing to get out of this book is to understand what the authors consider to be the growing measure of good practice This book should help you be aware of others in your field, and of the ideas and thoughts and concepts that we are seeing pop up in organizations dealing with this problem It should give you a good, broad understanding of the field and an idea for what to research or learn about next .. .Agile Application Security Enabling Security in a Continuous Delivery Pipeline Laura Bell, Michael Brunton-Spall, Rich Smith, and Jim Bird Agile Application Security by Laura Bell, Michael... defender and builder? Security professionals are lagging behind in their understanding and experience of Agile development, and that creates a gap that is scary for our industry Equally, Agile teams... “The attacker exploited a vulnerability in ” as you start to read about this area in more depth In these examples, the vulnerability was a flaw in an application s construction, configuration

Ngày đăng: 04/03/2019, 16:03

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN