Tag Archive for: Educational

Posts

Post-Quantum Cryptography: A Skeptic’s Introduction

Contents

  1. Introduction: hype or real need?
  2. What problem are we actually talking about?
  3. What is post-quantum cryptography?
  4. Why would we need it if quantum computers can’t break anything yet?
  5. What the institutions say: BSI, ANSSI, EU, NIST
  6. Where I remain skeptical
  7. When should you use PQC?
  8. What does it cost?
  9. The bottom line
  10. Sources and further reading

Introduction: hype or real need?

Every few years our industry finds a new deadline to fear. I remember Y2K, the SHA-1 sunset and the long goodbye to TLS 1.0. Now it is “Q-Day”: the day a quantum computer breaks the public-key cryptography the internet runs on. Conference talks warn about it, vendor whitepapers come with countdown clocks, and more and more products carry a “quantum-safe” sticker.

I’ll be honest: I am skeptical. Nobody has built a quantum computer that can break real cryptography, and nobody can tell you when one will exist. A good part of the urgency I see is marketing.

But I have also been in this field long enough to know that I have been wrong before about how fast things move, and so has most of the industry. So in this article I want to do two things: explain what post-quantum cryptography (PQC) is and what it really costs, with numbers I measured myself, and separate the part that is hype from the part that should be on your roadmap. I checked every statement from BSI, NIST and the other institutions against their current documents (status: December 2026), because this topic changes almost monthly.

What problem are we actually talking about?

Modern cryptography has two families:

  • Symmetric cryptography (AES, ChaCha20, SHA-2, SHA-3). Fast, used for bulk encryption and hashing.
  • Asymmetric (public-key) cryptography (RSA, Diffie-Hellman, elliptic curves such as ECDH, ECDSA, Ed25519). Used to agree on keys and to sign things: TLS handshakes, certificates, code signing, SSH, VPNs, messengers, software updates.

Public-key cryptography rests on mathematical problems that are hard for classical computers: factoring large numbers (RSA) and computing discrete logarithms (Diffie-Hellman, elliptic curves).

In 1994, Peter Shor published an algorithm that solves both problems efficiently on a large, error-corrected quantum computer. If such a machine exists, RSA and elliptic-curve cryptography are broken. Not weakened: broken.

Symmetric cryptography is in a much better position. Grover’s algorithm gives quantum computers a quadratic speed-up against brute force, which in theory halves the effective key length, and in practice is much harder to use than it sounds. NIST still counts AES-128 as quantum-safe at its lowest security category; the BSI advises AES-256 for data with long-term protection needs. The real problem is public-key cryptography.

What is post-quantum cryptography?

PQC is a set of new public-key algorithms based on mathematical problems that we believe are hard for both classical and quantum computers. It runs on today’s normal CPUs. It has nothing to do with quantum hardware, and it is not “quantum cryptography” or quantum key distribution (QKD), which is a different, much more limited technology.

On 13 August 2024, after a public process that began with its call for proposals in 2016, the US National Institute of Standards and Technology (NIST) published the first three standards:

Standard Algorithm (former name) Purpose Replaces Based on
FIPS 203 ML-KEM (Kyber) Key exchange / encryption RSA key transport, (EC)DH, X25519 Lattices
FIPS 204 ML-DSA (Dilithium) Digital signatures RSA, ECDSA, Ed25519 Lattices
FIPS 205 SLH-DSA (SPHINCS+) Digital signatures (conservative) RSA, ECDSA for long-lived keys Hash functions

Two more are in the pipeline. FN-DSA (Falcon, the future FIPS 206) is a more compact signature scheme, but as of December 2026 NIST has not even released a public draft; in September 2026 it announced a revised plan for it. HQC was selected in March 2025 as a backup key-exchange algorithm built on different mathematics, in case lattices turn out to have a weakness; its draft standard (FIPS 207) is still pending, with the final version targeted for 2027.

Europe has its own preferences. Germany’s BSI (Federal Office for Information Security) recommends ML-KEM-768 and ML-KEM-1024 and the more conservative FrodoKEM for key exchange. It used to recommend Classic McEliece as well, but in September 2026 it advised against using it in new developments. It also accepts the stateful hash-based signatures XMSS and LMS, which are well understood but need careful state handling.

Why would we need it if quantum computers can’t break anything yet?

This is the core of the debate, and the honest answer has three parts.

1. “Harvest now, decrypt later”

An attacker does not need a quantum computer today to benefit from one tomorrow. A well-funded intelligence agency can record encrypted traffic now, store it, and decrypt it when the hardware is ready. Storage is cheap.

That matters only for data that must stay secret for a long time: health records, state secrets, long-term business plans, identity data, intellectual property. Your session cookie from 2026 is not interesting in 2040. Your medical history or your company’s merger documents may be.

2. Migrations take a very long time

Look at history. The first practical collision attack on SHA-1 was published in 2005; Chrome stopped trusting SHA-1 certificates only in January 2017. Plenty of internal systems still use it. TLS 1.0 was succeeded by TLS 1.1 in 2006, and the large browsers switched off both only in 2020, 14 years later.

Michele Mosca formalised this in 2015 as a simple inequality: if x is how long your data must stay secret, y is how long your migration takes, and z is how long until a cryptographically relevant quantum computer exists, then you have a problem when x + y > z. In my experience, most organisations underestimate y. They often do not even know where they use RSA.

3. Signatures and devices with long lives

Harvest-now-decrypt-later concerns encryption. Signatures are different: a forged signature only matters once the quantum computer exists. But firmware signing keys, root certificates and embedded devices with a 15–20 year life (cars, industrial controllers, smart meters, medical devices) are being designed today. If their trust anchor cannot be updated, they must ship with post-quantum signatures from the start.

What the institutions say: BSI, ANSSI, EU, NIST

This is where my “it’s mostly marketing” argument gets harder to hold. The people asking for PQC are not only vendors, and in 2026 the recommendations turned into dates.

BSI (Germany)

  • Hybrid only, and now with an end date for classical crypto. The current technical guideline TR-02102-1 (version 2026-01, January 2026) recommends post-quantum key exchange “currently only” in hybrid use together with a classical method, so that the connection stays secure even if the new algorithm turns out to be flawed. It also sets end dates: classical key agreement alone is recommended only until the end of 2031, and for very high protection requirements the switch should happen by the end of 2030. Classical signatures alone are recommended until the end of 2035.
  • Signatures. Post-quantum signatures such as ML-DSA are recommended only in combination with a classical signature. The exception is hash-based signatures (SLH-DSA, and XMSS/LMS where the state can be managed safely), which “can in principle also be used alone”.
  • TLS detail. The TLS guideline (TR-02102-2, version 2026-01) says the BSI intends to recommend the hybrid groups SecP256r1MLKEM768 and SecP384r1MLKEM1024 once the RFC is adopted. Interestingly, the X25519MLKEM768 that browsers use by default is not named.
  • How far away is the quantum computer? The BSI’s study Status of Quantum Computer Development (version 2.2, August 2025) estimates conservatively that a cryptographically relevant quantum computer is likely “within 15 years”, “by the year 2040”, and possibly within about 10 years if new error-correction approaches keep their promise.
  • Companies underestimate it. In the BSI/KPMG Market Survey on Cryptography and Quantum Computing (2023), only 25% of respondents said the quantum threat was covered by their risk management, and only 11% believed they would be quantum-safe in time.
  • The latest word. In October 2026, the German federal government and the BSI published a guideline that implements the EU roadmap nationally. On 3 December 2026, the BSI repeated its recommendation to drive the migration “quickly and consistently”, and warned that the timelines may have to be shortened significantly if AI models make further big leaps. Its older brochure Quantum-safe cryptography (2021/2022) already asked for crypto-agility (the ability to swap algorithms without redesigning systems) and for taking stock of your own systems as the first step.

Europe

  • Joint statement. On 27 November 2024, partners from 18 EU member states (the BSI, France’s ANSSI, the Netherlands’ NLNCSA and others) published Securing Tomorrow, Today: Transitioning to Post-Quantum Cryptography. It recommends protecting the most sensitive use cases against store-now-decrypt-later attacks “latest by the end of 2030”, and strongly recommends hybrid solutions for most use cases. In June 2025 the statement was republished with partners from 21 European states.
  • EU roadmap. Following a Commission recommendation of April 2024, the member states’ NIS Cooperation Group published a coordinated roadmap on 23 June 2025. National transition strategies and first steps should be in place by the end of 2026, high-risk use cases should be migrated by the end of 2030, and medium-risk use cases and as many other systems as practically feasible by 2035. An FAQ from April 2026 recommends standardised hybrid solutions wherever feasible.
  • ANSSI (France) says the post-quantum algorithms are “still not mature enough to solely ensure the security”. Products must use hybrid mode, except when they rely only on hash-based signatures. Standalone post-quantum cryptography is foreseen “probably not earlier than 2030”, and its February 2026 TLS 1.3 guide still recommends hybrid.

United States and others

  • NIST IR 8547, final since October 2026: NIST “will deprecate quantum-vulnerable public-key cryptography after 2030 and disallow its use … after 2035”. This covers RSA, ECDSA, EdDSA, DH and ECDH at all key sizes.
  • NSA CNSA 2.0 (national security systems): post-quantum only by 2030 for software and firmware signing and networking equipment, and by 2033 for browsers, servers, cloud services and operating systems. All national security systems should be quantum-resistant by 2035.
  • UK NCSC: discovery and a migration plan by 2028, the highest-priority migrations by 2031, and the migration complete by 2035.

So: when the security agencies of most of Europe, the US and the UK publish converging dates (2030 for the sensitive stuff, 2035 for everything else), it is no longer only a sales pitch. It is a compliance timeline. Whether or not you believe in Q-Day, your auditors, regulators and customers will ask about it.

Where I remain skeptical

The institutional consensus does not make every claim in the market true. Some things deserve doubt:

  • Nobody knows when. Today’s machines range from about a hundred to a few thousand noisy physical qubits; Google’s Willow chip has 105, and neutral-atom arrays have held 6,100 atoms. Breaking RSA-2048 needs error-corrected logical qubits built from many physical ones. The BSI’s own study says “by 2040”. IBM targets its first large error-corrected machine, Starling (200 logical qubits), for 2029; Google says “around the end of the decade”. Roadmaps are not results.
  • But the estimates keep falling. In 2019, Gidney and Ekerå estimated about 20 million noisy qubits to factor RSA-2048 in 8 hours. Gidney’s 2025 paper brought it to fewer than a million qubits in less than a week. 2026 preprints go further: fewer than 100,000 physical qubits for RSA-2048 with newer error-correction codes, and fewer than half a million qubits running for minutes for 256-bit elliptic curves. This is the trend that makes me careful with my own skepticism.
  • The new algorithms are young. Two candidates fell in 2022. Rainbow, a signature finalist, was broken in about a weekend on a laptop. SIKE, which had just advanced to NIST’s fourth round, was broken in about ten minutes on a single core. This is exactly why the BSI and ANSSI insist on hybrid. Replacing well-tested cryptography with fresh cryptography, alone, would be a risk of its own.
  • Implementations are new. Even if the maths holds, implementations can leak. The “KyberSlash” timing flaws (found from December 2023, patched since) let researchers recover Kyber secret keys within minutes to hours in several libraries. Mature code takes years.
  • “Quantum-safe” products. Most of what is sold as quantum-safe today is either the hybrid TLS your browser already does for free, or inventory and consulting services. Useful, sometimes. But a box with a “quantum-ready” label does not migrate your PKI.

My view: Q-Day is not imminent, and anyone telling you it is next year is selling something. But the cost of being early is small, the cost of being late could be very large, and the migration effort is real. That asymmetry, not fear, is the argument.

When should you use PQC?

