Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Crafting Secure Software
Crafting Secure Software

Crafting Secure Software: An engineering leader's guide to security by design

Arrow left icon
Profile Icon Greg Bulmash Profile Icon Thomas Segura
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Full star icon Full star icon 5 (1 Ratings)
Paperback Sep 2024 156 pages 1st Edition
eBook
$45.99
Paperback
$59.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Greg Bulmash Profile Icon Thomas Segura
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Full star icon Full star icon 5 (1 Ratings)
Paperback Sep 2024 156 pages 1st Edition
eBook
$45.99
Paperback
$59.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$45.99
Paperback
$59.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Crafting Secure Software

The Software Supply Chain and the SDLC

Software development and manufacturing have an unsurprising trend in common. In modern manufacturing, companies rarely make all their parts in-house. The automotive industry, for example, relies on a broad and complex network of vendors. This also means a defective vendor component can disrupt the entire supply chain. Consider how one vendor’s faulty airbag inflators caused the largest recall in American automotive history, impacting over half a dozen automakers who used those parts and tens of millions of vehicles. Modern software development faces similar issues.

In modern software development, too, it is increasingly rare for companies to create everything completely in-house. Like automakers, software companies rely on a range of third-party building blocks. Taking the supply chain management concept from manufacturing, each of these blocks becomes part of their SSC.

In this chapter, we will cover the following topics:

    ...

What is the software supply chain?

An SSC is every third-party element used by a software manufacturer to create and deliver their product. This includes, but is not limited to, the following:

  • The operating system(s) and hardware: These include workstations, servers, storage, network switches and routers, Windows/Mac/Linux embedded systems, and infrastructure as a service (IaaS).
  • Software for creating and building software: This includes editors, languages, compilers, plugins, libraries/frameworks, task runners, and build systems.
  • Software providing services to software: In this category, you have databases, APIs, software as a service (SaaS), platform as a service (PaaS), and backend as a service (BaaS).
  • Tools used for tracking and enabling work: These are tools that support version control, ticketing, messaging, and collaboration.
  • Tools for delivering software: These include file transfer, server software, containers, container orchestration, and monitoring...

Common supply chain attack vectors and defenses

In the complex landscape of modern software development, security threats are ever-evolving. As software systems increasingly rely on third-party components, external updates, and extensive code repositories, the potential attack surface grows, presenting significant challenges to maintain security and integrity. This section delves into several critical security scenarios and outlines proactive defenses to mitigate these risks.

Compromise of third-party components

