mirror of
https://github.com/lunchcat/sif.git
synced 2026-07-03 19:34:53 -07:00
e2f59637ec
modules/recon/docker-registry-api-exposure.yaml flags a Docker registry reachable anonymously through its /v2/ base, keyed on a 200 paired with the Docker-Distribution-Api-Version: registry/2.0 response header (the header rides on a 401 too, so the 200 gate is what proves anonymous reach), then extracts the api version. modules/recon/harbor-api-exposure.yaml flags an exposed Harbor registry through its unauthenticated /api/v2.0/systeminfo endpoint, keyed on the harbor_version and auth_mode fields, then extracts the harbor version. internal/modules/registry_exposure_test.go drives both modules through ExecuteHTTPModule and asserts the leak alongside the near misses: docker registry on a header-less 200 and on a 401 that still carries the header, harbor with one keying field missing, a plain 200 and a 404. verify: go test ./internal/modules, each matcher and extractor proven to bite (break -> red, restore -> green).