GROWTH BLOG: The 5-95 Rule
AKF Partners Logo Technology ConsultingScalability - We wrote the book on it ℠

Growth Blog

Scalability and Technology Consulting Advice for SaaS and Technology Companies

Enhancing your Product Security Posture and Shifting Left

July 15, 2019  |  Posted By: Larry Steinberg

Shift Left Symbol atop a graphic of digital background with a large lock icon

It’s never been a better time to be a hacker or developer of malware as nearly every company has or is moving core functionality online and this makes these assets an open target for bad actors. Companies who are moving to deliver services from the cloud vs the traditional on premise mode have now taken on the liability for operating their product and the associated security (or lack thereof).  When acquiring or investing in a company there will be significant damage to value or reputation (or both) if a vulnerability is released into production and impacts the critical customer base.

Product security goes well beyond the network and system perimeter of old. Application functionality drives the need for making the product accessible to many different types of consumers. The traditional approach of locking down the perimeter and performing a late stage penetration test prior to release has many pitfalls:

  • Performing security testing at the end of the development cycle makes planning for a release date nearly impossible, or at the minimum, non-deterministic prior to security test results becoming available.
  • Patterns in coding tend to repeat themselves. So if you poorly code a database interaction (SQL injection), that will probably get replicated 10s or 100s of times. This leads to far more fixes in the later stage of delivery vs setting the best practice at the beginning.
  • Context switching is more costly than you might imagine. When 100k+ lines of code have been written, going back to fix code from the beginning or middle of the cycle requires considerable effort in ramping back up appropriate knowledge.

The overall goals for enhancing product security posture are multi-faceted:

  • Move security controls ‘left’ in the SDLC process (closer to the beginning).
  • Augment existing process with secure coding best practices.
  • Product security as a continuous concern – security must be as agile as your product and team.
  • Implement tools and controls via automation to achieve efficiency and compliance.
  • Enable planning for security remediations.
  • Reduce the expense of building secure software. Many studies have shown the expense of finding a bug late in the SDLC process will be 6-15x more than addressing the bug early in the design and coding process. Security vulnerabilities model the same expense curve.

Here are the phases of SDLC and suggestions for implementation:

Design Phase

During the component and system design phase, architecture reviews should focus on security threats in addition to the standard technical oversight.  Identifying all threats to the system and designs are critical along with creating mitigations before the implementation phase begins, or at least early in the implementation phase.

Development Phase

There are multiple options for identifying security issues while writing code and performing check-ins. Static code analysis can be triggered on check-in to assess code for identifying critical issues from the OWASP top 10 and other similar known bad patterns. Some IDE’s also have the ability to assess code prior to check-in or code review. In both cases, the developer is notified nearly immediately when they’ve produced a potential vulnerability.

Build Phase

As the code is built and linked with dependencies, you want to scan for free and open source software. Utilizing open source is great but you need to assess the risk to IP and malware. You should always know the origins of your code base and make intentional decisions about inclusion.  If you have a containerized environment, then the build phase is where you would implement some form of image scanning.

If you are leveraging Javascript and utilizing frameworks and package managers then consider going beyond just scanning for the presence of open source. You are most likely building from internet-based artifacts and how do you know if a vulnerability has been added to one of your dependencies? This is an on-ramp for malware into your environment. TODO – link. You need a solution which will proactively inform you if a dependent Javascript library has been flagged containing malware.

Test Phase

The integration test phase (where all of your components come together for verification) provides a great place for gray box security testing. These security tests would avoid perimeter style tools like WAFs and firewalls allowing the tests to focus on runtime features. Common exploits can be validated like cross-site scripting, SQL injections, XML injections, etc.

Runtime Phase

Traditionally this is where 3rd party penetration tests would occur in pre-production or production environments.  Containerization provides another opportunity to oversee the runtime environment to ensure malware has not made its way into the system or replicating across the system. When running containers you should be very thoughtful in how you compose, group, and manage the assets.

Summary

By implementing the right processes and tools in the right phases, your team will be informed of issues earlier in the SDLC process and reduce the overall cost of development while maintaining the ability to plan for highly secure product deliveries.  In an agile environment, automation and process augmentation can enable security to be a continuous concern. Over time, by building security controls into the SDLC process, security becomes a core part of the culture and everyday awareness.

At AKF we assist companies in enhancing their security posture. Let us know how we can help you.

Next: Architectural Principle: Use Commodity Hardware (and Cloud tools)

Categories:

Most Popular: