Skip to content

More docs for sumdb - #46

Merged
mhutchinson merged 2 commits into
transparency-dev:mainfrom
mhutchinson:moredocs
Sep 25, 2025
Merged

More docs for sumdb#46
mhutchinson merged 2 commits into
transparency-dev:mainfrom
mhutchinson:moredocs

Conversation

@mhutchinson

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread vindex/cmd/sumdb/README.md Outdated
[Tessera]: https://github.com/transparency-dev/tessera
### Background

The sum.golang.org service, often referred to as Go Checksum DB or SumDB, serves as an auditable checksum database for Go modules. Its primary purpose is to enhance the security and integrity of the Go module ecosystem by providing a public, tamper-proof record of module checksums. This ensures that when developers fetch a module, they receive the exact version of the code that others are using and that hasn't been maliciously altered.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The sum.golang.org service, often referred to as Go Checksum DB or SumDB, serves as an auditable checksum database for Go modules. Its primary purpose is to enhance the security and integrity of the Go module ecosystem by providing a public, tamper-proof record of module checksums. This ensures that when developers fetch a module, they receive the exact version of the code that others are using and that hasn't been maliciously altered.
The sum.golang.org service, often referred to as Go Checksum DB or SumDB, serves as an auditable checksum database for Go modules. Its primary purpose is to enhance the security and integrity of the Go module ecosystem by providing a public, tamper-proof record of module checksums. This ensures that when developers fetch a module, they receive the exact version of the code that others are using and that hasn't been maliciously altered in transit.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this one - it could have also been altered at rest?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was more of an example, I should've been clearer - currently it kinda reads like "everyone gets something which isn't malicious", but could be made clearer by either trimming to be "... the exact version of the code that others are using." or it needs some sort of clarifying qualification (which is what I mean by "more of an example").

Comment thread vindex/cmd/sumdb/README.md Outdated
Comment thread vindex/cmd/sumdb/README.md Outdated
Comment on lines +14 to +28
In addition to sum.golang.org, there is also an index at index.golang.org. This index provides a convenient way to discover available Go modules and their versions. However, it's important to note that index.golang.org is not verifiable in the same way as sum.golang.org. While it helps with discovery, it does not offer the same cryptographic guarantees of integrity and immutability as the checksum database. The security and verification of module content rely solely on the auditable records within sum.golang.org.

The entries in the SumDB log match what is written in a `go.sum` file.
For example, any project depending on the v1.0 release of Tessera will have the following in its `go.sum` file:

```
github.com/transparency-dev/tessera v1.0.0 h1:4OT1V9xJLa5NnYlFWWlCdZkCm18/o12rdd+bCTje7XE=
github.com/transparency-dev/tessera v1.0.0/go.mod h1:TLvfjlkbmsmKVEJUtzO2eb9Q2IBnK3EJ0dI4G0oxEOU=
```

This is the same content written to the SumDB at index 43930254 ([query link](https://sum.golang.org/lookup/github.com/transparency-dev/tessera@v1.0.0)).

The index is built from this log of modules by parsing the module name from every leaf. A pointer to the leaf is added to the index if it represents a [non-pseudo](https://pkg.go.dev/golang.org/x/mod@v0.28.0/module#IsPseudoVersion) version.
The index can be [queried](#querying) using the client.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flow of this section could be improved. Currently it jumps around a lot - I think the para about index.golang.org is the culprit, could this be moved down to replace/incorporate the "The index is built from this log ..." bit?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworked, PTAL?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better, ta!

Comment thread vindex/cmd/sumdb/README.md Outdated
Comment thread vindex/cmd/sumdb/README.md Outdated
```

Use left/right cursor to browse, and `q` to quit.
Note that this matches the list of entries on the unverifiable proxy endpoint: https://proxy.golang.org/github.com/transparency-dev/tessera/@v/list.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would probably be good to introduce the proxy service in the background bit too?

@mhutchinson mhutchinson left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ta! PTAL?

Comment thread vindex/cmd/sumdb/README.md Outdated
[Tessera]: https://github.com/transparency-dev/tessera
### Background

The sum.golang.org service, often referred to as Go Checksum DB or SumDB, serves as an auditable checksum database for Go modules. Its primary purpose is to enhance the security and integrity of the Go module ecosystem by providing a public, tamper-proof record of module checksums. This ensures that when developers fetch a module, they receive the exact version of the code that others are using and that hasn't been maliciously altered.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this one - it could have also been altered at rest?

Comment thread vindex/cmd/sumdb/README.md Outdated
Comment thread vindex/cmd/sumdb/README.md Outdated
Comment on lines +14 to +28
In addition to sum.golang.org, there is also an index at index.golang.org. This index provides a convenient way to discover available Go modules and their versions. However, it's important to note that index.golang.org is not verifiable in the same way as sum.golang.org. While it helps with discovery, it does not offer the same cryptographic guarantees of integrity and immutability as the checksum database. The security and verification of module content rely solely on the auditable records within sum.golang.org.

The entries in the SumDB log match what is written in a `go.sum` file.
For example, any project depending on the v1.0 release of Tessera will have the following in its `go.sum` file:

```
github.com/transparency-dev/tessera v1.0.0 h1:4OT1V9xJLa5NnYlFWWlCdZkCm18/o12rdd+bCTje7XE=
github.com/transparency-dev/tessera v1.0.0/go.mod h1:TLvfjlkbmsmKVEJUtzO2eb9Q2IBnK3EJ0dI4G0oxEOU=
```

This is the same content written to the SumDB at index 43930254 ([query link](https://sum.golang.org/lookup/github.com/transparency-dev/tessera@v1.0.0)).

The index is built from this log of modules by parsing the module name from every leaf. A pointer to the leaf is added to the index if it represents a [non-pseudo](https://pkg.go.dev/golang.org/x/mod@v0.28.0/module#IsPseudoVersion) version.
The index can be [queried](#querying) using the client.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworked, PTAL?

Comment thread vindex/cmd/sumdb/README.md Outdated
Comment thread vindex/cmd/sumdb/README.md Outdated
@mhutchinson

Copy link
Copy Markdown
Contributor Author

I've got a better tool for SumDB module authors in a branch that builds on this one: https://github.com/transparency-dev/incubator/compare/main...mhutchinson:incubator:sumdb-fulltool?expand=1

I'll turn that into a PR when this is merged.

@mhutchinson
mhutchinson merged commit 0882f40 into transparency-dev:main Sep 25, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants