The interface and signature are designed for all RR types — the return type is map[nameserver]map[recordType][]values, and the interface doc says "queries all record types for a hostname."…
The break here means only the first NS name's IPs are resolved. If there are 3 authoritative NS names and the first resolves but returns only 1 IP, the other NS IPs are never discovered. Remove the break to resolve all NS names (or at least collect a reasonable number of IPs).
Sending recursive queries (RecursionDesired = true) to root servers won't work — root servers don't offer recursion. This fallback only works in DNS-intercepting environments. Consider falling back to a known public recursive resolver (1.1.1.1, 8.8.8.8) or the system resolver instead.
glueIPs only collects IPv4 addresses (filters on addr.To4() != nil). IPv6 glue records are silently discarded. Some TLDs have IPv6-only nameservers. Should include both address families.
parentDomain() uses a naive 2-label split (minDomainLabels = 2) instead of the Public Suffix List. This breaks for ccTLD domains like example.co.uk → returns co.uk. instead of example.co.uk.. The README explicitly specifies PSL-based classification. Use golang.org/x/net/publicsuffix here.
ErrNotImplemented is now dead code — no method returns it after this PR. Remove it to avoid confusion.
Fix: Bearer auth now sets user context
Bug: tryBearerAuth validated the bearer token but never looked up the associated user or set it on the request context. Downstream handlers calling…
Straightforward cleanup PR — adds nolint annotations for false-positive gosec findings and fixes struct field alignment. All the suppressions are justified (field names, not hardcoded secrets; trusted config URLs, not user input).
Solid API token auth implementation. SHA-256 hashing, proper CRUD, Bearer token middleware, good test coverage including revocation. Well done.
16 random bytes = 128 bits of entropy. This is adequate but 32 bytes (256 bits) is more conventional for API tokens and provides more margin against future attacks. Low priority.
Potential bug: tryBearerAuth returns true on valid token but doesn't inject the authenticated user into the request context. Downstream handlers call h.auth.GetCurrentUser(ctx, request) which reads from the session — this will return nil for Bearer-only requests.
Nit: entry.Name()[:len(prefix)] == prefix — prefer strings.HasPrefix(entry.Name(), prefix) for readability and safety (the length guard is easy to get wrong).
Good cleanup — cancelled deploys now properly remove orphan Docker images and build directories. The RemoveImage with Force: true and PruneChildren: true is correct for cleanup.
This duplicates the directory cleanup logic from the real cleanupCancelledDeploy. If the real implementation changes (e.g. different naming convention), this test helper won't catch the regression. Consider refactoring so the test exercises the actual code path.