This is the order of priority I would follow:

  1. Now, almost for free: key exchange in transport protocols. Hybrid key exchange (X25519 + ML-KEM-768) is already the default in Chrome and Edge (since version 131, late 2024), Firefox (desktop 132, Android 145) and Safari 26. Apple also turned it on in the system networking APIs with iOS and macOS 26. It is the default in OpenSSH 10 and OpenSSL 3.5 (both April 2025). Signal has used post-quantum key agreement since 2023 and extended it to its ongoing ratchet in October 2025; Apple’s iMessage PQ3 has done so since iOS 17.4 (2024). According to Cloudflare, 73% of the human traffic it served was post-quantum encrypted in December 2026. But only a few percent of origin servers behind it supported it in late 2025. Updating your TLS libraries and load balancers is often all it takes, and it addresses harvest-now-decrypt-later.
  2. Now: inventory. Find out where you use RSA and elliptic curves: certificates, VPNs, code signing, HSMs, libraries, third-party APIs, hard-coded algorithms. This is the slow part and it is useful even if Q-Day never comes.
  3. Now, if it applies to you: long-lived secrets and long-lived devices. If your data must stay confidential for more than about 10 years, or you ship hardware that will be in the field past 2035, plan PQC into the design today.
  4. Later: signatures and PKI. No public CA issues post-quantum certificates yet. Chrome said in February 2026 that it has no immediate plan to accept classic X.509 certificates with post-quantum signatures, and is betting on Merkle Tree Certificates instead, with a quantum-resistant root store planned for 2027. Let’s Encrypt plans the same for 2027. Prepare (crypto-agility, test labs), but do not rush to replace your certificates.
  5. Always: build for agility. Make algorithms configurable, avoid hard-coding key sizes, and keep libraries current. The next migration will come too.

What does it cost?

PQC is not free, but the bill is not where most people expect it. It is not CPU; it is size.

The headline: 35 times bigger key exchange, 40 to 180 times bigger signatures

Key exchange grows roughly 35 times. Signatures grow 40 to 180 times.

Here is that headline in numbers, comparing what we use today with what replaces it:

What is sent Today (classical) Post-quantum Growth
Key exchange in a TLS handshake (both directions) X25519: 64 B X25519 + ML-KEM-768 hybrid: 2,336 B ~37×
Public key + one signature Ed25519: 96 B ML-DSA-44: 3,732 B ~39×
    ML-DSA-65 (the minimum the BSI recommends): 5,261 B ~55×
    ML-DSA-87: 7,219 B ~75×
    SLH-DSA-128s / 128f: 7,888 / 17,120 B ~82× / ~178×
Keys + signatures in a TLS certificate handshake (my estimate below) ECDSA P-256: ~0.5 KB ML-DSA-44: ~14.7 KB ~30×
Median certificate chain (Cloudflare, compressed) ~3.2 KB +15 KB with ML-DSA-44 ~5–6×

And this is what today’s deployments measured:

  • Chrome (2024): hybrid key exchange splits the TLS ClientHello into two packets and adds about 4% median latency to all handshakes on desktop. On Android, with slower and higher-latency networks, the cost was noticeable enough that Google first held it back.
  • Cloudflare (2025): “ML-KEM doesn’t have a large performance impact”. Signatures are the problem: about 9 KB of extra data slows the handshake by about 15%, with “a steep drop in performance at 10kB”. Some clients and middleboxes don’t like certificate chains larger than 10 KB.
  • Cloudflare and Chrome experiment (2026): Merkle Tree Certificates replace most signatures with a proof of less than 1 KB. In the test they made handshakes about 9% faster at the median than today’s certificates.
  • SSH: a scan of 1.52 million SSH hosts (preprint, November 2026) found 45% already support post-quantum key exchange.

My own measurements

I wanted real numbers instead of vendor slides, so I measured the algorithms with OpenSSL 3.5.5 (openssl speed), which now ships ML-KEM, ML-DSA and SLH-DSA next to RSA and elliptic curves. The sizes come from FIPS 203, 204 and 205, and I checked them against keys and signatures generated with the same OpenSSL.

A word on the test machine: it is my home server, a 2009 Intel Core i7-860, one thread. That is an old CPU without AVX2, and OpenSSL’s post-quantum code is still mostly portable C, while RSA and elliptic curves have decades of assembly optimisation behind them. Modern CPUs with optimised implementations are several times faster, especially for the lattice schemes. So read the absolute numbers with care and look at the ratios. You can repeat the test on your own hardware with one command (see the end of this section).

Key exchange: ML-KEM vs. RSA and elliptic curves

Algorithm Quantum-safe Security level Public key Ciphertext / key share Bytes on the wire Speed (ops/s, measured)
X25519 No ~128 bit 32 B 32 B 64 B 10,724 key agreements
ECDH P-256 No ~128 bit 65 B 65 B 130 B 6,457 key agreements
RSA-2048 (key transport) No ~112 bit 256 B 256 B 512 B 14,010 encrypt / 444 decrypt
ML-KEM-512 Yes NIST category 1 (≈ AES-128) 800 B 768 B 1,568 B 16,220 encaps / 11,025 decaps
ML-KEM-768 Yes NIST category 3 (≈ AES-192) 1,184 B 1,088 B 2,272 B 12,504 encaps / 8,290 decaps
X25519 + ML-KEM-768 (hybrid) Yes category 3 + classical 1,216 B 1,120 B 2,336 B sum of both
ML-KEM-1024 Yes NIST category 5 (≈ AES-256) 1,568 B 1,568 B 3,136 B 9,107 encaps / 6,296 decaps

The surprise for many people: ML-KEM is not slow. On my server ML-KEM-768 runs at about the same speed as X25519 and is far faster than RSA decryption. Key generation is also cheap: 8,229 ML-KEM-768 key pairs per second, against 7 RSA-2048 key pairs per second. The cost is size. Note that the BSI recommends only ML-KEM-768 and ML-KEM-1024, not 512.

Signatures: ML-DSA, FN-DSA and SLH-DSA vs. RSA, ECDSA and Ed25519

Algorithm Quantum-safe Security level Public key Signature Sign/s (measured) Verify/s (measured)
Ed25519 No ~128 bit 32 B 64 B 12,343 4,765
ECDSA P-256 No ~128 bit 64 B 64 B (~72 B DER) 14,940 5,019
RSA-2048 No ~112 bit 256 B 256 B 452 15,301
RSA-3072 No ~128 bit 384 B 384 B 144 7,160
FN-DSA-512 (Falcon, not yet standardised) Yes NIST category 1 897 B ~666 B not in OpenSSL not in OpenSSL
ML-DSA-44 Yes NIST category 2 1,312 B 2,420 B 689 3,365
ML-DSA-65 Yes NIST category 3 1,952 B 3,309 B 407 2,179
ML-DSA-87 Yes NIST category 5 2,592 B 4,627 B 372 1,431
SLH-DSA-128s Yes NIST category 1 32 B 7,856 B 0.6 (1.7 s each) 580
SLH-DSA-128f Yes NIST category 1 32 B 17,088 B 12 197
Bar chart: post-quantum key exchange is about 35 times bigger and signatures 40 to 180 times bigger than classical ones, with the byte size and growth factor of each algorithm

What I read from these numbers:

  • Size is the real price. See the headline table above. FN-DSA (Falcon) is the compact option, but it is not standardised yet and is hard to implement safely.
  • Verification stays cheap. ML-DSA-44 verifies at two thirds of the speed of ECDSA on my machine. For servers that mostly verify (API gateways, update clients), this is fine.
  • Signing is slower than elliptic curves, but not slower than RSA. ML-DSA-44 signs about 20 times slower than ECDSA here, but faster than RSA-2048, which many systems still use. With an AVX2-optimised implementation the gap to ECDSA shrinks a lot.
  • Key generation is much faster than RSA. 3,874 ML-DSA-44 key pairs per second against 7 for RSA-2048. Systems that create many keys (device provisioning, short-lived certificates) actually gain.
  • SLH-DSA is a special tool. 1.7 seconds per signature is useless for a web server, but perfectly fine for signing a firmware image once per release. That is where its conservative, hash-only security makes sense, and it is the one family the BSI and ANSSI allow without a classical partner.

What it means for a TLS handshake

Here is a rough count for a typical HTTPS connection. The server sends a certificate chain (leaf and intermediate, so 2 public keys) and about 5 signatures: one on each certificate, two Certificate Transparency timestamps and the handshake signature itself.

  • With ECDSA P-256 this is roughly 2 × 65 + 5 × 72 ≈ 0.5 KB of keys and signatures.
  • With ML-DSA-44 it is 2 × 1,312 + 5 × 2,420 ≈ 14.7 KB.

That 14.7 KB alone is about the size of TCP’s initial congestion window (10 packets, roughly 14.6 KB). Add the rest of the certificates and the handshake, and the server has to wait for the client’s acknowledgement before it can send everything: one extra round trip for every new connection. This matches Cloudflare’s measured “steep drop” at around 10 KB, and it is the reason Chrome and Let’s Encrypt are going for Merkle Tree Certificates instead of simply putting ML-DSA into today’s certificates.

On the backend

  • CPU: mostly fine. As measured above, ML-KEM is as fast as elliptic-curve key exchange, and ML-DSA verification is close. Signing is the only operation that costs noticeably more, and only compared with elliptic curves. For most services the difference is lost in the noise next to database calls.
  • Bandwidth and handshakes. A hybrid TLS ClientHello grows by about 1.2 KB and usually no longer fits in one packet. This broke some servers (and a few middleboxes) that expected the whole ClientHello in a single read. Post-quantum certificate chains add the extra round trip described above.
  • Infrastructure. HSMs, key-management systems, load balancers, WAFs, VPN gateways and monitoring tools must support the new algorithms. Many need firmware upgrades or replacement. This is where the real money goes, together with the engineering time for inventory and testing.
  • Storage and logs. Bigger keys and signatures in databases, tokens, certificate-transparency logs and audit trails. Usually minor, but a 2.4 KB signature in every JWT adds up quickly at scale.

On mobile and embedded devices

  • Latency matters more than CPU. On a modern phone, ML-KEM computations take microseconds. The cost is the extra data on slow or high-latency networks. Chrome’s experience on Android, mentioned above, shows that this is real.
  • Data and battery. More bytes on the radio means more energy. For one handshake this is negligible; for chatty apps that open many short connections, or IoT devices on metered links, it is not.
  • Hardware key storage: arriving, but uneven. Apple’s Secure Enclave can hold ML-KEM and ML-DSA keys since iOS and macOS 26, and Android 17 adds ML-DSA to the Android Keystore. TPM 2.0 got ML-KEM and ML-DSA in specification version 1.85 (March 2026). But most installed TPMs, smart cards and older phones cannot store post-quantum keys yet. Doing PQC in software on those devices means keeping keys outside the hardware protection, which is a security step backwards.
  • Constrained devices. On an ARM Cortex-M4 microcontroller, optimised code (the pqm4 project) needs about 0.65 million cycles for an ML-KEM-768 operation and about 4 million cycles on average for an ML-DSA-44 signature, which is roughly 40 ms at 100 MHz. ML-DSA signing needs about 45 KB of stack in the fast version, or about 5 KB in the memory-optimised one. Falcon is smaller but hard to implement safely without floating-point side channels. For these devices, algorithm choice is a real engineering decision, not a configuration change.
  • Platform support. Apple enables hybrid post-quantum TLS by default for apps that use URLSession or the Network framework on its version 26 operating systems. On Android, it comes mainly through Chrome and WebView today. Custom protocols and pinned libraries are not covered by either.

Measure it yourself

With OpenSSL 3.5 or newer, this one command gives you the same comparison on your own hardware:

openssl speed -seconds 1 rsa2048 ecdsap256 ed25519 ecdhx25519 ML-KEM-768 ML-DSA-44 SLH-DSA-SHA2-128s

The bottom line

Post-quantum cryptography is, today, partly marketing. No quantum computer can break RSA, the BSI’s own study puts the likely date around 2040, and the new algorithms are young enough that the most respected agencies in Europe refuse to use them without a classical safety net.

But the BSI, ANSSI, the EU, NIST and the NSA have published concrete dates, mostly 2030 for sensitive systems and 2035 for the rest. The hybrid key exchange is already in the browser you are reading this with, protecting almost three quarters of the human traffic at Cloudflare. And the history of our field shows that “it will take decades” has a habit of becoming “why didn’t we start earlier?”. The qubit estimates for breaking RSA have dropped from 20 million to under a million in six years, and 2026 preprints push them lower still. As my measurements show, the price is mostly bytes on the wire, not CPU.

So my advice is undramatic:

  • Don’t panic, and don’t buy a “quantum-safe” box.
  • Do turn on hybrid key exchange where your stack supports it; it is cheap.
  • Do inventory your cryptography and build for agility; you will need it regardless.
  • Do plan PQC into anything that must stay secret, or stay deployed, beyond the early 2030s.

Skepticism is healthy. Complacency is not. The two are easier to tell apart once you know where your RSA keys are.

Sources and further reading

All checked in December 2026.

