liveBook · Manning

Shift left

As explained in Secure APIs

Shift left is a software security approach that moves security activities earlier in the development lifecycle.

Shift left is a software development approach that builds security into an API from design onward instead of waiting until deployment to test for vulnerabilities. Earlier checks shorten the feedback loop, reduce costly redesign, and support faster, more confident releases. section 1.2 section 3.1

Apply shift-left security throughout the development lifecycle:

  • Assess vulnerabilities during API design, including unsafe user flows, exposed server-side properties, unconstrained input, and sensitive data exposure. section 3.0 section 6.0
  • Use accurate API specifications, secure implementation patterns, validation libraries, and automated tests for access controls. section 3.1 section 3.0
  • Treat failed security tests as feedback: address the vulnerability before moving to the next development stage. section 3.7

Designing away property enumeration

An API exposes a server-side stock property that lets users sort products by available stock. An attacker can use that information to target scarce products in a scalping attack. A late, bolt-on fix might patch SQL injection with a regular expression while leaving property enumeration exposed. A design-level fix constrains sortable values with an enumeration, addressing both risks by design.

How Secure APIs covers it

How deep it goes
Explains the lifecycle principle, design risks, testing practices, and mitigations, but does not provide detailed implementation code.
Examples
Uses deployment-time testing, an exposed stock property, scalping, SQL injection, regular-expression patching, and enumeration constraints.
What it assumes
Assumes familiarity with building APIs but teaches security concerns from API design and the development lifecycle onward.
What you can do after
Apply it by assessing vulnerabilities during design, testing frequently, and resolving failures before advancing through development.
How it connects
Connects API security by design with API specifications, secure implementation, automated testing, API documentation, and the software development lifecycle.

Also explained in

Compare how 2 books explain shift left →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Secure APIs. The section links point to the parts of the book it draws on.