Skip to main content

Reproducible ASH checks

Why I added a pinned scanner environment to ASH, and what reproducibility can and cannot tell you.

Updated 3 min readMarkdown
Reproducible ASH checks

A useful report should tell you about the code and about the conditions under which it was checked.

A security check depends on more than the source being checked. It also depends on the tools that were available, the versions they ran, and the data they used. Those inputs belong in the engineering design, even when they are not the first thing a report reader sees.

My Nix-mode contribution to ASH supplies a hash-pinned scanner environment. It gives adopters another way to run the toolchain without first building a container image, while keeping the scan itself in ASH's existing execution model. The goal is a more explainable run, not a blanket promise that every input has stopped changing.

Make the environment an explicit input.

The implementation describes the scanner environment in a Nix flake and locks its inputs by hash. Entering that environment changes the executable search path, then ASH runs its usual local scan inside it. This avoids introducing a second scan engine just to provide a different installation experience.

I kept the caller's arguments intact apart from the execution-mode change. Reconstructing an invocation from parsed options can quietly omit an argument that somebody depended on. Passing the invocation through preserves the existing contract and keeps the new mode focused on what it actually owns: supplying tools.

Keep two inputs in view.

  1. Scanner executable and version
  2. Rules and changing external data
  3. Coverage alongside findings

Pinning a binary does not pin a vulnerability database that is refreshed separately.

Be precise about the boundary.

A pinned toolchain is useful, but it is not a claim that every scanner has identical inputs forever. A vulnerability database can change independently. A scanner managed by ASH's own Python environment is different from an external executable supplied by the flake. The implementation and its checks distinguish those cases.

That precision helps adoption. If Nix is unavailable, the mode gives an actionable refusal instead of silently choosing a different environment. An operator who asked for a specific execution model should be able to tell whether that model was used.

Reproducibility makes a result easier to discuss.

When a team asks why two runs differ, an explicit environment narrows the conversation. The code, rules, external data, and execution conditions can be examined separately. That is a more useful starting point than treating every difference as an unexplained property of the scanner.

I see reproducibility as a way to reduce the number of hidden decisions in a system. It is valuable because it makes change inspectable. The next person can see what was fixed in place, what remains live, and where to look when the result changes.

What I take from it

Pin the scanner tools, then distinguish changes in code, rules, and live vulnerability information when comparing results.

Code and further reading

Read the illustrated essay on mh0pe.github.io

About the author

  • Principal AI Architect. I help teams govern, ship, and scale AI, security, cloud, and developer systems. Illustrated essays and selected work at https://mh0pe.github.io/

No comments yet. Be the first to comment.