go-pr.yaml's CodeQL job asks for actions: read. A reusable workflow cannot ask
for more than its caller grants, so the whole PR run failed at startup with no
jobs. Grant the missing scope.
Each trivy scan updated the vulnerability database when the database was
stale. Six concurrent rescans then downloaded it at the same time. A
download took about 11 seconds alone and 38 seconds under contention.
Five of six trivy processes crashed with SIGBUS, because they read a
database that another process replaced. The other scans hit their timeout.
Scans now run with --skip-db-update. A refresh loop updates the database
every 6 hours (trivy.db_update_interval). Scans hold a read lock and an
update holds the write lock, so an update never replaces the database
under a running scan. A scan that finds no database downloads it once
before it scans.
The grype refresh loop moves to the dbrefresh package, which both scanners
use.
A scanner binary that its timeout kills cannot remove its own temp files.
A killed trivy left its database download in the temp dir as trivy-<n>
and getter<n>, up to 279 MB for each scan. Concurrent rescans filled the
scanner temp dir, and the disk guard then refused all new scans.
Each scanner run now gets a private dir in the temp dir, and the scanner
binary gets this dir as TMPDIR. The scan removes the dir and its contents
when the scan ends, also after a timeout or an error. Each new scan also
removes abandoned dirs that are older than one hour. These dirs come from
a process that stopped during a scan, or from a removal that failed.
Each govulncheck scan resolves the full dependency tree of the module.
The scanner kept these modules in the shared Go module cache. On the
deployed host that cache grew to 13G, which is nine times the size of
the packages the proxy serves.
The scan now sets GOMODCACHE to a directory inside its temp dir. The
directory is deleted when the scan ends. GOFLAGS adds -modcacherw,
because Go makes the module cache read-only and RemoveAll cannot
delete it otherwise. A failed delete is logged.
Scanners unpack packages in the temp dir. When the volume is full, every
scan fails, and the same full volume can stop the metadata database.
The new security.min_free_bytes setting defers a scan while the temp dir
has less free space than the limit. The deferred scan records an
infrastructure error, so the existing retry path scans it again later.
A failed measurement does not block scans. The default is 0, which
keeps the check off.
Each grype scan checked for a new vulnerability database and downloaded
it. When the database became stale, every concurrent scan started its
own download. Killed scans left their partial downloads behind, and the
data volume filled up in minutes.
Scans now run with GRYPE_DB_AUTO_UPDATE=false. A single background loop
updates the database every security.scanners.grype.db_update_interval
(default 6h). Updates are serialised and outlive a cancelled caller.
Before each update, the scanner removes grype-db-download and getter
dirs that are older than one hour.
The server loaded the API key cache before it created the admin key
from GOHOARDER_BOOTSTRAP_ADMIN_KEY. The new key was therefore refused
until the next restart. Bootstrap now runs before the cache loads.
GetRegistryStats counted Go .mod and .info rows while GetStats and the
package rows left them out. The overview registry table therefore
showed more Go packages than the totals. Both stores now use the
artifact filter.
The confirmation for a full rescan used a fixed guess of 10 seconds per
artifact. Scans now record their wall time in scan_results. The new
GET /api/admin/rescan/estimate returns the artifact count of each scope
and the time at the configured concurrency, from the average of recent
scans. While a rescan runs, the status reports elapsed time and an ETA,
and the panel shows the live rate.
Hourly rows are kept for 7 days, so the previous week came from daily
rollups that ended at a day boundary. Downloads between that boundary and
the start of the recent week counted in neither. The boundary day is now
its rollup minus the hourly rows after the boundary.
GetStats, the package list and the stats snapshots dropped any registry's
names that end in .mod or .info. An npm or PyPI package with such a name
vanished from the counts. The filter now matches IsMetadataEntry.
Rollup tests set the worker clock while the background aggregation loop
read it, so the race detector failed about one run in ten. These stores
now stop the loop, and the tests drive aggregation by hand.
POST /api/admin/rescan queues a background rescan of the cached
artifacts with scope vulnerable or all. It ignores the active window and
the age of the last scan, runs on the server context and uses the rescan
worker concurrency. A second request while a run is active gets 409.
GET /api/admin/rescan/status reports queued, done, failed and running.
The System page gets a Rescan section with progress and a confirmation
for the full rescan.
Trending read the in-memory analytics engine, which restarts empty. The
endpoint now ranks packages by the last 7 days of stored downloads and
reports the previous 7 days for the change. It counts a Go module once
and skips metadata entries. A daily time_bucket index serves the range
read. The Overview panel shows the change and no longer says the data
resets on restart.
The rows layout listed Go .mod and .info files. They are never scanned,
so they showed as pending and made the page total larger than /api/stats.
The group query now applies the same artifact filter as GetStats.
The sort button is 1rem wider than its cell but shifts left only by the cell padding. The last column now pads by the difference, so no table scrolls sideways.
The library sort button bleeds 0.5rem past its cell. The workbench
pack pads cells by 0.4rem, so the last column overflowed the table
and showed a horizontal scrollbar.
The download trend, leaderboards and scanner health sat inside the
stats loading branch. A stats refresh unmounted and remounted them,
so every panel fetched its data twice on each visit.
The fiber adaptor builds the URL, Host, Method and header strings of
the net/http request over the fasthttp request buffer. The next request
on the connection overwrites that buffer. The proxies pass these
strings to background scans, singleflight keys and analytics, which
outlive the request. Each proxy route now receives a copy.
The ranking read in-memory analytics, so it was empty after every restart
while the Downloads chart and the package pages read the database. It now
sums the stored counts per package, counts a Go module once by its zip,
and says which ranking is kept across restarts and which is not.
The details page filtered the grouped package list to find its row. It
now requests /api/packages/{registry}/{name}/{version}, which also
resolves Go modules and PyPI release versions.
The Downloads tab hid the stored count when analytics had no record since
the last restart, and it requested a Go file key per version. It now
always shows the stored count, labels the in-memory totals as counted
since the restart, and asks for a Go module by its path. A failed
request is reported instead of a 404 being swallowed.
Analytics live in memory and restart empty. A package with no record yet
returned 404, which every browser logs as a failed request on the
Downloads tab. The endpoint now returns a null package.
The proxy passed request-buffer names to the analytics engine, which kept
them. The server reuses those buffers, so later requests rewrote the
stored names (for example lodash became lodas, and API paths appeared as
package names). The engine now copies the names it keeps.
Metadata pages (npm packuments, Go list, info and mod files, PyPI pages)
no longer count as downloads, and a Go module is one analytics key by its
module path. The version count now counts distinct versions.
Scanners report one advisory under different ids, such as a GHSA id from
OSV and the CVE id from Trivy. Findings now carry an aliases list.
The merge folds findings that share any id into one finding. A bypass
for any id of a finding now covers it. Stored findings without aliases
still load and match by their own id.
GET /api/packages?layout=rows adds q, registry, verdict, severity, sort, order, page and page_size, and returns total and per-verdict counts. Requests without layout=rows keep the existing response.
Render the hold reason as a sentence, pluralise counts, give the details grid a fixed rhythm, use distinct registry colours, label the plotted series, and show a note for a single day of history.
TriggerPrewarm passed the request context to a background goroutine, so the cycle stopped when the HTTP request returned. The cycle now uses the worker context and Stop waits for it.
Add overview, packages with quick view, package detail tabs, a merged security page, insights, system and restyled bypasses. Old vulnerable and blocked routes redirect to the matching security tab.
A reload or shared link such as /packages?verdict=held returned 404 because the static handler had no fallback. Page loads for paths outside the API and proxy prefixes now receive index.html.
Add a read-only /api/system endpoint with the effective scan policy,
scanner health, rescan, cache and pre-warming settings. It exposes no
credentials or paths.
The package list now carries a verdict (cleared, held, bypassed or
pending) with the reason and the applied bypass. /api/stats adds
bypassed_packages. The vulnerability detail response adds the decision,
a per-scanner severity breakdown and detected_by on each finding.
The manager now exposes the cached health, and the CLI version, of every
registered scanner. A scan decision also names the admin bypass that
applied to the package, so callers can tell a bypassed package from a
cleared one.
The app mounts each handler behind http.StripPrefix. The npm and PyPI
handlers trimmed the registry prefix a second time. A request for
npm-run-all reached upstream as -run-all, and the npm package itself
became an empty path. PyPI trimmed /simple without a segment check.
The Helm chart and the Kubernetes configmap listed only rescan_interval.
They now also set rescan_active_window, rescan_concurrency,
rescan_on_access and scan_wait_timeout. The values match the effective
code defaults, so a deploy behaves as before.
The pre-warm worker was never started, and its fetch discarded the
response body, so nothing reached the cache. startWorkers now calls
Start. The worker hands each package to a Fetcher. ProxyFetcher calls
the npm, Go and PyPI handlers in-process, resolves the latest version,
and downloads the artifact. The cache and the scan queue then treat it
like a client request.
Pre-warming stays off unless prewarming.enabled is set. Stop is safe on
a worker that never started, and a second Start does nothing.