DevSecCon London 2017: Shift happens ... by Colin Domoney

48
Join the conversation #DevSecCon BY COLIN DOMONEY Shift Happens …

Transcript of DevSecCon London 2017: Shift happens ... by Colin Domoney

Page 1: DevSecCon London 2017: Shift happens ... by Colin Domoney

Join the conversation #DevSecCon

BY COLIN DOMONEY

Shift Happens …

Page 2: DevSecCon London 2017: Shift happens ... by Colin Domoney

About Me

Page 3: DevSecCon London 2017: Shift happens ... by Colin Domoney

You May Remember Me from Conferences Such as ...

Page 4: DevSecCon London 2017: Shift happens ... by Colin Domoney

“How do I Shift”

• How do I fix?• How do I ensure coverage?

“I’m Shifting”

• How do I test?• How do I ensure I won’t get

slowed down?

The Changing Conversation

Page 5: DevSecCon London 2017: Shift happens ... by Colin Domoney

The Security Guys

• CISO• Head of IT Security• AppSec Manager

The “DevOps” Guys

• Delivery Manager• Application Lead• Automation Lead• “the guy who optimises stuff

and makes it go faster”

The Changing Personas

Page 6: DevSecCon London 2017: Shift happens ... by Colin Domoney

Security vs Speed

SECURITY SPEEDSECURITY SPEED

Page 7: DevSecCon London 2017: Shift happens ... by Colin Domoney
Page 8: DevSecCon London 2017: Shift happens ... by Colin Domoney

What Does the Market Say?

Page 9: DevSecCon London 2017: Shift happens ... by Colin Domoney

Testing Fast and Slow

Page 10: DevSecCon London 2017: Shift happens ... by Colin Domoney

The Dangers of Moving Fast

• Changes being made so quickly, and so often, that it is difficult to understand and review them for risk

• Lack of stage gates which means there are no natural points to insert reviews, tests or other controls

• Not enough time to do exhaustive testing or reviews

• Constantly changing risk profile

Page 11: DevSecCon London 2017: Shift happens ... by Colin Domoney

The Benefits of Moving Fast

• Frequent delivery drives teams to automate and standardize workflows, especially build-and-deploy pipelines, increasing control over and transparency into change.

• Most changes are incremental and small, which makes it easier to understand and test, and safer to release each change.

Page 12: DevSecCon London 2017: Shift happens ... by Colin Domoney

Fast and Incremental, Slow and Exhaustive

“The faster teams move, and the more they rely on automation, the more tradeoffs they need to make. Because not enough time is available to run deep, exhaustive scans or other security tests in continuous testing, organizations need to scan first for the most critical vulnerabilities. Then they need to target recently changed code for incremental testing and rely on smoke tests to catch other critical mistakes. Rules and tests that take too long to run or are too noisy need to be tuned or cut out, leaving holes in test coverage.

This means that periodic pen testing, in-depth manual reviews, configuration, auditing, deep scanning and fuzzing are still needed to find errors that escape tight automated loops.”

Page 13: DevSecCon London 2017: Shift happens ... by Colin Domoney

Three Steps to Shifting Left

• Establish an Inventory Baseline • What does your forward process look like?

• Assess Continuously and Feedback Findings• Visibility of findings

• Automate Testing Process• Optimise process• Amplify feedback loops

Page 14: DevSecCon London 2017: Shift happens ... by Colin Domoney

The Impact to Security Professionals

Page 15: DevSecCon London 2017: Shift happens ... by Colin Domoney

Encourage Early Adoption and Failure

• Test as early as possible• Allow failure• Enable learning• Automate

Page 16: DevSecCon London 2017: Shift happens ... by Colin Domoney

Make Your Tools Accessible and Freely Available

Page 17: DevSecCon London 2017: Shift happens ... by Colin Domoney

Becoming Selective in Test Scoping

• Some code is more security critical than other• Ensure adequate controls over

’security sensitive’ code• Manual/peer review changes• Use test harnesses to allow

fast, automated security scans

Page 18: DevSecCon London 2017: Shift happens ... by Colin Domoney

Abstract Your Testing Tools From the User

Page 19: DevSecCon London 2017: Shift happens ... by Colin Domoney

Be Mean to Your Code

Why Gauntlt?

“Security domain knowledge is generally a mystery to dev teams”

Page 20: DevSecCon London 2017: Shift happens ... by Colin Domoney

Secure Your Supply Chain

Page 21: DevSecCon London 2017: Shift happens ... by Colin Domoney

#1 : Prescribe a Policy for OSS Use

• Prescribe a policy for the use of OSS based on:• Risk appetite• Business criticality• Time to market• Organisational maturity

• Provide a recommended architecture of commonly used and pre-approved components

• Educate your security team in the use of OSS components and risk determination

