An issue card for secrets with the rest of the application blurred out. There is a code extract with a secret with has been obfuscated with asterisks.
A secrets issue • Open image

tl;dr

My role:
I led design from competitor research and customer interviews through product modelling, prototypes and detailed hand-off, working closely with the team and stakeholders.
Problem:
Customers distrusted Snyk’s existing secrets detection because of false positives and suspected missed findings. Secrets also needed a different remediation model from ordinary code issues.
Solution:
A dedicated secrets experience within the familiar workflows, with a customer-informed issue model and fully redacted secret values.
Outcome:
Across the first 30 customers, 11,589 detected secrets were no longer present on a subsequent scan — this was almost a 300% increase against the previous solution. And just 0.36% of findings were ignored, which shows an incredible increase in accuracy.
The secrets issue model as it appears in Visual Studio Code in the column on the left. The file name is followed by a list of issues which can be expanded to show the individual line numbers, where the issue appears.
The secrets issue model as it appears in Visual Studio Code (Figma mock-up). • Open image

What are secrets?

Imagine leaving copies of your house key around town, each one labelled with your address. Convenient for you — but also convenient for anyone who fancies your Star Wars™ collection.

Software secrets are the digital equivalent: passwords and access keys that let applications into databases, cloud storage and other services. Accidentally leaving them in code can give someone else that same access.

A leaked secret is fixed by “rotating” it: replacing it and invalidating the old one. The equivalent of changing your lock. The bigger hassle is handing out a new key to everyone, who has a legitimate reason for having your house key. In software that means tracking down every piece of code that used the old secret and updating it.

Finding a secret is only the beginning…

Snyk already detected suspected secrets through its code scanner, but customers reported too many false positives and were worried about what it missed.

I arrived at the kick-off with some basic ideas about what a secrets experience could look like. My new, clever colleagues updated me on the technical details and constraints.

And our customers updated me on the pain points they experienced.

Customers needed control over how secrets were scanned, grouped and handled across teams. My job was to work with them and the team to turn those concerns into a product model: what counts as one issue, who needs to act on it, and what happens when someone ignores it?

A screenshot of the existing application with annotations and sections crossed out.
An annotated screenshot from talking to a customer (created for a team meeting). • Open image

New scanner, same workflow

Secrets can appear in configuration files, test files, documentation and other places beyond source code. Customers also wanted different scan schedules, pipeline configurations and remediation deadlines.

So, we separated secrets scanning from code scanning.

We considered building on the planned new architecture, but that would have moved the experience away from the workflows customers already used. Instead, we integrated with the existing application, accepting the legacy constraints to keep the experience familiar.

A list of customer targets (think of them as repositories), with one of them open showing the issues for the various scanners. The last two are the code and the new secrets scanner. The top three all pertain to the open source scanner, which — for legacy reasons — are not collected under one header.
The secrets scanner sitting within the familiar workflows next to the code scanner. • Open image

Defining one issue

If the same password appears ten times, is that ten issues or one?

I initially favoured grouping all occurrences across the codebase into a single issue. It reduced duplication, but customers were worried that ignoring it in the entire codebase — across team ownership — might accidentally ignore real secrets.

So, working with application security teams and developers, we settled on:

One issue = all occurrences of a particular secret within one file.

This kept issues well within team ownership without being too granular to overwhelm them with issues. Customer concerns changed the model, and the model then shaped the interface.

I represented findings as a hierarchy of file > secret issue > locations. Even when a secret appeared dozens of times, every location remained available. A tidy screen should not disguise the amount of work left to do.

A side-to-side comparison of the same 6 issues in the old code scanner and the new secrets scanner. In the old code scanner all the secrets are labelled "Hardcoded Secret" without differentiation. In the new secrets scanner the issues are grouped under more useful headings describing the secret with the occurences below.
The issues model in the old code scanner vs the new secrets scanner (notice the lack of critical severity in the code results). • Open image

Showing context without exposing the secret

Developers needed the context of the surrounding code to understand a finding, but customers were uncomfortable seeing secret values displayed in the interface.

We explored partial masking, but different secret formats made it difficult to define a consistent rule that would always conceal enough.

We chose to redact the whole value while retaining the surrounding code context. This addressed customers’ concerns and avoided exposing sensitive portions of unfamiliar secret formats.

An issue card showing a code preview of five lines of code with the last one containing the secrets string. The actual secret has been redacted with a series of asteisks.
The issue card showing the redacted secrets string (Figma mock-up). • Open image

Outcomes

Across the first 30 customers, the new scanner detected 294,596 secrets across 11,565 repositories. Of these findings, 11,589 (3.93%) were no longer present on a subsequent scan, while 1,072 (0.36%) were ignored.

This was almost a 300% fix rate increase against the previous solution. And the low level of ignored findings shows an incredible increase in accuracy.

It has to be mentioned that "fixed" means that the secret had been removed from the code before the next scan. We cannot confirm whether the secret has actually been rotated or invalidated until we can integrate with customers‘ vaults (which is a later feature).

These results reflect the combined scanner and product experience. My contribution was to make findings understandable and actionable through a customer-informed issue model, familiar workflows and clear presentation.

The most consequential design decision happened before the screens: agreeing what a secrets issue actually was.

Further reading

Some mock-ups and screenshots from the project

Showing a GitHub PR check with comments from Snyk‘s bot, showing that the secrets scanner has found an issue. This is detailed further down, with an extract of the code containing the secret (the secret itself is redacted with asterisks) and remediation advice.
Secrets in the GitHub PR check • Open image
A secrets scan in the CLI (Command Line Interface / terminal) showing plain text secrets issue (one issue for each severity as an example) with a summary of the the scan at the end.
Secrets in the CLI (terminal) scan. • Open image