The post Post-Quantum Cryptography: A Skeptic’s Introduction first appeared on Sorin Mustaca: Security-AI-Software.

Cost Control for AI in Software Teams: There Is No Single Switch

The question everyone is asking these days: How do I make AI cheaper without making it dumber?

Most advice on AI costs is about hard limits: spending caps per key, turn limits, timeouts and alerts. Limits answer the question “how much can we lose?”. They do not answer the more useful question: how do we get the same work done for less? This article is about that. It is written for the engineers who spend the tokens, and for the engineering and project managers who sign the invoice.

The short answer is disappointing, so here it is up front. There is no universal method for lowering AI costs. There is no setting that halves the bill without side effects. What works is a combination of small practices, each of which removes some waste, and the right combination depends on how your team uses AI. A team that chats with an assistant needs different habits than a team running agents in CI, and both differ from a team that ships an AI feature to customers.

Prices and product features change every few months. This article names the practices and the reasons behind them. Check the numbers against current documentation when you apply them.

 

 

The cost equation

Every practice in this article makes sense once you see the equation behind an agent’s bill. The short version is:

cost ≈ number of agents
     × steps per task
     × (context per step × input price + output per step × output price)
     − what caching and batching save

Each factor is a lever:

Lever What pulls it Section
Context per step Reset, compact, new sessions, small starting context Keep the context small
Number of agents Fewer and shorter-lived agents and subagents Limit the number of agents
Price per token The right model for each step, other providers Use several models
Steps per task Good specs, stopping early, planning first Plan expensive, implement cheap
Caching and batching Prompt caching, batch APIs, response caches Caching
The price of the hardware itself Own or rented GPUs with open-weight models Own hardware, rented hardware

Notice that the factors multiply. Halving the context and halving the number of agents cuts the bill to a quarter, not by half. This is also why a single practice disappoints: it pulls one lever while the others stay where they are.

Keep the context small

The context is the largest and least visible cost driver. An agent resends its whole context on every step: system prompt, memory files, tool definitions, every file it has read and every tool result so far. A long session is expensive not because the last question was hard, but because it carries everything that came before. One practitioner guide estimates that a single message at a 500,000-token context costs about 50 times as much as the same message at 10,000 tokens. That is simply the arithmetic of input pricing, and it ignores the fact that quality also drops when the context fills with old material.

Four habits keep the context small.

1.Reset between tasks

When a task is done, clear the conversation before starting the next one. In Claude Code that is /clear. Other tools call it a new chat or a new thread. The agent loses nothing it needs, because the result of the previous task is in the repository, not in the conversation. What it loses is the thousands of tokens of exploration, failed attempts and test output that would otherwise ride along on every step of the next task.

The reset is the cheapest cost control there is, and the one people skip most often, because a long conversation feels like accumulated understanding. Most of it is accumulated noise.

2.Compact when you must continue

Sometimes you cannot reset: the task is half done and the conversation holds decisions you still need. Then compact. Compaction asks the model to summarize the conversation so far and continues with the summary instead of the full history. In Claude Code, /compact does this, and you can tell it what to keep: /compact keep the API decisions and the list of failing tests. A section called “Compact instructions” in CLAUDE.md steers what automatic compaction keeps. Codex CLI and Gemini CLI have similar commands.

Three cautions:

  • Compaction is not free. The model has to read the whole conversation to summarize it, so the compaction itself is an expensive request.
  • A summary loses detail. Compact at a milestone (the tests pass, the design is settled), not in the middle of a delicate change.
  • Undo is often cheaper than summarizing. If the last few turns went in the wrong direction, roll back to the point before them (/rewind in Claude Code, or double Escape) instead of compacting the mistake into the summary.

3.Start a new session with a handover

For longer work, a fresh session with a short written handover beats one endless conversation. The Agentic Scrum loop I described on this blog is built on this idea: every stage ends by writing a handover file, and the next stage starts a new agent that reads it. The handover is a few hundred tokens of decisions and open points instead of a hundred thousand tokens of history.

You can do the same by hand. Before you stop, ask the agent to write the state of the work to a file: what is done, what was decided and why, what is next, which files matter. Then reset and start the next session by pointing it to that file. It costs one short request and saves the history on every following step.

4.Start with a small context of code

Agents are curious. Ask one to “fix the export bug” in a large repository and it will list directories, open files and search the code base until it has built its own picture, and every file it reads stays in the context. You can do much of that work for it, cheaply, by starting small:

  • Point to the files. “The bug is in src/export/invoice_csv.py, the test is tests/test_invoice_csv.py” saves a dozen exploration steps.
  • Keep the memory file short. Project memory is loaded into every request. Claude Code’s documentation recommends keeping CLAUDE.md under about 200 lines and moving procedures into skills, which load only when needed.
  • Keep noise out of reach. Deny the agent access to build output, vendored dependencies, generated code and large data files. It cannot waste tokens on what it cannot open.
  • Switch off tools you do not use. Every connected MCP server adds tool definitions to the context. Newer harnesses load them on demand, but an unused server is still overhead. Where a command line tool does the job (gh, aws, kubectl), it is often cheaper than an MCP server.
  • Trim tool output. A test run that prints 3,000 lines puts 3,000 lines into the context. A hook can cut it down to the summary and the failures before the model sees it.
  • Let a subagent explore. If exploration is needed, give it to a subagent. Only its summary comes back to the main context.

In Claude Code, /context shows what is taking up the context right now. Run it once in a typical session. Most people are surprised by how much is spent before they type their first word.

Limit the number of agents

Parallel agents feel like free speed. Five agents finish in an afternoon what one agent does in a week. But each of them has its own context, its own loop and its own bill, and they bill in parallel too. Speed through parallelism is real. Savings through parallelism do not exist.

Claude Code’s documentation gives an idea of the scale: a team of cooperating agents uses roughly seven times as many tokens as a standard session when the teammates work in plan mode. Subagents are cheaper than full agent teams, because they are short-lived and return only a summary, but they still count.

Practical rules:

  • One agent per genuinely independent task. Two agents editing related code do not save time. They create merge conflicts and duplicate exploration.
  • Cap the concurrency. The Agentic Scrum runner runs one stage at a time on purpose. If you run agents in parallel, set a maximum in the runner, not in people’s heads.
  • Shut agents down. An idle agent with a full context that someone pokes again tomorrow pays for yesterday’s context.
  • Give helpers a smaller model. A subagent that searches files or summarizes logs rarely needs the largest model. In Claude Code, a subagent definition can set its own model:
---
name: log-summarizer
description: Summarizes long test and build logs into failures and likely causes.
model: haiku
---
Read the log you are given. Return only the failing tests, the first error
for each, and one line on the likely cause. No other text.

Use several models, sometimes from several providers

Model size is a cost decision. In daily practice that means you rarely use one model for everything. A rough division of labor:

  • Large model: specification, architecture, hard debugging, security review.
  • Mid-size model: most implementation, refactoring, tests, documentation.
  • Small model: search, classification, summaries, formatting, commit messages, routing.

The price difference between the largest and the smallest model of the same provider is often more than tenfold. Even a rough split, applied consistently, moves the bill more than any amount of prompt polishing.

A second knob sits next to the model: the reasoning effort. Many models let you choose how much they think before answering (/effort in Claude Code). Thinking tokens are output tokens, the expensive kind. Routine tasks rarely need the highest level.

Other providers

The same logic extends across providers. Some tasks are done well by a cheaper model from another vendor, or by an open-weight model offered by a hosting provider at a fraction of the frontier price. An LLM gateway makes this manageable: a proxy between your tools and the providers, with one interface, per-team and per-key budgets, logging and routing rules. LiteLLM is an open-source gateway you host yourself. OpenRouter is a managed service. Cloud platforms and several other vendors offer their own.

Research supports the idea. The RouteLLM project (UC Berkeley and LMSYS, 2024) trained routers that send each request either to a strong or to a cheap model, and reported cost reductions of more than 85% on one benchmark while keeping 95% of the strong model’s quality. That is a benchmark, not your workload, but it shows how much of a typical request mix does not need the most expensive model.

Multiple providers come with costs that do not appear on any invoice:

  • Every provider is a data processor. Each one needs the data protection checks: contract, retention, training on your data, location. A cheap model you are not allowed to send code to costs nothing and is worth nothing.
  • Every model needs its own evaluation. A prompt or a skill that works with one model can fail quietly with another. Run your evaluation set before you switch a task.
  • Switching mid-task loses the cache. Prompt caching works per model. A session that alternates between models pays full price for its context every time.

Plan with an expensive model, implement with a cheaper one

The combination of models that pays off most reliably follows the structure of good engineering anyway: think first, then type. The expensive model does the part where mistakes are expensive. The cheaper model does the part where the plan is already clear.

For an example feature, an invoice export:

  1. Plan (large model, high effort). Read value.md and requirements.md, ask the open questions, write agent-spec.md and test-spec.md (see specs a coding agent can follow). A human approves both. This step is short in tokens and decides everything after it.
  2. Implement (mid-size model, new session). Start fresh with the approved spec as the only input. The spec is specific enough that the cheaper model does not have to make design decisions.
  3. Grind (small model, subagents). Run the tests, summarize the failures, format, write the commit message.
  4. Review (large model, new session). Check the diff against the spec and the security checklist. A fresh session, so the reviewer is not anchored by the implementer’s reasoning.

Claude Code has a model setting for the first two steps in one session (opusplan: the large model in plan mode, the mid-size one for execution). In other tools you switch the model by hand or configure it per agent.

The trap is to measure the wrong thing. A cheap model that needs four attempts and two human corrections costs more than an expensive model that gets it right the first time, once you count the review hours. Measure cost per accepted change, not cost per token.

Caching

Caching means not paying twice for the same thing. It exists at three levels, and they are easy to confuse.

Prompt caching at the provider

Prompt caching works like this: if the beginning of a request is identical to a recent one, the provider bills those tokens at a reduced rate. For agents, this is the single largest discount available, because every step resends the same system prompt, memory files and spec. In late 2026, cached input at the large providers cost roughly a tenth of normal input. Writing to the cache sometimes costs a little more than normal input, and cache entries expire after a few minutes without use, unless you pay for a longer lifetime.

Coding agents handle caching for you, but your habits decide how well it works:

  • Stable content first, changing content last. The cache matches from the beginning. Anything that changes early in the context invalidates everything after it.
  • Do not edit the memory file in the middle of a session. It sits near the beginning of every request.
  • Do not switch models mid-session, as above.
  • Long pauses cost money. After a coffee break, the next request may rebuild the cache at full price. This is a reason to finish a task in one go, or to reset before the break instead of after it.

If you build your own AI features, structure your prompts the same way: fixed instructions and reference material first, the user’s question last.

Batch processing

Not every request needs an answer now. The large providers offer batch APIs: you submit many requests at once, the provider processes them within 24 hours, and you pay about half the normal price. According to the providers, the batch discount and prompt caching can be combined.

Good batch candidates in a software team: generating documentation for a whole module overnight, writing first-draft tests for many files, classifying the support ticket backlog, summarizing last week’s incidents, running an evaluation set. Anything a person waits for does not belong in a batch.

Response caching in your own product

If your product calls a model, many requests repeat. The same question about the refund policy arrives a hundred times a day. A response cache stores the answer and returns it without calling the model at all. An exact-match cache is simple and safe. A semantic cache also matches questions that are worded differently but mean the same thing, using embeddings. Tools include GPTCache (open source) and Redis LangCache (a managed service). A 2024 research paper measured up to 68.8% fewer API calls with a semantic cache on its test workload. Vendors claim more.

A semantic cache has risks of its own, and they are product risks, not cost risks:

  • A loose similarity threshold returns the wrong answer to a question that only looks similar. Tune it on real traffic and check samples.
  • Answers go stale. Give entries a lifetime, and invalidate them when the underlying facts change.
  • One user’s answer must never reach another user if it contains their data. Cache only answers that are the same for everyone, or keep the cache separate per tenant.

Own hardware, rented hardware

At some volume, every team asks whether it should run models itself. Open-weight models (models whose weights you can download and run, such as the Llama, Qwen, Mistral, DeepSeek and gpt-oss families) make this possible. The tools are mature: Ollama and llama.cpp run models on a laptop or a workstation, vLLM and SGLang serve them to many users on GPU servers. Quantization, storing the weights with fewer bits, shrinks the hardware needed: a 70-billion-parameter model needs about 140 GB of memory at 16-bit precision and about 35 GB at 4-bit, with a modest loss in quality.