Third-party components, such as libraries, frameworks, and packages can become dangerous if a threat actor is able to do one of these three things:

  • Inject malicious code into the one you use
  • Use a deceptive variation on that third-party component’s name, so you end up using a component the threat actor controls instead of the one you usually use
  • Use a known vulnerability in a component that has not been patched (or you have not updated to the...

Threat modeling

There are multiple approaches and tools in threat modeling, but at its core, there are three main areas: mapping data flows, analyzing attack surfaces, and assessing the impacts of failure.

The Open Web Application Security Project (OWASP) has a three-step threat-modeling process:3

  1. Decompose the application.
  2. Determine and rank threats.
  3. Determine countermeasures and mitigation.

Decompose the application

This starts with understanding the use cases for the application. For example, with a game, one use case might be to play the game, while another might be to top up tokens from the in-app store.

Then, identify the entry points where an attacker could interact with the application, resources, and assets that would be of interest to an attacker, and the trust levels and access rights the application grants to external entities such as users, tech support, moderators...

Risk assessment

While threat modeling is a technical activity that is more objective in nature, using risk assessment is more subjective and tied to your priorities, needs, and sensitivities.

Integrating risk assessment to rank the threats

Risk assessment takes two main vectors into account—likelihood and damage:

  • Likelihood: How likely is the threat to manifest? This takes into account how prized the result will be to an attacker and how easily they could get that result given your current defenses.
  • Damage: What would be the actual impact if an attacker successfully manifested the threat? Would it create additional threats? Would it expose anything of value to theft or discovery?

An example of a common threat is an automated “bot” filling out and submitting a form to register as a website user.

For example, a decade ago, it was easy for people to buy tens of thousands of followers on social media sites to make themselves look influential...

Real-world SSC attacks

Most of the SSC discussion to this point has been conceptual. The next section will highlight some examples of attacks on the SSC to illustrate how they can happen and the damage they can cause.

PHP: No harm, but foul

Based on a multi-year tracking survey by W3Techs, the PHP programming language was the backend language for over 80% of websites from 2014 to 2018, a figure that was still above 75%, as of February 2024.6

As mentioned in Chapter 1, Git is a protocol and system for source code management and version control. GitHub neither invented it nor owns it, but they are the most prominent commercial host of it for developers around the world.

PHP is an open source project hosted on its own Git server. In 2021, the server was breached and two backdoors were not only inserted in the source code for the programming language, but they were committed under the...

Summary

It’s not just our world that’s interconnected; our software is interconnected in ways few outside the industry can really grasp. Open source is not limited to big monoliths such as the WebKit browser engine, Linux, and the Apache web server. It contains packages that are dependencies for your dependencies, such as Log4j and left-pad.

Supply chain attacks can poison or infiltrate dependencies, browser and IDE plugins, source code management, build systems, testing tools, monitoring tools, and more. Attackers are opportunistic and find entry through probing, testing, phishing, and poisoning, to name a few.

This is why the SSC is something to consider at every stage of the SDLC, from gathering requirements to deployment and monitoring. Now that you understand the importance of the SSC, you’ll explore ways to secure it further in this book.

The next chapter will go deeper into methods of attacking and protecting one of the foundational elements of...

Left arrow icon Right arrow icon

Key benefits

  • Develop a strong security posture by grasping key attack vectors in the SDLC
  • Implement industry-leading best practices to protect software from evolving threats
  • Utilize legislative and regulatory landscapes to mitigate compliance-related costs

Description

Drawing from GitGuardian's extensive experience in securing millions of lines of code for organizations worldwide, Crafting Secure Software takes you on an exhaustive journey through the complex world of software security and prepares you to face current and emerging security challenges confidently. Authored by security experts, this book provides unique insights into the software development lifecycle (SDLC) and delivers actionable advice to help you mitigate and prevent risks. From securing code-writing tools and secrets to ensuring the integrity of the source code and delivery pipelines, you’ll get a good grasp on the threat landscape, uncover best practices for protecting your software, and craft recommendations for future-proofing against upcoming security regulations and legislation. By the end of this book, you’ll have gained a clear vision of the improvements needed in your security posture, along with concrete steps to implement them, empowering you to make informed decisions and take decisive action in safeguarding your software assets.

Who is this book for?

This book is an essential read for security and IT leaders navigating the complexities of modern software development. The book is also useful for chief security officers (CSOs), chief information security officers (CISOs), security architects, DevOps professionals, and IT decision makers. A basic understanding of software engineering, version control, and build and delivery mechanisms is needed. This guide will empower you to comprehend and mitigate threats in today's dynamic software factories, regardless of your technical depth.

What you will learn

  • Get to grips with security trends and GitGuardian's role in modern software
  • Analyze major security breaches and their impact on the industry
  • Develop a threat model tailored to your business and risk appetite
  • Implement security measures across your entire SDLC
  • Secure secrets within codebases, configurations, and artifacts
  • Design and maintain secure build pipelines and deployment setups
  • Navigate security compliance, including current and future laws
  • Prepare for future security with AI-generated code integration

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Sep 12, 2024
Length: 156 pages
Edition : 1st
Language : English
ISBN-13 : 9781835885062
Vendor :
GitGuardian
Category :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Sep 12, 2024
Length: 156 pages
Edition : 1st
Language : English
ISBN-13 : 9781835885062
Vendor :
GitGuardian
Category :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 144.96 159.97 15.01 saved
Crafting Secure Software
$59.99
Data Engineering Best Practices
$49.99
In-Memory Analytics with Apache Arrow
$34.98 $49.99
Total $ 144.96 159.97 15.01 saved Stars icon
Banner background image

Table of Contents

9 Chapters
Chapter 1: Introduction to the Security Landscape Chevron down icon Chevron up icon
Chapter 2: The Software Supply Chain and the SDLC Chevron down icon Chevron up icon
Chapter 3: Securing Your Code-Writing Tools Chevron down icon Chevron up icon
Chapter 4: Securing Your Secrets Chevron down icon Chevron up icon
Chapter 5: Securing Your Source Code Chevron down icon Chevron up icon
Chapter 6: Securing Your Delivery Chevron down icon Chevron up icon
Chapter 7: Security Compliance and Certification Chevron down icon Chevron up icon
Chapter 8: Best Practices to Drive Security Buy-In Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Full star icon 5
(1 Ratings)
5 star 100%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
Zardus Sep 22, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Decent overview of the security considerations of a dev-project.
Subscriber review Packt
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.