Found by the security review #73. Severity: medium.
What is wrong
With the s3.* form of configuration (no storage_url), an s3.endpoint written without a scheme, and use_ssl omitted, storerFromLegacyS3Config builds an http:// endpoint (internal/storage/module.go:115-121). S3Config.UseSSL is a plain bool (internal/config/config.go:165) and Load applies no default. config.example.yml:284-286 says Default: true.
An endpoint written with a scheme ignores use_ssl, and the documented examples carry one, so the exposed case is a scheme-less endpoint. The s3:// URL form already defaults to TLS (internal/storage/url.go:78).
Separately, the config init template lists use_ssl under the credentials block for s3:// URLs (internal/cli/config.go:195), where the key is never read: TLS there is turned off only by ?ssl=false in the URL.
Why it matters
Blob contents stay age-encrypted, but over plain HTTP a network observer sees what the store operator sees (manifests, object names, sizes, the access key id) and can alter responses.
Acceptable
For the s3.* form, TLS is the default: plain HTTP only when use_ssl: false is written explicitly or the endpoint starts with http://.
The config init template drops the use_ssl line from the s3:// block or documents ?ssl=false instead.
Found by the security review https://git.eeqj.de/sneak/vaultik/issues/73. Severity: **medium**.
## What is wrong
With the `s3.*` form of configuration (no `storage_url`), an `s3.endpoint` written without a scheme, and `use_ssl` omitted, `storerFromLegacyS3Config` builds an `http://` endpoint (`internal/storage/module.go:115-121`). `S3Config.UseSSL` is a plain bool (`internal/config/config.go:165`) and `Load` applies no default. `config.example.yml:284-286` says `Default: true`.
An endpoint written with a scheme ignores `use_ssl`, and the documented examples carry one, so the exposed case is a scheme-less endpoint. The `s3://` URL form already defaults to TLS (`internal/storage/url.go:78`).
Separately, the `config init` template lists `use_ssl` under the credentials block for `s3://` URLs (`internal/cli/config.go:195`), where the key is never read: TLS there is turned off only by `?ssl=false` in the URL.
## Why it matters
Blob contents stay age-encrypted, but over plain HTTP a network observer sees what the store operator sees (manifests, object names, sizes, the access key id) and can alter responses.
## Acceptable
- For the `s3.*` form, TLS is the default: plain HTTP only when `use_ssl: false` is written explicitly or the endpoint starts with `http://`.
- The `config init` template drops the `use_ssl` line from the `s3://` block or documents `?ssl=false` instead.
- `config.example.yml` matches the code.
## Definition of done
1. Test: `s3.*` form, scheme-less endpoint, `use_ssl` omitted, yields an `https://` endpoint; explicit `use_ssl: false` yields `http://`.
2. No existing assertion weakened; `make check` green.
Line numbers are as of `next` at `6fcd8e1`.
model: fable-5-1
S3Config.UseSSL is now *bool: omitted means the default (TLS), so a scheme-less s3.endpoint resolves to https:// unless use_ssl: false is written explicitly; an endpoint that already carries a scheme is unchanged. This matches the s3:// URL form. config.example.yml becomes accurate without editing it. The config init template no longer lists use_ssl in the s3:// block (never read there) and points at ?ssl=false instead.
Test added: a legacy s3.* config with a scheme-less endpoint resolves to https when use_ssl is omitted and http when it is false. make check green.
Model: opus-4-8
Fixed in https://git.eeqj.de/sneak/vaultik/pulls/178.
`S3Config.UseSSL` is now `*bool`: omitted means the default (TLS), so a scheme-less `s3.endpoint` resolves to `https://` unless `use_ssl: false` is written explicitly; an endpoint that already carries a scheme is unchanged. This matches the `s3://` URL form. `config.example.yml` becomes accurate without editing it. The `config init` template no longer lists `use_ssl` in the `s3://` block (never read there) and points at `?ssl=false` instead.
Test added: a legacy `s3.*` config with a scheme-less endpoint resolves to `https` when `use_ssl` is omitted and `http` when it is `false`. `make check` green.
Model: opus-4-8
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found by the security review #73. Severity: medium.
What is wrong
With the
s3.*form of configuration (nostorage_url), ans3.endpointwritten without a scheme, anduse_sslomitted,storerFromLegacyS3Configbuilds anhttp://endpoint (internal/storage/module.go:115-121).S3Config.UseSSLis a plain bool (internal/config/config.go:165) andLoadapplies no default.config.example.yml:284-286saysDefault: true.An endpoint written with a scheme ignores
use_ssl, and the documented examples carry one, so the exposed case is a scheme-less endpoint. Thes3://URL form already defaults to TLS (internal/storage/url.go:78).Separately, the
config inittemplate listsuse_sslunder the credentials block fors3://URLs (internal/cli/config.go:195), where the key is never read: TLS there is turned off only by?ssl=falsein the URL.Why it matters
Blob contents stay age-encrypted, but over plain HTTP a network observer sees what the store operator sees (manifests, object names, sizes, the access key id) and can alter responses.
Acceptable
s3.*form, TLS is the default: plain HTTP only whenuse_ssl: falseis written explicitly or the endpoint starts withhttp://.config inittemplate drops theuse_sslline from thes3://block or documents?ssl=falseinstead.config.example.ymlmatches the code.Definition of done
s3.*form, scheme-less endpoint,use_sslomitted, yields anhttps://endpoint; explicituse_ssl: falseyieldshttp://.make checkgreen.Line numbers are as of
nextat6fcd8e1.model: fable-5-1
Fixed in #178.
S3Config.UseSSLis now*bool: omitted means the default (TLS), so a scheme-lesss3.endpointresolves tohttps://unlessuse_ssl: falseis written explicitly; an endpoint that already carries a scheme is unchanged. This matches thes3://URL form.config.example.ymlbecomes accurate without editing it. Theconfig inittemplate no longer listsuse_sslin thes3://block (never read there) and points at?ssl=falseinstead.Test added: a legacy
s3.*config with a scheme-less endpoint resolves tohttpswhenuse_sslis omitted andhttpwhen it isfalse.make checkgreen.Model: opus-4-8