Owning the hardware

Your own hardware turns a variable cost into a fixed one. You pay for the machines, the power, the cooling, the space and, above all, the people who run them. In return the marginal token is free, the data never leaves your building, and nobody changes the price or retires the model under you.

The economics depend on one number: utilization. An idle GPU costs the same as a busy one. Owning pays off when the load is high and steady, for example a product feature that runs around the clock or a large team that uses the models all day. It rarely pays off for a team of ten developers who use the models in bursts during office hours.

There are good reasons to own hardware that have nothing to do with cost: data that may not leave the premises, air-gapped environments, regulatory requirements. If those apply, cost is a secondary question.

Renting the hardware

Renting GPUs by the hour sits in between. In October 2026, an NVIDIA H100 cost roughly $2 to $4 per GPU-hour on demand at specialized GPU clouds and considerably more at the large cloud providers. Prices rose during 2026 because demand outgrew supply. Reserved capacity is cheaper per hour, but then you pay for idle time again.

Renting suits bursts and experiments: evaluating an open-weight model before you commit, fine-tuning, a large one-off batch job, or a pilot that may not survive.

The break-even check

Before anyone buys a server, do this calculation:

tokens per month to break even =
  monthly cost of the hardware (rent, or depreciation + power + operations time)
  / API price per token for a comparable model

Then compare the result with two other numbers: the tokens per month your team actually uses, and the tokens per month the hardware can physically produce. If the break-even point is higher than what the hardware can produce, self-hosting never wins on cost. Compare with the cheapest API that does the job well enough, often an open-weight model at a hosting provider, not with the most expensive frontier model.

Be honest about quality, too. In 2026, the best open-weight models are good at classification, summarization, extraction, embeddings and autocompletion. For long agentic coding tasks, frontier models still had a clear lead when this article was written. A common and sensible outcome is a hybrid: the small, high-volume tasks on your own or rented hardware, the hard tasks on a frontier API.

More practices that add up

Research for this article turned up a long tail of smaller practices. None of them is dramatic. Together they matter.

  • Measure first. You cannot control what you do not see. /usage in Claude Code shows the cost of the current session. Team plans and API consoles have spend reports per user and per key, and OpenTelemetry export gives per-user metrics for your own dashboards. Look for the outliers: one person, one job or one repository usually causes a large share of the bill.
  • Set per-user rate limits on API keys, so one runaway session cannot consume the whole team’s quota. Claude Code’s documentation suggests limits per user that shrink as the team grows, because not everybody works at full speed at the same time.
  • Ask for less output. Output tokens are the expensive ones. Ask for a diff instead of the whole file, for a list instead of an essay, and tell the agent not to repeat the code back to you.
  • Stop early. When you see the agent going in the wrong direction, interrupt it (Escape in Claude Code). Every further step in the wrong direction costs more than the previous one, because the context keeps growing.
  • Invest in the specification. The cheapest steps are the ones that never happen because the agent got it right the first time. A clear spec and tests written before the code cut the number of iterations more than any setting.
  • Turn off background features you do not use. Some harnesses spend tokens on suggestions, summaries and recaps in the background. Check the settings.
  • Choose the right billing model per use. A heavy interactive user is often cheaper on a seat with an included allowance. CI jobs and products run on API tokens.
  • Write prompts and skills once. A skill that encodes a procedure saves the tokens of explaining it again in every session, and of the agent rediscovering it.

No universal method: combine

Every practice above pulls one lever, and every one has a limit. Resetting does not help a team that runs ten agents in parallel. A cheaper model does not help when the context is full of test logs. Your own GPU does not help if it is idle most of the day. That is why there is no universal method for lowering costs. In most teams, the savings come from a combination of practices, chosen for how the team actually uses AI.

A starting point by situation:

Situation Start with Add later
Developers using a coding agent interactively Reset between tasks, small starting context, a smaller default model Handover files, subagents on small models, plan-then-implement
Agents in CI and an Agentic Scrum runner Hard limits, one stage at a time, a new session per stage Model per stage, trimmed tool output, cost per accepted change
An AI feature in your product Prompt structure for caching, the smallest model that passes the evaluation Response or semantic cache, batch jobs, a gateway with routing
Large, steady volume or strict data rules Break-even calculation, an open-weight pilot on rented GPUs Own hardware for the high-volume tasks, frontier API for the rest

Then do what works for every change: measure a baseline, change one thing, measure again. Cost control is not a project that ends. Prices, models and your own usage change every quarter, and the right combination changes with them.

Key takeaways

  • There is no single switch that lowers AI costs. Each practice pulls one lever of the cost equation, and the levers multiply.
  • Keep the context small: reset between tasks, compact at milestones, start new sessions with a handover, and point the agent to the right files from the start.
  • Every additional agent is an additional bill. Parallel agents buy speed, not savings.
  • Use several models: plan and review with an expensive one, implement and grind with cheaper ones. Measure cost per accepted change, not per token.
  • Use caching at all three levels: prompt caching at the provider, batch APIs for anything that can wait, and response caching in your own product, with care.
  • Own or rented hardware pays off only at high, steady utilization or when data rules require it. Do the break-even calculation first.

Try it

Pick one agent task you do every week. Run it once the way you normally do and note the cost from /usage or your provider’s console. Then run it again with three changes: a fresh session, a first prompt that names the relevant files, and a smaller model for the implementation after you have approved the plan. Compare the cost and check both results against the same rubric. Keep the changes that did not cost you quality.

The post Cost Control for AI in Software Teams: There Is No Single Switch first appeared on Sorin Mustaca: Security-AI-Software.

Agentic Scrum: Wiring the Agents Together

Introduction

This is part 6 of the Agentic Scrum series, and it covers the piece I left out of the first five.

Part 5 ended at the final gate. Here I show how the agents from Parts 2 to 5 are wired together, what exactly happens when one agent hands over to the next, and where this setup can still fail. If you have not read the series, Part 1 is the place to start.

 

The Runner

The agents in the earlier parts never call each other. Something else has to pick the next stage, start the agent, check what it did and stop at the gates.

I call that the Runner, and yes, it is not a coincidence that it is called like the GitHub Runner. 🙂

My recommendation, and it is an opinion and not a measured result, is plain code and not another agent. The order of the stages and the gates are the parts you want identical on every run, and an agent that decides which agent runs next can improvise exactly where you want no improvisation.

Here is the whole flow in one picture. The top half shows the stages and gates the runner moves through, and where work goes when something fails. The bottom half zooms into a single agent stage, which is where one agent hands over to the next.

Flow of the agentic loop. Top: stages and human gates recorded in status.md, with a failure path to blocked and a send-back to an earlier stage. Bottom: inside every agent stage the runner prepares the prompt and the git file list, a new agent session reads the named files and writes its outputs and a handover, the runner checks five conditions, then commits and moves the stage forward or blocks.

State lives in a file

The runner keeps no memory between runs. Everything it needs sits in a status.md next to the specs, in markdown with one heading per field and one line per value. A person can read it and fix it by hand, and git keeps its history.

# Status: 042 invoice export

## Stage
qa_draft

## Coding runs
2

## Blocked at
none

## Waiting for
nobody

Stage names the next thing to happen. Coding runs counts how often the coding agent has started on this feature. Blocked at and Waiting for tell a human where the loop stopped and who has to act. If the runner crashes halfway, you start it again and it carries on from what the file says. No agent may change this file. If an agent could edit it, it could approve its own gate, so the runner treats any agent edit to status.md as a violation and blocks.

What exactly happens at a handover

Take one boundary. The coding agent has finished and the QA agent is next. These are the steps, in order. The runner asks git which files really changed on the feature branch and writes that list to a file. It fills in the QA prompt template and commits both files, so the record shows exactly what the agent was given. It starts a new agent session with that prompt. The agent reads the files the prompt names, writes its outputs and writes its handover. The runner then checks the result. If the checks pass, it commits and moves the stage forward. If any check fails, it blocks.

This is handover 02, written by the coding agent at the end of its run. The numbers and file names in these examples are made up for illustration.

# Handover 02: coding agent

## Asked
Implement tasks 1 to 3 of agent-spec.md.

## Done
All three tasks. Access logging added after R2 was clarified.

## Deliberately not done
Scheduled exports (out of scope).

## Files changed
src/exports/service.ts, src/exports/writers.ts, src/exports/endpoint.ts

## Checks run
Build: pass. Lint: pass. Existing tests: pass.

## Open questions
None.

## Stop reason
none

And this is the list git produced for the same branch.

src/exports/audit.ts
src/exports/endpoint.ts
src/exports/service.ts
src/exports/writers.ts

They disagree, and that is why the runner hands over both. The handover is what the coding agent says it did. Git is what it did. The runner does not paste either into a chat. It fills in a prompt template that names files and gives rules.

# Task: draft the test specification

Feature folder: {{DIR}}

Read these files, in this order:
{{DIR}}/agent-spec.md
{{DIR}}/requirements.md
{{DIR}}/handovers/02-coding-agent.md
{{DIR}}/logs/changed-files.md
guardrails/qa.md
guardrails/handover-format.md
AGENTS.md

changed-files.md comes from git. Read every file it lists.
If it disagrees with handover 02, trust changed-files.md and
say so under "Open questions" in your handover.

Write these files and nothing else:
{{DIR}}/test-spec.md
{{DIR}}/handovers/03-qa-agent.md

The last section of your handover is "Stop reason", on one line.
Write the single word none if you finished. Otherwise write why you stopped.

AGENTS.md is listed explicitly because not every tool loads it automatically. Claude Code, for example, loads its own CLAUDE.md, so naming the file in the prompt removes the guesswork. The new session remembers nothing about the coding run. Each claude -p call starts a fresh conversation unless you pass --continue or --resume, and the runner passes neither. That costs tokens, because every stage re-reads its files, and I have no numbers on how much. What you buy is that each stage knows only what is written down, which is the whole point of handovers. Here is what the QA agent wrote at the end.

# Handover 03: QA agent

## Asked
Draft the test specification for the invoice export.

## Done
test-spec.md with 11 cases covering R1 to R3, N1 to N3 and F1 to F3.

## Deliberately not done
Test code. It waits for approval of test-spec.md.

## Files changed
test-spec.md

## Checks run
Traceability: every requirement ID has at least one case.

## Open questions
changed-files.md lists src/exports/audit.ts. Handover 02 does not mention it
and agent-spec.md has no task for it. It looks like the logging for N2.
Please confirm before I add a test case for it.

## Stop reason
none

The open question exists only because the QA agent compared the two lists. A human reads it at the next gate and decides. I added the one-line “none” rule for the runner, so put it in your handover format file. The check is strict on purpose. If an agent writes “None.” with a capital and a full stop, the loop blocks and a person takes a look. That is the safe direction to be wrong in.

The runner

Here is the whole runner in bash. It covers the coding stage, both QA stages and the three human gates. The specification agent and the security agent follow the same pattern, and I left them out to keep the length sane. It needs bash 4 or newer because of the associative array, and macOS still ships an older bash by default. Bash is not required either. The logic is about a dozen decisions, so port it to whatever your team maintains.

Download the file: run-loop.txt (rename it to run-loop.sh)

The loop at the bottom reads the stage, calls the function with that name and repeats. Agent stages run back to back, so coding flows straight into the QA draft. A gate function prints who it is waiting for and exits, which ends the run. Each stage gets its own tool list. The QA draft agent cannot run make because it has no reason to, and no agent gets git, because the runner does all the committing. Each stage also gets its own scope. The coding agent may touch src/ but not tests/, and the QA agent that writes tests may touch tests/ but not src/.

 

How far I tested this matters, so here it is. I ran every path against a stub that stands in for the agent and writes files the way an agent would. The happy path ran through all three gates to the end. An agent stop reason blocked the loop. So did an edit outside the scope, an edit to status.md, a commit made by the agent itself, a non-zero exit, and a fourth coding run. A dirty working tree was refused, and so was an unknown stage name. I have not run it with a real agent. Expect to adjust the prompts, the scopes and the turn limit once real output arrives.

What the checks do not protect against

Every check runs after the agent has finished, so it detects problems and does not prevent them. If a make target deletes a directory or calls the internet, the scope check notices the changed files afterwards, but the command has already run. Prevention means running the agent somewhere that cannot do damage, such as a container or a disposable CI runner with no secrets except the model API key and no network access beyond what the build needs.