Page 22: DevSecCon London 2017: Shift happens ... by Colin Domoney

#2 : Control Your Repositories

• Use a caching binary repository server (such as Nexus)

• Maintain a blacklist of known bad (and hence banned) components

• Maintain a whitelist of known good (and hence approved) components

• Quarantine unknown components until assessed• In extremis disable access to public internet

repositories

Page 23: DevSecCon London 2017: Shift happens ... by Colin Domoney

#3 : Maintain an Inventory of Components

Page 24: DevSecCon London 2017: Shift happens ... by Colin Domoney

The Changing Skillset Required

• Learn how to code!• Learn the ‘tools of the trade’ (Git, Ansible, etc.)• Learn the basics with a test application i.e. WebGoat.Net• Trawl developer communities (StackOverflow, etc.) for

security related topics and contribute• Contribute security patches to an OSS project• Experience a ‘Day in the Life’ of a Developer

Page 25: DevSecCon London 2017: Shift happens ... by Colin Domoney

The Impact to Security Tooling

Page 26: DevSecCon London 2017: Shift happens ... by Colin Domoney

I Love Static Analysis

, said no-one ever

Page 27: DevSecCon London 2017: Shift happens ... by Colin Domoney

Top Reasons to Hate Static Analysis

• Hard to use / not developer friendly

• False positives

• Sloooooooooooooooooooow

Page 28: DevSecCon London 2017: Shift happens ... by Colin Domoney
Page 29: DevSecCon London 2017: Shift happens ... by Colin Domoney

Near Instantaneous Scanning in a Pipeline

Page 30: DevSecCon London 2017: Shift happens ... by Colin Domoney

A Lot Quicker than 60 Seconds

Page 31: DevSecCon London 2017: Shift happens ... by Colin Domoney

A Better User Experience is Expected

Page 32: DevSecCon London 2017: Shift happens ... by Colin Domoney

Build a Map

Page 33: DevSecCon London 2017: Shift happens ... by Colin Domoney

And Then Measure Everything

Page 34: DevSecCon London 2017: Shift happens ... by Colin Domoney

Building and Optimising your Pipeline

• Policy and regulatory requirements?• Velocity of pipeline?• Risk appetite?• Technical debt?• Risk history?• Nature of the change?

Page 35: DevSecCon London 2017: Shift happens ... by Colin Domoney

#1 : Synchronous (aka. The Slowest Option)

ApplicationSAST

Page 36: DevSecCon London 2017: Shift happens ... by Colin Domoney

ApplicationSAST

#2 : Asynchronous (aka. The Riskiest Option)

RiskWindow

Page 37: DevSecCon London 2017: Shift happens ... by Colin Domoney

ApplicationSAST

#3 : Hybrid (aka. You’re Probably OK but …)

RiskWindow

Page 38: DevSecCon London 2017: Shift happens ... by Colin Domoney

ApplicationSAST

#4 : Incremental (aka. Making Shift Happen)

FileSAST

Page 39: DevSecCon London 2017: Shift happens ... by Colin Domoney

Do No (More) Harm

• Establish a baseline• Declare an amnesty• Accept no more flaws

Page 40: DevSecCon London 2017: Shift happens ... by Colin Domoney

What Happens When a Scan Fails?

Fall Back

• Go back to the last known good scan• Blue/green releases

Fall Forward

• If your velocity is sufficient wait for the next release• Ensure your

feedback loop is tight

Exception

• Proceed at risk• Understand the risk

Page 41: DevSecCon London 2017: Shift happens ... by Colin Domoney

An Informed Risk Acceptance Process

• Scan or risk history• Plain old (uncommon) common sense• Points/credits system• Machine Learning (tm) methods• Exception process

Page 42: DevSecCon London 2017: Shift happens ... by Colin Domoney
Page 43: DevSecCon London 2017: Shift happens ... by Colin Domoney

“Auto-Configuring” Pipelines

https://blogs.msdn.microsoft.com/visualstudioalmrangers/2017/04/20/set-up-a-cicd-pipeline-to-run-automated-tests-efficiently/

Page 44: DevSecCon London 2017: Shift happens ... by Colin Domoney

“Self-Adjusting” Policies

Page 45: DevSecCon London 2017: Shift happens ... by Colin Domoney

The Breakdown of the Monolith

• Discover and monitor inter-service communications• Segment and isolate applications and

services• Automate policy management and

configuration

https://www.darkreading.com/endpoint/rethinking-application-security-with-microservices-architectures-/a/d-id/1325155?

Page 46: DevSecCon London 2017: Shift happens ... by Colin Domoney

An Era of Greater Openness and Collaboration

Page 47: DevSecCon London 2017: Shift happens ... by Colin Domoney
Page 48: DevSecCon London 2017: Shift happens ... by Colin Domoney

Join the conversation #DevSecCon

Thank you