# kodiqa-solutions/vaults3 — AlpLab Radar Static Code Audit

- Ring: `adopt`
- Category: `dev`
- Overall score: `4.2/5`
- Implementation check: `verified`
- Maturity: `active`
- Audited commit: `8cfb633a72f6` (read-only; nothing from the repository was executed)
- Reviewed at: 2026-12-01T20:26:55Z
- Repository: https://github.com/kodiqa-solutions/vaults3
- Radar entry: https://radar.alplab.co/#repo/kodiqa-solutions/vaults3
- License: `AGPL-3.0`
- CI workflows: `.github/workflows`
- Tags: `s3`, `object-storage`, `go`, `self-hosted`, `raft`, `erasure-coding`

## Summary

A single-binary, AGPL-3.0 S3-compatible object storage server in Go with an embedded React dashboard, filesystem-backed storage layered with AES-256-GCM encryption, zstd compression, Reed-Solomon erasure coding and optional Raft clustering, replication, IAM/OIDC/STS access control, and a bbolt metadata index.

## Implementation Check

README claims (80+ S3 ops, dashboard, IAM/OIDC/STS, versioning, per-bucket encryption with crypto-shredding, erasure coding with healer, Raft clustering, active-active replication, notifications, lambda, search, FUSE, CLI) all map to real implementations — e.g. internal/s3/handler.go ServeHTTP routes the full sub-resource matrix, internal/erasure/engine.go + encoder.go implement Reed-Solomon with a streaming path and background healer, internal/cluster/ carries the Raft/shard runtime — and the README's own production-readiness table honestly marks clustering and active-active replication as beta rather than overclaiming.

## When to Use

Use it as a self-hosted, low-footprint S3 replacement for homelab, NAS or team infrastructure — single-node with optional multi-disk erasure coding is the lane the project itself designates as stable. Do not use it when distributed multi-node operation is the primary requirement (self-declared beta), when you need a working Vault KMS provider (refused at startup), or when AGPL-3.0 is incompatible with your distribution model.

## Sub-scores

| Dimension | Score |
|---|---|
| quality | 4.5/5 |
| usability | 4.5/5 |
| reliability | 3.0/5 |
| security | 4.5/5 |
| integration | 4.5/5 |

## Code Evidence

internal/s3/auth.go Authenticate/authenticatePresigned implement full SigV4 (per-segment canonical URI via uriEncodePath, 7-day presign expiry cap, mandatory signed host, unsignedAmzHeader rejecting unsigned x-amz-* headers, hmac.Equal comparisons, per-IP/key signature-failure throttle sigThrottle); internal/storage/filesystem.go containedPath/within quarantine any bucket/key escaping the data dir (backed by pathfuzz_test.go) and writeFileAtomic uses temp-file+fsync+rename with directory fsync; internal/erasure/engine.go putObjectStreaming/putSpilled keep memory at one stripe and seal spill files with a random in-memory AES-CTR key (spillCipher), commitMeta switches versions atomically via meta.json, and internal/erasure/safety_test.go has fault-injection tests (TestFailedOverwriteKeepsPreviousVersion, TestCorruptShardIsDetectedAndHealed); dial-time SSRF guards in internal/netguard/netguard.go (Blocked/Metadata covering loopback, private, CGNAT 100.64/10, NAT64/6to4, cloud metadata) are shared by internal/lambda/ssrfguard.go and internal/migrate/ssrfguard.go with redirects disabled; internal/server/firstrun.go resolveAdminCredentials generates and persists a random first-run secret (no shipped credential) and warnPlaceholderSecret flags the docs example, resolveJWTSigningKey keeps the console JWT key independent of the admin secret (internal/api/jwt.go); internal/server/server.go New composes the engine layers (cold tier -> encryption -> compression -> erasure -> packing -> space guard) and fails closed on an empty cluster.secret; .github/workflows/ci.yml runs `go test -race -coverprofile=coverage.out ./...`, go vet, gofmt and a govulncheck job; .github/workflows/s3-conformance.yml gates a whitelisted ceph/s3-tests run against a live server on every push with a weekly full sweep; internal/selfupdate/selfupdate.go Apply refuses any release without an Ed25519-verified checksums.txt.sig; cmd/vaults3/privdrop.go takeOwnership/systemPath refuses to chown system folders during PUID/PGID drop; tests exist across essentially every internal package (hundreds of _test.go files including cluster consensus/failover/replicarepair and metadata determinism suites).

## Issues Found

.github/workflows/ci.yml runs golangci-lint with continue-on-error: true, documenting 77 open findings including ~50 unchecked error returns (the project notes one such unchecked error previously caused data loss); 34 unpinned GitHub Actions version refs across workflows are a supply-chain exposure; the HashiCorp Vault KMS provider is configured in the shipped sample (configs/vaults3.yaml) but non-functional and refused at startup in internal/config/config.go parse; internal/s3/object.go (~100KB) and internal/metadata/store.go (~117KB) are monolithic files that raise review and regression risk.

## Key Risks

Nothing was executed: test presence was verified statically, not test results. Clustering, sharded metadata and active-active replication are explicitly beta per the README's own maturity table and were not stress-validated statically. Single primary maintainer (top author ~77% of recent commits) despite a CLA and external contributors. RAM/footprint and performance figures in the README are self-measured and unverifiable statically. Update checker is the only outbound call and is opt-in (auto_update.enabled, internal/server/update.go), consistent with the no-telemetry claim. Nothing suspicious was found in the data path, but a storage engine this size warrants operational backup discipline the README itself demands.

## Reviewed Files

- `README.md`
- `go.mod`
- `Makefile`
- `Dockerfile`
- `SECURITY.md`
- `.github/workflows/ci.yml`
- `.github/workflows/release.yml`
- `.github/workflows/s3-conformance.yml`
- `web/package.json`
- `cmd/vaults3/main.go`
- `cmd/vaults3/privdrop.go`
- `internal/api/auth.go`
- `internal/api/jwt.go`
- `internal/config/config.go`
- `internal/erasure/encoder.go`
- `internal/erasure/engine.go`
- `internal/erasure/safety_test.go`
- `internal/lambda/ssrfguard.go`
- `internal/metadata/store.go`
- `internal/migrate/ssrfguard.go`
- `internal/middleware/secure.go`
- `internal/netguard/netguard.go`
- `internal/replication/signer.go`
- `internal/s3/auth.go`
- `internal/s3/handler.go`
- `internal/s3/sandbox.go`
- `internal/selfupdate/selfupdate.go`
- `internal/server/firstrun.go`
- `internal/server/httpserver.go`
- `internal/server/server.go`
- `internal/storage/filesystem.go`