Three details from the Claude Code CLI deserve your attention, and I checked them in version 2.1.318. The help text says the workspace trust dialog is skipped in non-interactive mode, so only run it in directories you trust. It also says that settings files which fail validation are silently ignored in this mode. If your deny rules live in a broken settings file, they are simply gone, so validate that file before you rely on it. And --max-turns appears in the official GitHub Actions documentation but not in the claude --help output of that version, so confirm that your version accepts it.

There is one thing I could not confirm from primary documentation, which is what happens when a non-interactive agent wants a tool that is not on the allow list. Nobody is there to approve it. A secondary source says recent versions deny such calls. Test this with your version before trusting it, because a run that quietly skipped a step looks a lot like a run that finished. Other agent tools have their own non-interactive modes and flags, and I did not check those.

Gates, approvals and sending work back

A human approves a gate by running approve. The runner moves to the stage that follows the gate, records the approver in the commit message and continues until the next gate. A human sends work back by running send-back with a stage name and a reason. Send it back to the stage that owns the earliest wrong file, as Part 1 argued. A vague spec goes back to the specification stage and is regenerated, and everything after it reruns. The coding run limit stops the case where a feature bounces back and forth forever. I picked three as a starting guess, so tune it. A feature that hits the limit usually has a problem in the value statement or the requirements, and no further agent run will fix that. The git log of the feature branch reads like a diary. This excerpt comes from my stub test.

042-invoice-export: next: qa_review
042-invoice-export: qa-draft finished
042-invoice-export: prepare qa-draft
042-invoice-export: next: qa_draft
042-invoice-export: coding finished
042-invoice-export: prepare coding
042-invoice-export: approved spec_review by sorin

Running the same loop in CI

On a laptop, the trouble is that nobody else sees the runs and the guardrails depend on a machine you control. In CI, I would keep the same script and let a pull request review be the approval. Each feature branch has one open pull request. When someone approves it, a workflow runs approve, which moves through the agent stages to the next gate and pushes the commits back to the branch. The workflow file is GitHub’s format, not my choice of format for specs. This is a sketch and I have not run it.

name: Advance the agentic loop
on:
  pull_request_review:
    types: [submitted]
concurrency: loop-${{ github.event.pull_request.number }}
jobs:
  advance:
    if: github.event.review.state == 'approved'
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@v6
        with:
          ref: ${{ github.event.pull_request.head.ref }}
          fetch-depth: 0
      - run: npm install -g @anthropic-ai/claude-code
      - name: Approve the current gate and run to the next one
        env:
          HEAD_REF: ${{ github.event.pull_request.head.ref }}
          APPROVER: ${{ github.event.review.user.login }}
          BASE: origin/main
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
        run: |
          git config user.name "agent-runner"
          git config user.email "agent-runner@users.noreply.github.com"
          code=0
          ./run-loop.sh "${HEAD_REF#feature/}" approve || code=$?
          git push
          exit "$code"

Several things in it need explaining. The push runs even when the runner blocks, because a blocked status that is never pushed is a block nobody sees. The concurrency line stops two approvals from racing each other on the same branch. The workflow fires on any approving review, so as written it would advance on an approval from the wrong person. Add a check of the reviewer against the gate’s owners before you use it. CODEOWNERS on specs/, guardrails/ and prompts/, plus branch protection that requires code owner review, still decides who may merge into main. A prompt template changes agent behavior as much as a guardrail does, so it deserves the same protection.

The default token cuts both ways. GitHub does not trigger workflows on commits pushed with the default GITHUB_TOKEN. That is useful here, because the runner’s own push cannot start another runner and loop. It also means your normal test pipeline will not run on those commits. If you need it to, push with a GitHub App token instead. Remember too that the agent runs inside a job that holds the API key in its environment, so give that job no other secrets.

Anthropic’s Claude Code GitHub Action is the alternative if you prefer it. It runs without waiting for a mention when you give it a prompt input, and claude_args passes CLI arguments. I chose to call the CLI directly so that the laptop and CI run exactly the same script.

What I have not built

The security agent runs in parallel with QA, and the script above does not do that. My design is a second status file, status-security.md, with its own stage functions, started when the coding stage finishes. The final gate refuses to open until both files say done.

I have not written or tested that part. Workflow engines and agent frameworks offer durable state, retries and timers, but I have not evaluated any of them for this purpose.

The design carries over to them because the state and the handovers are files and not something inside the engine.

My own order, again an opinion, is to start with the script, move to CI when a second team joins or an auditor asks who approved what, and consider an engine only when retries and timers become a real problem.

 

The post Agentic Scrum: Wiring the Agents Together first appeared on Sorin Mustaca: Security-AI-Software.

Agentic Scrum, Part 5 of 5: Security, Compliance and the Final Gate

 

This is part 5 of 5, the last one in the Agentic Scrum series. Part 4 covered the QA agent and the test specification. This part covers the security and compliance agent, the final gate, and how to start without betting the company.

The security and compliance agent starts as soon as code exists and runs in parallel with QA. It has one rule that sounds boring and saves a lot of trouble. It does not replace your security tools.

What the security agent does and does not do

Dependency audits, secret scanning, static analysis and license checks come from dedicated tools, because those tools are deterministic and an agent is not. If you have to follow a certain security framework like ISO 27001:2022, then this is the place where you need to provide the security controls. Best is to add here a fixed set of requirements, but don’t add OWASP, NIST or similar frameworks. Just mention them, the agent will know where to find them. Of course, if you want to be thorough or want to adapt the requirements to your company’s internal policies, you can definitely add here the exact requirements.

The agent runs them, reads their output and triages it. It separates noise from real findings, links each finding to a requirement or a control, proposes what the coding loop should fix, and writes handover 04.

It also reads the diff against security.md for things scanners tend to miss, such as a new endpoint without an access check or a log line that contains personal data. This division of labor is my approach, not a standard.

The build also produces a Software Bill of Materials (SBOM), which is attached to the handover as tool output. SBOMs are important to implement the CRA requirements.

 

The rules in security.md

# Security rules
--
## Stop the loop
Any secret in code, config or history.
Any critical finding from dependency or static analysis.
Any new dependency without a recorded license check.
Any new endpoint without an access check.
## Always record The tools run, their versions and their results. The software bill of materials of the build in CycloneDX 1.6 format (JSON). Any breach of security controls in the OWASP and NIST 800 frameworks.
Every finding with its decision: fixed, accepted with reason, or false positive. ## Never Accept a finding silently. Mark a finding as false positive without a written reason.
--

The “Stop the loop” section is what makes the agent allowed to break the loop, as described in Part 1. A secret in the repository is not a negotiation, and neither is a critical finding. The agent stops, writes down why, and the human who owns the problem gets it on the desk.

Controls as files, evidence as a by-product

Ok, I can’t control myself to not write about this, so I will just write about it. 🙂 

Compliance usually means someone assembling evidence before an audit. Here the evidence is a side effect of the process.

A mapping file in the repository ties each control to a check and to the files that prove it.

This is an excerpt, and it is a draft to verify against your own ISMS, because the numbering follows ISO 27001:2022 Annex A, where 8.25 covers the secure development life cycle, with 8.28 on secure coding and 8.29 on security testing in development and acceptance.

# ISO 27001 mapping (draft, verify against your ISMS)
--
## Secure development life cycle (Annex A 8.25)
Check: every change has value.md, requirements.md, agent-spec.md, test-spec.md.
Evidence: the spec folder and its pull requests.

## Secure coding (Annex A 8.28)
Check: guardrails/coding.md applied, CI checks green.
Evidence: handover 02 and the CI results.

## Security testing in development and acceptance (Annex A 8.29)
Check: tests written from the test spec, security tools run.
Evidence: handover 03 and handover 04.
--

The same files help with other regimes. For the EU Cyber Resilience Act, manufacturers need vulnerability handling and, in practice, a software bill of materials, and the BSI technical guideline series TR-03183 describes cyber resilience requirements for manufacturers, including SBOM requirements.

NIS2 and TISAX both want a secure development process that operates, not just one that is described. Because every change leaves its files in git, an auditor can pick any change and walk the chain from value to release.

Confirm with your auditor that this evidence format is acceptable before you rely on it.

 

The final gate

When the QA and security handovers are in, the results go to three people, and each decides something different. A developer judges technical soundness and reads the handovers for oddities, such as many loops or a huge diff. The security specialist judges risk and accepts or rejects each open finding with a written reason. The product owner judges value, which means checking the result against value.md and confirming that the “how we will know it worked” measure can actually be observed now. The decision goes into one more file.

# Final gate: invoice export
--
Decision: release
Developer: approved
Security specialist: approved, finding SEC-3 accepted (low, reason recorded)
Product owner: approved, success measure reviewed after two month-ends

—

If the answer is not release, the cause decides where the work goes back to. A missed requirement goes to requirements.md. A vague spec goes to agent-spec.md. A weak test goes to test-spec.md. A bad rule goes to the guardrails. The earliest artifact responsible gets fixed first, and everything downstream is regenerated, exactly as in Part 1.

 

Starting without betting the company

Start with one team and one low-risk feature, within the work-in-progress cap from Part 2, and run the full pipeline including every gate. Collect numbers from day one.

The four DORA metrics are deployment frequency, lead time for changes, change failure rate and time to restore.

I would add four of my own:

  • How often a spec needed rework after the agent had started,
  • how many loops the agents broke and why,
  • how many hours the product owner and developers spent per feature,
  • how many defects escaped to production.

I have no benchmarks for those last four, so your first features are the baseline.

Two warning signs are worth watching for: Approvals that arrive within minutes and never carry a comment mean the gates have turned into rubber stamps.

And agents that never break the loop mean either the specs are excellent or the agents are guessing, so check which before you celebrate.

 

Previous: Part 4, Tests Are the New Code Review. This is the last part. The whole series: Part 1, Part 2, Part 3, Part 4 and Part 5.

The post Agentic Scrum, Part 5 of 5: Security, Compliance and the Final Gate first appeared on Sorin Mustaca: Security-AI-Software.

Agentic Scrum, Part 4 of 5: Tests Are the New Code Review

This is part 4 of 5 in the Agentic Scrum series. Part 3 covered the specs and the coding loop. This part is about the QA agent and why tests carry so much weight once humans stop reading code. Part 5 closes the series with security, compliance and the final gate.

In Part 1 I made a trade: Humans no longer review generated code. The tests are what make that trade survivable, because if they are weak, nothing else stands between a plausible diff and production. That makes the quality of the test specification the critical path of the whole pipeline.

 

Where the QA agent gets its test cases

The QA agent reads agent-spec.md and requirements.md first, because they say what the feature should do. It reads the code second, only to learn names, interfaces and where behavior lives. The order matters. Tests derived from code confirm what the code does, bugs included. Tests derived from the spec confirm what we asked for. A suite written only from the code is a diary, and you want a suite that reads like a contract.

The test specification

Before any test code exists, the agent writes test-spec.md. Each case has an ID, the requirement it traces to, a type, a starting state, an action and an expected result. Here is a short excerpt for the invoice export from the earlier parts.

# Invoice export: test specification
--
TC-01 traces to R1
Type: integration
Given: a customer with 3 invoices in March
When: the user exports March in format A
Then: the file contains exactly those 3 invoices

TC-02 traces to R2
Type: integration
Given: two customers, each with invoices in March
When: customer 1 exports March
Then: no invoice of customer 2 appears in the file

TC-03 traces to F1
Type: integration
Given: a customer with no invoices in April
When: the user exports April
Then: the response says no invoices were found and no file is created

TC-04 traces to N1
Type: performance
Given: a customer with 40000 invoices in one period
When: the user exports that period
Then: the export finishes within 5 minutes

TC-05 traces to F3
Type: integration
Given: an export in progress
When: the connection drops halfway
Then: no partial file remains on the server
--

The traceability rule is simple. Every requirement ID in requirements.md has at least one case, and every case traces to a requirement or a failure mode. A small script can check this and list the gaps. It does not need an agent, and it is dull and extremely effective. A requirement with no test case is a promise nobody is checking.

Who validates the test specification

QA engineers and developers review test-spec.md in a pull request before the QA agent writes any test code. Reviewing a test spec is cheaper than reviewing test code, because the question is whether we test the right behavior, not whether the syntax is pretty. Reviewers hunt for a short list of gaps. Missing negative cases. Boundaries such as zero, one, many, the limit and one over the limit. Data variety, like names with apostrophes, time zones and empty fields. Permission cases, such as the wrong user and the right user in the wrong role. Repeated actions, like the double click. And two kinds of bad cases: those that merely restate the implementation, and those that cannot fail.

