| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitlab-ci.yml | ||
| README.md | ||
gitlab_base_images
Mirrors GitLab's security analyzer container images from registry.gitlab.com
into our own registry, so Takelan projects can run SAST / Dependency Scanning /
Container Scanning / Secret Detection against images we control:
registry.gitlab.com/security-products/<image>:<tag>
-> dkrhub.takelan.com/gitlab/<image>:<tag>
How it works
The sync-analyzer-images job (one per image, via parallel:matrix) copies
image manifests registry-to-registry with docker buildx imagetools — no
layers are downloaded or re-uploaded. For every image it mirrors:
| tag | example | why |
|---|---|---|
| exact version | 6.2.1 |
newest released version |
| minor | 6.2 |
|
| major | 6 |
what the GitLab job templates reference |
latest |
rolling pointer |
The newest version is discovered at runtime: from the registry tag list when
SOURCE_REGISTRY_USER/SOURCE_REGISTRY_PASSWORD are set, otherwise from the
analyzer's public CHANGELOG.md top entry (the analyzer release pipeline
enforces top entry == last released version). Images without a usable changelog
fall back to the major tag pinned to the current GitLab templates. Where the
analyzer dev line has moved ahead of what GitLab ships (e.g. spotbugs is on
6.x upstream while the templates pull spotbugs:5), both majors are mirrored.
Re-runs are safe — tags are simply re-pointed at the current upstream content.
Mirrored images (all from the security-products namespace on
registry.gitlab.com):
- SAST:
brakeman,clangsa,flawfinder,gitlab-advanced-sast,gitlab-advanced-sast-ext,kubesec,mobsf,nodejs-scan,pmd-apex,phpcs-security-audit,security-code-scan,semgrep,sobelow,spotbugs - Dependency Scanning:
bundler-audit,gemnasium,gemnasium-maven,gemnasium-python - Container Scanning:
container-scanning - Secret Detection:
secrets,secret-detection
Note:
sast-parseris not a published image — the report parser is bundled inside each analyzer image.
Setup (one time)
- dkrhub: the
gitlabproject already exists ondkrhub.takelan.com, and it currently accepts anonymous pushes — no dedicated registry user is needed. - CI/CD variables (Settings > CI/CD > Variables, masked as appropriate):
- optional:
TARGET_REGISTRY_TOKEN— a dkrhub.takelan.com token (pushes as thegitlab-ciuser); only needed if anonymous pushes stop being allowed - optional but recommended:
SOURCE_REGISTRY_USER/SOURCE_REGISTRY_PASSWORD— a gitlab.com personal access token. With a token the job discovers the newest version from the registry tag list (the most accurate source); without one it uses the analyzer changelogs, which is reliable for all current images
- optional:
- Runner: any docker/shell runner with the
dockerCLI (>= 23, buildx included) that can reach bothregistry.gitlab.comanddkrhub.takelan.com. No DinD required. - Schedule: CI/CD > Schedules > Add schedule, e.g. cron
0 4 1 * *(04:00 on the 1st of each month). The job also runs on demand (Pipeline > Run pipeline) and on pushes to the default branch.
Using the mirrored images
In downstream projects, point the analyzer templates at our registry:
variables:
SECURE_ANALYZERS_PREFIX: "dkrhub.takelan.com/gitlab"
The SAST/DS/CS/SD templates will then pull e.g.
dkrhub.takelan.com/gitlab/semgrep:6 instead of
registry.gitlab.com/security-products/semgrep:6.
Maintaining the image list
Add or remove names in the IMAGE matrix in .gitlab-ci.yml. To force extra
tags on a one-off run, set SYNC_EXTRA_TAGS (space separated) as a job-level
or pipeline variable.