Cyber Risks · Trail of Bits Blog

Use mutation testing to find the bugs your tests don

Summary: Trail of Bits describes mutation testing as a technique that introduces systematic bugs, called mutants, into a codebase and runs the existing test suite to see whether it catches them, with the share of killed mutants serving as the effectiveness metric. During its audit of the Arkis protocol, a mutation campaign produced uncaught mutants that led to TOB-ARK-10, a high-severity issue in which a function blindly trusts the attacker-manipulable _cmd parameter instead of validating the amount of tokens transferred, potentially allowing funds to be drained.

What's compelling: The Arkis flaw survived a test suite that reported adequate coverage, so a passing pipeline and a green coverage number told the team nothing about a bug that could have let attackers drain protocol funds. The mutation that exposed it was as simple as commenting out line 33, which changed no test result.

Read the original at Trail of Bits Blog ↗

Topics
Vulnerabilities & Patching
Related