Writing the tests

After approval, the QA agent writes the tests, runs them and records the results in handover 03. The rules live in guardrails/qa.md. The sample below is short on purpose.

# QA rules
--
Use synthetic test data only. Never copy production data.
Every test carries the ID of its test case in its name.
Do not change production code. Report failures in the handover.
Quarantine a flaky test after three inconsistent runs and note it in the handover.
Never delete or weaken a test to make a run pass.
--

The separation runs both ways. The QA agent may not touch production code, and the coding agent may not touch the tests. A failing test goes back into the coding loop with a handover that names the failing case ID, so the coding agent knows exactly which promise it broke. The three-run flaky rule is an example number, so pick your own, but write it down. A flaky test left to rot teaches the whole team to ignore red.

Do the tests actually test anything

Passing tests prove little if they cannot fail. One way to check is mutation testing. A tool changes the code in small ways, for example flipping a comparison, and sees whether any test notices. Tools exist for many languages, such as PIT for Java and Stryker for JavaScript and .NET. It costs run time, so I would run it only on the changed code and treat each surviving mutant as a question for the QA engineers. I have not measured the effect, so treat it as an option and not a rule.

What humans still test

Agents test what we specified. Humans find what we did not think of. Keep exploratory testing time for the QA engineers, especially on new features.

The strange order of clicks, the double submit, the customer who uses the export for something else entirely. Every finding becomes a new case in test-spec.md, which is how the suite grows from reality instead of imagination.

 

Previous: Part 3, Write Specs a Coding Agent Can Actually Follow. Next: Part 5, Security, Compliance and the Final Gate.

The post Agentic Scrum, Part 4 of 5: Tests Are the New Code Review first appeared on Sorin Mustaca: Security-AI-Software.

NIS2 Fulfillment through TISAX Assessment and ISA6

ENX has released an interesting article about how NIS2 requirements map to TISAX requirements. For this, there is a short introductory article called “TISAX and Cybersecurity in Industry – Expert Analysis Confirms NIS2 Coverage” and

and a full article of 75 pages : https://enx.com/TISAX-NIS2-en.pdf

An analysis conducted within ENX’s expert working groups examined how well a TISAX assessment based on the ISA6 catalog aligns with the requirements of the NIS2 Directive.

The key findings include:

  • All relevant NIS2 requirements are addressed, including risk management, incident response, supply chain security, governance, and technical safeguards.
  • TISAX goes beyond minimum legal requirements, incorporating structured maturity assessments, systematic vulnerability management, and continuous improvement mechanisms.
  • The established three-year assessment cycle is considered appropriate in the context of NIS2.
  • TISAX labels are publicly accessible via the ENX database, enabling transparent verification.
  • Additional national requirements must be addressed separately. This includes, in particular, country-specific reporting obligations to authorities or national CSIRTs. While not part of the TISAX standard, these requirements can be effectively managed using existing TISAX structures.

 

Here is the summary of the PDF above created with NotebookLM (9 pages):

Detailed Briefing Document: NIS2 Fulfillment Through TISAX

Date: October 26, 2023

Prepared for: Key Stakeholders concerned with NIS2 Compliance in the Automotive Industry

Subject: Review of the “NIS2 fulfilment through TISAX” Expert Opinion, detailing how TISAX assessments align with NIS2 Directive requirements.

Executive Summary

The automotive industry, through the ENX Association and the ISA requirements catalogue, has proactively addressed cybersecurity for years, culminating in the TISAX assessment standard established in 2017. This expert opinion, published by the ENX Association, concludes that companies with TISAX-compliant sites fully implement the requirements of the NIS2 Directive. The ISA catalogue and TISAX assessments go beyond NIS2 requirements, defining and continuously upholding the “state of the art” in information and cybersecurity for the industry. Independent auditors confirm implementation in a three-year cycle, deemed appropriate even when compared to the two-year cycle for critical infrastructure operators under German law. A common exchange mechanism allows organizations to query TISAX status and, by extension, NIS2 compliance, of partners.

Key Takeaway:

Organizations with a valid TISAX label are generally well-prepared for the material requirements of NIS2, with the caveat that they must still manage national reporting requirements in parallel and ensure that their TISAX assessment objectives reflect their overall risk and cover all NIS2-affected sites.

1. Introduction and Overview of NIS2 and TISAX

The NIS2 Directive (EU) 2022/2555 aims to strengthen cyber resilience across the European Union, replacing the NIS1 Directive. It expands the scope of affected organizations, including many in the automotive industry. The automotive industry recognized the need for industry-wide information and cybersecurity and developed the TISAX Assessment standard and its underlying ISA requirements catalogue. The purpose of this analysis is to demonstrate that TISAX assessments, based on ISA6, can be considered proof of compliance with NIS2 requirements.

  • Purpose of Analysis: To assist companies in the automotive industry in assessing whether TISAX compliance covers NIS2 requirements.
  • Scope of Analysis: Focuses exclusively on NIS2 Directive requirements with specific implementation guidelines for companies. It does not provide implementation assistance or confirm a company’s readiness for NIS2 outside of TISAX. Country-specific implementations and additional material requirements are not covered.
  • Target Audience: Experts from companies affected by NIS2 that use or undergo TISAX assessments, and authorities responsible for NIS2 compliance and supervision.

2. TISAX Assessment and Underlying Catalogue of Requirements (ISA6)

TISAX assessments, conducted by independent auditors in a three-year cycle, are based on ISA catalogue version 6 (ISA6).

A critical distinction is made between TISAX scope definition and ISO management system certifications:

  • TISAX Assessment Scope: Utilizes a generally defined standard scope, ensuring comparability and a similar level of security across companies. This contrasts with ISO/IEC 27001, where the audited organization defines its ISMS scope. For the conclusions of this document to apply, TISAX Assessment objectives must reflect the company’s overall risk, and all NIS2-affected sites must have corresponding TISAX labels.
  • TISAX Assessment Objectives: Allow for scaling the assessment content based on risk and criticality of information processed (e.g., Confidential, Strictly Confidential, High Availability, Very High Availability, Data, Special Data, Prototype Protection).
  • TISAX Assessment Levels (AL):AL 1: Self-assessment, auditor checks completion, low confidence, not used in TISAX.
    • AL 2: Auditor performs plausibility check of self-assessment, checks evidence, conducts interviews (usually web conference).
    • AL 3: Comprehensive review, auditor verifies documents, conducts planned and unplanned interviews, observes implementation, and considers local conditions. Generally takes place on-site at all locations.
      If multiple objectives are used, the highest AL is applied to the overall assessment.
  • TISAX Group Assessments (Simplified Group Assessment – SGA): Designed for companies with many locations and a centralized, highly developed ISMS.
    • S-SGA (Sample-based): Main site extensively assessed, sample sites assessed, other sites assessed at one AL lower.
    • R-SGA (Rotating Schedule-based): Main site extensively assessed, other locations assessed at the same AL but distributed over the three-year validity period. Not available for prototype protection objectives.
  • TISAX Control Questions and Requirements:Requirements are categorized (Must, Should, Additional requirements for high protection needs, Additional requirements for very high protection needs, Additional requirements for SGA).
    • “Must” requirements are strict,
    • “Should” allows for justified deviations.
    • Additional requirements are subdivided by protection objectives (Confidentiality (C), Integrity (I), Availability (A)).
    • Individual control questions cannot be excluded as “not applicable”; they must be implemented holistically.
  • Deviations in TISAX Model: TISAX includes a maturity model (six levels, target is “established”) to assess practical implementation. Identified deviations require corrective action plans with defined implementation periods (up to 3, 6, or 9 months). Failure to correct deviations results in a failed audit.
  • Validity Period: TISAX assessments are valid for three years. Companies must continuously implement specified measures, conduct regular internal audits, and report significant changes affecting the ISMS or physical conditions, potentially requiring interim assessments.

3. NIS2 Article 20: Governance and Training

NIS2 Article 20 focuses on the governance body’s responsibility for cybersecurity risk management and their participation in relevant training.

  • NIS2 Article 20 (1): Governing Body’s Role in Risk Management: Requires the governing body to establish and monitor structures for cybersecurity risk management.
  • TISAX Fulfilment: Fully covered by ISA6 controls (1.2.1, 1.2.2, 1.4.1, 1.5.1, 1.5.2, 7.1.1). These controls check for defined ISMS scope, determined requirements, management commissioning and approval of ISMS, communication channels, regular reviews of ISMS effectiveness, defined responsibilities, resource availability, adequate security structure, qualified employees, conflict of interest avoidance, regular risk assessments, risk classification and allocation, security risk handling, compliance verification, independent ISMS reviews, and consideration of regulatory/contractual provisions.
  • Summary: “The requirement that the governing body of an organization has created appropriate structures to implement and monitor the implementation of the cybersecurity risk management measures taken to comply with Article 21 (NIS2 Article 20 (1)) is described by the controls defined in the ISA6 assessment standard and is fully checked for existence and implementation by the responsible auditor within a TISAX assessment.” The three-year TISAX cycle is considered appropriate given NIS2’s risk-based approach.
  • NIS2 Article 20 (2): Training for Governing Body and Relevant Members: Requires regular training for governing body members and other relevant individuals to acquire sufficient knowledge and skills in cybersecurity risk identification, assessment, and management.
  • TISAX Fulfilment: Checked by ISA6 control 2.1.3 (“To what extent is staff made aware of and trained with respect to the risks arising from the handling of information?”). This includes comprehensive training for all employees (including management), an awareness training concept covering relevant areas, consideration of target groups, regular execution, and documentation of participation.
  • Summary: While ISA does not explicitly list “management body” for training, it mandates training for “all employees” and differentiation by “target group,” implicitly covering management. This ensures the requirements of NIS2 Article 20 (2) are met.

4. NIS2 Article 21: Risk Management Measures

