> For the complete documentation index, see [llms.txt](https://docs.sealsecurity.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sealsecurity.io/trust/code-diff.md).

# Code diff

The code diff is the source code changes Seal made on top of an origin package version to produce a sealed iteration. It is exactly what changed, line by line, in the package's source.

Use the code diff to:

* See what a sealed iteration actually does on top of the origin version.
* Hand to a reviewer or auditor who wants source-level evidence of the change.
* Feed alongside the [patch validation prompt](/trust/patch-validation-prompt.md) into an LLM for an independent check.

## What the diff covers

The diff is rendered **per vulnerability** rather than all changes at once, to keep the review focused. For each vulnerability the sealed iteration addresses, the diff shows the source files modified and the line-level additions, removals, and modifications that closed that vulnerability.

When a sealed iteration addresses more than one vulnerability, switch between vulnerabilities in the tab to see each set of changes on its own.

## Where to view it

The code diff lives in two places, with the same content.

### On the Protection page

The Protection page's row drawer carries a Package Diff tab.

1. Open the [Protection page](/discovering/protection-page.md), Vulnerable packages tab or Sealed packages tab.
2. Click the row for the package whose diff you want to view. The drawer opens.
3. In the drawer, switch to the **Package Diff** tab.
4. Use the version selectors at the top of the tab to pick the two versions to compare. By default, the drawer compares the version on the row against the safest sealed iteration available.
5. Use the vulnerability selector to pick which vulnerability's changes to see.

<figure><img src="/files/cjs0I4zfeOElZsGgZ9vz" alt="Protection page row drawer with the Package Diff tab selected showing a code diff"><figcaption><p>The Package Diff tab inside the Protection page row drawer.</p></figcaption></figure>

### On the Repository page

The [Repository page](/discovering/repository-page.md) is Seal's reference catalog of sealed packages. The same code diff is reachable from a sealed package version's detail on the Repository page, with one important difference: it does not require a logged-in Seal Platform user. Outsiders without a Seal account can open the Repository page directly and view the diff for a sealed iteration.

This is the path to use when:

* The person reviewing the diff does not have a Seal account.
* You want a stable, shareable URL for the diff.
* You want to inspect a sealed iteration for a package you have not yet discovered in any Seal Project.

Open the Repository page, find the package, pick the sealed iteration, and open the diff view.

## Related

* [What a sealed package is](/introduction/seal-approach/sealed-packages.md): the concept the diff makes concrete.
* [Patch validation prompt](/trust/patch-validation-prompt.md): the customer-driven check that uses the diff.
* [Attestations](/trust/attestations.md): the signed records.
