Baseless is a small, auditable distroless base built with Melange packages and assembled by apko. Runtime images contain no package-manager executable and no shell. They run as UID/GID 65532 by default.
| Image | Default tag | Intended workload | Runtime contents |
|---|---|---|---|
ghcr.io/morningstar-sudo/baseless-static |
latest |
Fully static application binaries | filesystem layout, CA bundle, timezone data |
ghcr.io/morningstar-sudo/baseless-glibc |
latest |
Dynamically linked GNU/Linux application binaries | static plus glibc |
ghcr.io/morningstar-sudo/baseless-debug |
latest |
Interactive diagnosis only | glibc plus BusyBox, curl, jq, OpenSSL, procps-ng; runs as root |
Each image is published under its own GHCR package name. CI also publishes a commit-SHA tag for traceability and signs each image digest with Cosign after the scan gates pass.
The APK database is intentionally retained as read-only inventory for SBOM generation and vulnerability scanners. It does not make apk available inside any image. The production static and glibc variants have no shell; only the explicitly non-production debug variant has one.
Baseless has its own security namespace. /etc/os-release keeps ID=baseless,
and security/distro.json registers every released Baseless package, its exact
version, support status, and its upstream provenance. Historical releases stay
registered while supported; CI separately requires every new build to use each
package's current_version. security/osv/ is the authoritative OSV
advisory feed with ecosystem Baseless. CI runs the fail-closed
scripts/baseless_security.py scanner against every generated apko SBOM: an
unknown package, stale version mapping, malformed advisory or affected released
version blocks publication. Baseless does not publish an ID_LIKE fallback:
its APK package format does not make the glibc runtime Alpine-compatible, and
silently applying Alpine advisories to renamed packages would be misleading.
Downstream CI can invoke the same image-level gate after building a local image:
- uses: morningstar-sudo/baseless/scan@v1
with:
image: my-image:scan
report: dist/security/baseless.jsonProduction workflows should pin that action to a release tag or commit SHA. The
gate verifies ID, VERSION_ID, CPE_NAME, the retained APK inventory, exact
registered versions, and every advisory in the Baseless OSV namespace. Trivy and
Grype have no baseless OS family, so trivy image only checks secrets and
cannot match OS-package CVEs. CVEs are matched by the Baseless OSV gate, Grype,
and trivy sbom on a CycloneDX file (scripts/make-trivy-sbom.py) that declares
the upstream-derived packages as Alpine 3.24 packages, until those projects
accept Baseless as a first-class distribution.
Melange is invoked with namespace baseless and the canonical repository URL,
so generated SBOMs identify binary packages as pkg:apk/baseless/... and link
their build recipes back to this repository. These identifiers, the distro CPE,
and the Baseless OSV ecosystem form the public security contract.
Alpine 3.24 is used as a disposable Melange build environment. baseless-ca-certificates, baseless-tzdata, and the debug tools currently repackage files from pinned Alpine packages; runtime images consume only APKs signed by the Baseless key. glibc is compiled from its pinned upstream Git commit.
Only the public key belongs in Git:
keys/baseless.rsa.pub
The private key must be Base64-encoded and stored in the GitHub Environment named keys as:
BASELESS_MELANGE_RSA_KEY_B64
The workflow derives the public key from that secret and compares it byte-for-byte with the committed public key before building packages. This committed key verifies APK package signatures; it is not used for OCI image signatures. OCI manifests are signed separately with keyless Cosign after all scan gates pass.
Each platform manifest also receives a signed SPDX attestation generated by apko. For example:
image=ghcr.io/morningstar-sudo/baseless-glibc:latest
digest="$(crane digest --platform linux/amd64 "${image}")"
cosign verify-attestation \
--type spdxjson \
--certificate-oidc-issuer=https://token.actions.githubusercontent.com \
--certificate-identity=https://github.com/morningstar-sudo/baseless/.github/workflows/build.yml@refs/heads/main \
"${image%@*}@${digest}"CI promotes each scanned image directly into its baseless-static, baseless-glibc, or baseless-debug package, then signs the promoted digest there using legacy Cosign tags. The image and its signature therefore remain in the same GHCR package:
cosign verify \
--certificate-oidc-issuer=https://token.actions.githubusercontent.com \
--certificate-identity=https://github.com/morningstar-sudo/baseless/.github/workflows/build.yml@refs/heads/main \
ghcr.io/morningstar-sudo/baseless-glibc:latestLinux, Docker with BuildKit, bash, curl, openssl, and sha256sum are required. On Windows, run these commands inside WSL Ubuntu.
make tools
./.tools/bin/melange keygen keys/local-test.rsa
MELANGE_SIGNING_KEY="$PWD/keys/local-test.rsa" make packages
APKO_EXTRA_KEYRING="$PWD/keys/local-test.rsa.pub" make static
bash scripts/smoke-test.sh dist/baseless-static-x86_64.tar static
python3 scripts/baseless_security.py image baseless:static-amd64
# Or: make scan-image IMAGE=baseless:static-amd64Private keys under keys/ are ignored by Git; never reuse a local test key for releases.
CI builds and signs the x86_64 APKs, runs a Trivy gate against Dockerfile reconstructions of both production variants, publishes apko candidates to an ephemeral local registry, validates their package inventories against the Baseless OSV namespace, and scans the explicit upstream component inventory with pinned Grype. Only the exact apko-built AMD64 manifests are promoted to GHCR and signed by digest with Cosign using legacy signature tags. glibc is represented by a CycloneDX component and an auditable OpenVEX document tied to the pinned stable-branch commit. Floating tags are updated last, so a failed nightly build leaves the previous clean release in place.