NIS2 Article 21 mandates appropriate and proportionate technical, operational, and organizational measures to manage risks to network and information systems.

  • NIS2 Article 21 (1): General Measures for Risk Management: Requires appropriate and proportionate measures to manage risks and minimize incident impact, considering the state of the art and implementation costs.
  • TISAX Fulfilment: Covered by ISA6 controls 1.2.1 (“To what extent is information security managed within the organization?”) and 1.4.1 (“To what extent are information security risks managed?”). These check for defined ISMS scope, determined requirements, existence and regular updating of risk assessments, assignment of risk owners, and action plans for risks.
  • Summary: “The requirements of NIS2 Article 21 (1) are described by the controls defined in the ISA6 assessment standard and are checked for existence and implementation by the auditor responsible during a TISAX assessment.” The TISAX assessment ensures a risk-based approach tailored to the company’s circumstances.
  • NIS2 Article 21 (2) a) – j): Specific Measures: These sub-articles detail specific areas for cybersecurity measures.
  • a) Policies on Risk Analysis and Information System Security: Fully covered by ISA6 controls 1.4.1, 5.2.7, 5.3.1, checking for procedures to identify, assess, and address risks, network management requirements, and information security consideration in new/developed IT systems.
  • b) Incident Handling: Fully covered by ISA6 controls 1.6.1, 1.6.2, checking for definition of reportable events, reporting channels, communication strategies, and incident processing procedures (categorization, qualification, prioritization, response, escalation). “The processes for detection, reporting channels and procedures, classification, processing and escalation (if necessary), go beyond the requirements stipulated in NIS2.”
  • c) Business Continuity, Backup Management, Disaster Recovery, Crisis Management: Fully covered by ISA6 controls 1.6.3, 5.2.8, 5.2.9, checking for crisis management preparedness, IT service continuity planning, and backup/recovery of data and IT services.
  • d) Supply Chain Security: Fully covered by ISA6 controls 1.2.4, 1.3.3, 1.6.1, 1.6.2, 1.6.3, 5.3.3, 6.1.1, 6.1.2. This includes defining responsibilities with external IT service providers, ensuring use of evaluated services, incident reporting and management from external parties, secure removal of information from external services, ensuring information security among contractors and partners, and contractual non-disclosure agreements. “The requirements in the ISA6 assessment standard go beyond the requirements of NIS2 and additionally include, for example, compliance with information security standards beyond the direct providers or service providers.”
  • e) Security in Network and Information Systems Acquisition, Development, and Maintenance (including vulnerability handling): Fully covered by ISA6 controls 1.2.3, 1.2.4, 1.3.4, 5.2.1, 5.2.4, 5.2.5, 5.2.6, 5.3.1, 5.3.2, 5.3.3, 5.3.4. This extensive coverage includes considering information security in projects, responsibilities with external IT service providers, approved software usage, change management, event logging, vulnerability identification and addressing, technical checks of IT systems, security in new/developed IT systems, network service requirements, and information protection in shared external services. “The assessment goes beyond the requirements of NIS2 by considering the return and secure removal of information assets from IT services outside the organization.”
  • f) Policies and Procedures to Assess Effectiveness of Cybersecurity Risk-Management Measures: Fully covered by ISA6 controls 1.2.1, 1.4.1, 1.5.1, 1.5.2, 1.6.2, 5.2.6, checking for regular review of ISMS effectiveness by management, up-to-date risk assessments, regular compliance checks, independent ISMS reviews, continuous improvement based on security events, and regular technical audits of IT systems and services. The three-year cycle is considered appropriate.
  • g) Basic Cyber Hygiene Practices and Cybersecurity Training: Covered by a wide range of ISA6 controls (1.1.1, 2.1.2, 2.1.3, 4.1.3, 4.2.1, 5.1.1, 5.1.2, 5.2.1, 5.2.2, 5.2.3, 5.2.4, 5.2.5, 5.2.6, 5.2.7, 5.2.8, 5.2.9, 5.3.1, 5.3.2, 5.3.3, 5.3.4). This includes information security policies, contractual obligations for staff, comprehensive training, secure management of user accounts/login info, access rights management, cryptographic procedures, information protection during transfer, change management, separation of environments, malware protection, event logging, vulnerability management, technical audits, network management, continuity planning, backup/recovery, and secure handling of information assets.
  • h) Policies and Procedures Regarding Cryptography and Encryption: Fully covered by ISA6 controls 5.1.1, 5.1.2, checking for adherence to industry standards, technical rules, lifecycle management of cryptographic keys, key sovereignty, and protection of information during transfer (including encryption).
  • i) Human Resources Security, Access Control Policies, and Asset Management: Fully covered by a comprehensive set of ISA6 controls (1.3.1, 1.3.2, 1.3.3, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 3.1.3, 3.1.4, 4.1.1, 4.1.2, 4.1.3, 4.2.1, 5.2.1, 5.2.2, 5.2.3, 5.2.4, 5.2.5, 5.2.6, 5.2.7, 5.2.8, 5.2.9). This includes identification and classification of information assets, use of approved external IT services, employee qualification for sensitive roles, contractual obligations, training, mobile work regulations, handling of supporting assets, mobile device management, identification means management, user access security, user account/login info management, access rights, change management, separation of environments, malware protection, event logging, vulnerability management, technical audits, network management, continuity planning, and backup/recovery.
  • j) Multi-factor Authentication, Continuous Authentication, Secured Communications, and Emergency Communication Systems: Fully covered by ISA6 controls 1.6.3, 4.1.2, 4.1.3, 5.1.2, 5.2.8. This involves crisis planning for communication, user authentication procedures (including strong authentication/MFA for privileged accounts), secure management of user accounts/login info, protection of information during transfer (secure voice/video/text communication), and continuity planning that includes alternative communication strategies.
  • NIS2 Article 21 (4): Immediate Corrective Measures for Non-Compliance: Requires immediate necessary, appropriate, and proportionate corrective measures upon awareness of non-compliance with Article 21 (2) measures.
  • TISAX Fulfilment: Fully covered by ISA6 controls 1.5.1, 1.5.2, checking for verification of policy observation, regular review of policies/procedures, documented results, regular compliance checks, and initiation/pursuit of corrective measures based on internal and independent reviews. The three-year cycle is deemed appropriate.

5. NIS2 Article 23: Incident Reporting

NIS2 Article 23 outlines requirements for reporting security incidents.

  • NIS2 Article 23 (1): Notification of Significant Security Incidents: Essential and important entities must notify their CSIRT or competent authority without undue delay of significant security incidents. Recipients of services must also be informed immediately. Information enabling cross-border impact determination must be provided.
  • TISAX Fulfilment: Almost fully met by ISA6 controls 1.6.1, 1.6.2. These check for defined reportable events, known reporting mechanisms based on severity, available reporting channels, handling of events by category, knowledge of reporting obligations and contact information, and communication strategies.
  • Summary: “One exception here is the disclosure of cross-border effects, which is not explicitly required within the ISA. It has already been defined here that emergency communication must be expanded to include the specifications from NIS2. Once this extension has been considered, the requirements are fully met.”
  • NIS2 Article 23 (2): Communication of Remedial Actions to Recipients: Entities must promptly communicate to affected recipients any measures or remedial actions they can take in response to a significant cyber threat, and inform them of the threat itself.
  • TISAX Fulfilment: Covered by ISA6 control 1.6.2. This includes categorization, qualification, and prioritization of reported events, appropriate responses, and communication strategies considering target recipients and reporting periods.
  • Summary: “The explicit contact information, reporting channels and languages must be included in the Business Continuity Management (BCM) by the companies following their publication by the EU member states. The auditor cannot guarantee that this information is available, as the information to be included is company-specific and can therefore take a variety of forms.”
  • NIS2 Article 23 (3): Definition of Significant Security Incident: Provides an informative definition (serious disruption or financial/material/immaterial damage).
  • TISAX Fulfilment: Purely informative, no assessable measures.
  • NIS2 Article 23 (4): Reporting Timelines and Content: Specifies detailed reporting timelines (early warning within 24 hours, incident notification within 72 hours, intermediate reports, final report within one month).
  • TISAX Fulfilment: Covered by ISA6 controls 1.6.1, 1.6.2, 1.6.3. These check for defined reportable events, mechanisms based on severity, accessible reporting channels, obligation to report, feedback procedures, categorization/prioritization, maximum response times, escalation, and crisis communication strategy.
  • Summary: “In addition to the knowledge and existence of the necessary reporting channels and deadlines, the ISA standard also requires the establishment of crisis-proof communication. At this point, the requirements of the ISA go beyond the requirements of NIS2.” Similar to 23(2), explicit contact information and channels are company-specific and not directly assessed by TISAX.
  • NIS2 Article 23 (5-11): No explicit demands on affected companies requiring preparatory measures.

6. NIS2 Article 24

  • NIS2 Article 24 (1): No explicit demands on affected companies that require preparatory measures.
  • TISAX Fulfilment: No assessable measures.

7. NIS2 Article 25: European and International Standards

NIS2 Article 25 addresses the application of European and international standards for network and information system security.

  • TISAX Fulfilment: “The requirements of NIS2 Article 25 to use European and international standards and technical specifications for the security of network and information systems to ensure the implementation of the requirements for companies resulting from NIS2 are met by an audit of an organization’s ISMS carried out in accordance with TISAX, as this report demonstrates.” No explicit demands for preparatory measures are made on companies.

8. NIS2 Articles 22, 26-29

  • NIS2 Article 22: Coordinated Risk Assessments for Critical Supply Chains: No specific requirements for companies, not considered further in this report.
  • NIS2 Articles 26-28 (Jurisdiction, Register of Entities, Domain Name Registration Data): No measures to be examined for companies, not considered in this document.
  • NIS2 Article 29: Exchange of Cybersecurity Information: “The requirements of NIS2 Article 29 are not assessed within the TISAX assessment.”

9. Overall Summary and Conclusion

The “NIS2 fulfilment through TISAX” document strongly asserts that TISAX assessments, based on the ISA requirements catalogue, provide comprehensive evidence that companies meet the material requirements of the NIS2 Directive.

  • State of the Art: ISA and TISAX are considered “state of the art” for information and cybersecurity in the automotive industry due to their continuous development by experts, application by thousands of companies, and resulting knowledge gain.
  • Management Responsibility and Risk Management: A TISAX label indicates that the management of an assessed company fulfills the responsibility required in NIS2 Article 20 and has implemented all state-of-the-art risk management measures of Article 21, provided the assessment objectives reflect overall risk and all NIS2-affected sites were included.
  • Audit Cycle: The three-year TISAX audit cycle is deemed appropriate, even compared to the two-year cycle for critical infrastructure operators under German law, due to the continuous monitoring and documentation obligations within the cycle.
  • Preparation for NIS2: Companies with a valid TISAX label are “well positioned to meet the requirements of the NIS2 directive in these areas.”
  • Reporting Requirements: TISAX provides proof of established mechanisms for mandatory reporting to authorities and customers. However, companies are responsible for integrating country-specific additional requirements and verifying them against implemented measures.

In essence, TISAX is presented as a robust framework that aligns with and often exceeds the cybersecurity requirements set forth by NIS2 for the automotive sector.

 

 

The post NIS2 Fulfillment through TISAX Assessment and ISA6 first appeared on Sorin Mustaca: Security-AI-Software.

Guide for delivering frequently software features that matter (series) #2/2: Challenges and the path forward

Click below for the podcast version (AI generated):

Challenges that stop teams to deliver and how to solve them

Objection 1: “Our features are too complex for short sprints”

This is the most common objection I hear, and it reveals a fundamental misunderstanding. The solution isn’t longer sprints or more sprints — it’s better feature decomposition.

Take an e-commerce checkout flow. Instead of trying to build the entire process in one Sprint, break it down: first, just shopping cart management; next, shipping information; then payment processing; finally, order confirmation.

Each piece provides immediate value and teaches you something about user behavior.

The key insight? Users will happily use a partial feature if it solves a real problem for them. Of course, some things can be used, some others don’t.

In the above example, it makes no sense to allow ordering without being able to pay or to enter a delivery address.

It’s important to apply common sense and decompose features in such a way that they provide some value to the user or stakeholder.

Another aspect here is that sometimes you maybe don’t deliver the feature to the users, but you accumulate a few deliverables and then you ship them together, when it makes sense.

The key take out is: there is no receipt for how small or big the features should be in order to allow delivery. Try to decompose them and use common sense when to deliver them: individually or in sets.

 

Objection 2: “We can’t maintain quality at this pace”

Quality isn’t something you add at the end—it’s built into every step. The teams with the highest delivery frequency actually have the fewest quality issues because they’ve automated their quality checks and made them part of their daily workflow.

But this has a mandatory requirement the fact that automation is there.

If you postpone automation you run eventually in technical debt, which is more expensive to implement later.

 

Objection 3: “Our stakeholders don’t understand this approach” or “they don’t know what they want”

Stakeholder education is crucial. They need to understand that their active participation is what makes frequent delivery valuable. Regular “show and tell” sessions where stakeholders can actually use the software create enthusiasm and provide immediate feedback.

One technique that works well: frame frequent delivery as risk reduction. Instead of betting everything on a big release, you’re placing smaller, safer bets that can be adjusted based on market response.

Ask for feedback about you delivered and what you plan to deliver. You will see that even if the stakeholders don’t know exactly what they want, they will find it easier to provide feedback or corrections to your plans.

 

Advanced strategies for teams

Release planning without rigidity

While Scrum focuses on Sprint-level planning, successful teams also think several Sprints ahead. I use story mapping to visualize how features relate to user workflows, which helps identify what should be delivered together versus what can stand alone.

Think of it as planning a road trip—you know your major destinations but remain flexible about the exact route based on what you discover along the way.

Manage dependencies

Dependencies kill delivery predictability. The best teams minimize them through smart architecture choices (like microservices) and careful Sprint planning. When dependencies exist, make them visible through dependency boards that show how different teams’ work interconnects.

Define and collect metrics that actually matter

Velocity is useful for Sprint planning, but business metrics tell the real story.

  • Did you receive any feedback or complains from customers/users/stakeholders?
  • How quickly can you respond to customer requests?
  • How often do users engage with new features?
  • How many bugs did you have in the last delivery?
  • Were the features delivered used?

These metrics ensure frequent delivery, which translates to business success.

Building the culture that makes it work

Creating psychological safety

Frequent delivery requires teams to take risks and experiment. This only works when people feel safe to voice concerns, make and admit mistakes.

The goal is not to make mistakes, but to be aware that they might occur and react accordingly.

In my retrospectives, I focus on systems and processes, not individual performance.

When problems arise, we ask “how do we prevent this?” not “who caused this?”

Yes, sometimes it is needed to get direct feedback, but in general, I try to focus this feedback on me and less on other team members.

 

Real customer collaboration

