Repository navigation
Description
The sync workflow runs wget --mirror ... on top of a fresh actions/checkout. --mirror turns on -N (timestamping), so wget decides whether to download a file by comparing the server's Last-Modified and Content-Length against the local file's mtime and size. But git does not store mtimes: after checkout every file under secdb/ has an mtime of "right now", which is newer than anything the server reports. The timestamp half of the check therefore always says "local is newer", and the only thing left deciding whether a file is re-downloaded is whether its byte size changed.
Any upstream change that keeps the size the same is silently skipped and never committed.
What it looks like today
secdb/last-update is an 11-byte unix timestamp, so its size never changes. The mirror has 1787205862 (2026-08-20 06:04:22 UTC) while https://secdb.alpinelinux.org/last-update serves 1790792973 (2026-09-30 18:29:33 UTC). The file has not changed in this repo for six weeks across roughly 160 successful sync runs, and every run's log shows wget looking at it and skipping it:
--2026-09-30 18:01:10-- https://secdb.alpinelinux.org/last-update
HTTP request sent, awaiting response... 200 OK
Server ignored If-Modified-Since header for file ‘secdb/last-update’.
You might want to add --no-if-modified-since option.
(run 36755448982; the same message appears for every file whose size did not change, 92 of 96 in that run, and only the 4 edge files whose size had changed were saved.)
That message comes from wget's fallback in http.c for servers that answer 200 to a conditional request: if Last-Modified <= local mtime and Content-Length == local size, the download is skipped. secdb.alpinelinux.org returns 200 for any If-Modified-Since value, so every file goes through that fallback on every run.
The history of secdb/last-update in this repo confirms it. The file changed in only 53 of the 463 sync commits, and in all 53 the timestamp upstream wrote is between 37 and 75 seconds before the commit time. In other words it was only ever picked up when upstream happened to regenerate it in the few seconds between the checkout step and wget requesting it, the one case where Last-Modified is newer than the checkout mtime. Run 32338058613 shows this directly: checkout at 06:04:20, upstream wrote last-update at 06:04:22, wget fetched and saved it at 06:04:24. Nothing has hit that window since 2026-08-20.
Why it matters beyond last-update
The same rule applies to the vulnerability data. Any edit to a main.json / community.json that does not change the byte count (a corrected CVE id, -r0 becoming -r1, one entry swapped for another of the same length) is not mirrored until some later edit happens to change the size. For the older branches that rarely change, that can be never. And even if the server honored If-Modified-Since properly, a checkout mtime of "now" would make it answer 304 for everything, so the root problem is -N on top of a git checkout rather than the server.
Reproduce
git clone --depth 1 https://github.com/aboutcode-org/aboutcode-mirror-alpine-secdb.git
cd aboutcode-mirror-alpine-secdb
cat secdb/last-update # 1787205862
wget --mirror --no-parent --reject "index.html*" --no-host-directories -P secdb https://secdb.alpinelinux.org/
cat secdb/last-update # still 1787205862
curl -s https://secdb.alpinelinux.org/last-update # 1790792973
git status # clean
To see it on a data file: change one character of secdb/v3.21/main.json without changing its length, run the same wget command, and the local edit survives; wget prints the "Server ignored If-Modified-Since" line and moves on.
Possible fix
Drop timestamping so every file is fetched on each run:
wget -r -l inf --no-parent --reject "index.html*" --no-host-directories -P secdb https://secdb.alpinelinux.org/
Without -N, recursive wget overwrites the existing files (checked with wget 1.25: the stale last-update is replaced), and the whole tree is about 5 MB so the cost is negligible. --no-if-modified-since would not help; the HEAD-based path does the same size/mtime comparison. Alternatively delete secdb/ before the wget, which would also let the mirror drop files that are removed upstream, something --mirror never does.
Happy to open a PR for whichever approach you prefer.
Activity
amanbn8 commentedon Sep 30, 2026
One more note on impact: VulnerableCode's
alpine_linuximporter (vulnerabilities/pipelines/v2_importers/alpine_linux_importer.py) clones this repository directly throughfetch_via_vcsrather than reading secdb.alpinelinux.org, so any upstream change that gets skipped here never reaches VulnerableCode's Alpine advisories either.Fetch every secdb file on each sync #3