The Agile Manifesto’s emphasis on customer collaboration isn’t just philosophy—it’s practical necessity.

Whenever possible and feasible, try to involve actual end users in sprint reviews, not just business stakeholders. Their feedback often reveals usability issues that internal teams miss.

Implement user analytics directly in your application to provide continuous insight into how people actually use your software.

 

Instead of conclusions

Mastering frequent delivery is a journey, not a destination.

The teams I’ve worked with who succeed share three characteristics:

  • They embrace change as opportunity,
  • They prioritize working software over comprehensive documentation (who doesn’t ?), and
  • They value collaboration over rigid processes.

Start with the fundamentals—reliable Sprint execution and solid engineering practices—then layer on advanced techniques as your team matures.

The goal isn’t perfection; it’s continuous progress toward more effective value delivery.

Organizations that master frequent delivery gain significant competitive advantage. They respond quickly to market changes, incorporate user feedback rapidly, and create more engaging work environments where team members see the immediate impact of their efforts.

Your journey starts with the next Sprint. Focus on delivering something valuable to users, measure their response, and use that learning to make the next Sprint even better.

That’s the path to software that actually matters.

The post Guide for delivering frequently software features that matter (series) #2/2: Challenges and the path forward first appeared on Sorin Mustaca: Security-AI-Software.

Guide for delivering frequently software features that matter (series) #1/2: the Pillars of successful frequent delivery

Click below for the podcast version (AI generated):

Guide for delivering frequently software features that matter: the three Pillars of successful frequent delivery

If you’re a software engineer older than 30 years, then you definitely have worked following a non-agile methodology.

Those methodologies are based on a fixed structure, a lot of planning, and hope that everything will go as planned. And they never worked 🙂

 

Small bets, less risk

After helping many teams transform their delivery approach over the past 2 decades, I’ve learned that the most successful software projects share one trait: they deliver working software early and often. Think of it like learning to cook—you taste as you go rather than waiting until the entire meal is prepared to discover it needs salt – or to discover that it has too much salt.

Scrum’s power lies in its ability to turn software development from a high-stakes gamble into a series of small, manageable bets.  It basically lowers the risk of creating something that is a failure before it is even released.

Instead of spending months building features that might miss the mark, you deliver value every 2 weeks and course-correct based on real user/stakeholder feedback.

 

The Three Pillars of successful frequent delivery

1. Sprint Planning that actually delivers value

Here’s where most teams go wrong: they focus on completing tasks instead of delivering outcomes.

In my experience, the magic question that transforms Sprint planning is: “What could we deliver to users at the end of this Sprint that would make them say ‘this is useful’?”

Or maybe, if you’re not that far, think in terms of: what do we have to do in order to be able to have something to show to customers/users/stakeholders?

This shift in thinking leads to what I call “vertical slicing”—delivering complete, end-to-end functionality rather than building in horizontal layers.

Think of instead of spending a sprint on “database framework,” you deliver a complete feature like “user login” that touches database, business logic, and user interface.

Or, instead of having a “GUI framework”, implement a GUI element and make it testable. You will still need to put the base of the GUI framework, but you will likely (or hopefully) implement only those elements needed to deliver that one element.

 

2. Your Definition of Done (DoD) is your safety net

The Definition of Done isn’t bureaucracy—it’s your insurance policy against the dreaded “90% complete” syndrome. I’ve seen too many teams rush to demo features that weren’t actually ready for users, creating technical debt that haunts them for months.

A solid Definition of Done includes peer reviews, automated tests, security checks, performance validation, and sometimes stakeholder approval.

Think of it as your quality gateway: nothing passes through unless it meets production standards.

 

3. What enables speed

CI/CD

Continuous Integration isn’t just a nice-to-have—it’s the foundation that makes frequent delivery possible. When code is integrated and tested multiple times, you eliminate the integration nightmares that plague traditional development.

Anything that is manual, especially testing, takes more time on the long run. And in software development you are running a multi stage marathon. Invest in automated End-To-End testing and you invest the time once, not every release cycle.

 

Main branch development

The teams who excel at frequent delivery have embraced “trunk-based development” where everyone works from the main branch. This forces smaller, more frequent commits and prevents the merge conflicts that can derail Sprint goals.

You might say that this is not always possible – and I even agree. Sometimes you need to branch in order to allow parallel development of larger features, which you don’t want to deliver step-by-step. While I don’t like this approach, I understand that sometimes it makes sense.

But, even in such cases, you can apply the same strategy on the parallel branch: make many small commits so that you can release often and test often.

 

I’ll stop here for now, but as you can see, there are many challenges that stop teams from releasing often.

I’ll address this in the next article from this series.

The post Guide for delivering frequently software features that matter (series) #1/2: the Pillars of successful frequent delivery first appeared on Sorin Mustaca: Security-AI-Software.

Beyond “Move Fast and Fail Fast”: Balancing Speed, Security, and … Sanity in Software Development (with Podcast)

Move fast and fail fast

In software development, the mantra “move fast and fail fast” has become both a rallying cry and a source of considerable debate.

It champions rapid iteration, prioritizing speed and output, often at the perceived expense of meticulous planning and architectural foresight. This approach, deeply intertwined with the principles of agile development, presents a stark contrast to the traditional model of lengthy planning cycles, rigorous architecture design, and a focus on minimizing risk through exhaustive preparation.

Fail fast

The allure of “fast” is undeniable. In today’s competitive market, speed to market can be the difference between success and failure. Rapid prototyping allows for early user feedback, facilitating continuous improvement and ensuring the product aligns with real-world needs. In essence, it’s about validating hypotheses quickly and pivoting when necessary. This iterative approach, inherent in agile methodologies, fosters a culture of adaptability and responsiveness, crucial in environments where change is the only constant.

So, “fail fast” refers mostly to a fast validation of the MVP (minimum viable product) and drop it if the results are unsatisfactory. This is, in general, very good because it is an optimal usage of resources.

Speed vs. Integrity

However, the emphasis on speed can raise legitimate concerns, particularly regarding security and long-term architectural integrity.

The fear is that a “move fast” mentality might lead to shortcuts, neglecting essential security considerations and creating a foundation prone to technical debt.

This is where the misconception often lies: “fast” in this context does not necessitate “insecure” or “bad.” Rather, it implies a prioritization of development output, which can, and should, be balanced with robust security practices and a forward-thinking architectural vision.

But, how can this forward-thinking be achieved, when the team is focused mostly on delivering value to validate with customers the assumptions made?

The key lies in understanding that agile development, when implemented effectively, incorporates security and architecture as an integral part of the process.

Concepts like “shift left security” emphasize integrating security considerations early in the development lifecycle, rather than as an afterthought.

Automated security testing, continuous integration/continuous deployment (CI/CD) pipelines with security gates, and regular security audits can be woven into the fabric of rapid development, ensuring that speed does not compromise security.

Validating early in the process means also that the not only the product is proven to meet the expectations, but also the architecture it is built upon.

The traditional approach

On the other hand, the traditional approach, with its emphasis on extensive planning and architecture, offers the perceived stability of a well-defined blueprint.

However, this approach carries its own risks. The extended planning phase can lead to delays, rendering the final product obsolete by the time it reaches the market. Moreover, the rigid nature of pre-defined architectures can hinder adaptability, making it difficult to respond to unexpected changes in user needs or market dynamics. The risk of “failing due to delays and lack of adaptation” is a real threat in fast-paced environments.

The modern software developer must navigate this tension, finding a balance between speed and stability. This involves adopting a pragmatic approach, leveraging the benefits of agile methodologies while mitigating the associated risks.

This can involve:

  • Establishing clear security guidelines and incorporating them into the development process. Having a SSDLC is mandatory when having to deliver fast.
  • Prioritizing a modular and adaptable architecture that can evolve with changing requirements. Modules should be possible to be implemented quickly and dropped without a lot of pain if they prove to be unsuccessful.
  • Implementing robust testing and monitoring to identify and address issues early on. A CI/CD pipeline will allow the team to focus more on delivering new features than testing and integrating all the time.
  • Fostering a culture of continuous learning and improvement, where developers are encouraged to experiment and innovate, while also being accountable for security and quality.
  • Utilizing threat modeling and risk assessment early in the design process. Threat modeling contains a risk assessment, which when done properly will prevent major issues later.

Instead of Conclusions:  my experience

Ultimately, the most effective approach is not about choosing between “fast” and “slow,” but about finding the right cadence of delivering value for each specific project .

The goal is to deliver constantly small pieces of code that bring value while avoiding failure altogether. If deliverables are constantly validated, a failure can only be of a small deliverable increment, which can be either quickly improved, completely removed or entirely replaced with something else.

Important is to learn from it quickly and adapt, ensuring that software development remains a dynamic and evolving process.

When I run a project, I define the goal and the high level path to achieve that goal. Sometimes this path is clear, sometimes many experiments are needed, and some will fail, some will succeed.

The post Beyond “Move Fast and Fail Fast”: Balancing Speed, Security, and … Sanity in Software Development (with Podcast) first appeared on Sorin Mustaca: Security-AI-Software.

Project management with Scrum (with Podcast)

They can’t mix, can they?

Seems like a contradiction to talk about classical project management and the best agile software development methodology ?

But let me ask you this: ever feel like traditional project management is great for mapping out the big picture but falls short when it comes to the nitty-gritty of execution?

And conversely, while Scrum is fantastic for rapid iteration and delivering value quickly, it sometimes lacks that long-term strategic view?

If you feel this, then you’re not alone!

Yes, they can mix

Let’s talk about how to get the best of both worlds when managing projects: having a solid long-term plan and the flexibility to adapt and deliver quickly.

Sometimes it feels like traditional project management is great for the big picture but not so hot on the details, right?

And Scrum is awesome for getting stuff done in short bursts, but can sometimes lose sight of the overall direction.

Turns out, a lot of teams are finding a sweet spot by mixing these two. Think of it like having a good map for your road trip and a sturdy vehicle to handle any bumps along the way.

So, what does each approach bring to the party?

Classical Project Management: The Grand Plan

Imagine classical project management as your strategic guide. It’s all about figuring out the project’s scope, setting those long-term goals, marking important milestones, and creating a project plan.

We’re talking budget, resources, timeline – the whole thing.

It’s about answering the big questions:

  • What are we trying to do?
  • When does it need to be finished?
  • How much will it cost?
  • Who’s in charge of what?

This is great for having a clear vision and a roadmap. It helps everyone stay on the same page and lets you track progress.

The tricky part? Sometimes those detailed plans can go out of date pretty fast. Because things change, right?

 

Scrum: Getting Things Done

Now, Scrum is your agile friend. It’s built for doing things in short bursts, perfect for navigating the twists and turns of, well, pretty much any project.

You break the project into smaller chunks – sprints – usually 2 weeks long. Each sprint has specific goals, and the team works together to deliver something useful by the end.

Scrum is all about talking to each other a lot, having quick daily meetings, and checking in regularly. It’s about being flexible and delivering value bit by bit.

Scrum is great at handling feedback, adding new stuff, and showing real results quickly.

The thing is, on its own, Scrum might need that long-term direction that classical project management provides.

The Perfect Mix: Working Together, Delivering Fast

The magic happens when you put these two together:

  • You use classical project management to set the long-term vision, make the initial plan, and decide where you’re going. This gives you a good map.
  • Use Scrum to actually get there, one sprint at a time. Scrum becomes your engine for delivering value along the route laid out by classical project management.

Here’s a simple way to think about it:

  1. Big Picture: Classical project management sets the overall project scope, goals, and timeline. Everyone knows what the target is.

  2. Breaking it Down: The project gets broken down into smaller pieces, often using the classical project management approach. This makes the work manageable.

  3. Sprint Time: The Scrum team takes a chunk of work and plans it out for a sprint. They figure out what they can realistically do in that time.

  4. Daily Check-ins: The team has quick daily meetings to talk about progress, any problems, and adjust as needed. Keeps everyone in sync.

  5. Show and Tell: At the end of each sprint, the team shows what they’ve built and gets feedback. This feedback helps plan future sprints.

  6. Getting Better: Regular team meetings let everyone think about how they’re working and find ways to improve.

So, by mixing classical project management and Scrum, you get the best of both worlds. You have a clear long-term plan and the flexibility to adapt and deliver quickly. It’s a great way to work together, deliver fast, and make sure projects stay on track while being able to handle whatever comes up.

The post Project management with Scrum (with Podcast) first appeared on Sorin Mustaca: Security-AI-Software.