To check OS packages, a vulnerability scanner reads the package database, identifies the distribution, and matches package versions against that distribution's security advisories. But what if a scanner doesn’t support a given OS? Guessing the distribution may lead to false positives. Skipping the OS packages may miss vulnerabilities entirely.
Here's what upstream Trivy reported on November 16, 2026, for a hardened Liberica Runtime Container based on Alpaquita Linux.
trivy image bellsoft/hardened-liberica-runtime-container:jre-25-nonroot-musl
2026-11-16T17:20:26+03:00 WARN [report] Supported files for scanner(s) not found. scanners=[vuln]
2026-11-16T17:20:26+03:00 INFO [report] No issues detected with scanner(s). scanners=[secret]
Report Summary
┌────────┬──────┬─────────────────┬─────────┐
│ Target │ Type │ Vulnerabilities │ Secrets │
├────────┼──────┼─────────────────┼─────────┤
│ - │ - │ - │ - │
└────────┴──────┴─────────────────┴─────────┘
Legend:
- '-': Not scanned
- '0': Clean (no security findings detected)
The dashes mean the vulnerability scan had no supported target to report. In this run, upstream Trivy did not recognize the image's distribution and skipped OS package scanning.
This guide shows how to scan Alpaquita Linux and BellSoft Hardened Images with upstream OSV-Scanner and with the BellSoft-patched builds of Trivy and Grype. We'll use the same hardened runtime and a Spring Boot application built on it as an example.
Why your vulnerability scanner needs to know your OS
To check OS packages, a vulnerability scanner
- Identifies the distribution,
- Reads the package database,
- Matches package versions against that distribution's security advisories, and
- Determines which versions are affected and which contain a fix.
BellSoft publishes its OS advisories in the Open Source Vulnerability (OSV) format, with affected package versions and fixes for Alpaquita Linux and BellSoft Hardened Images. But as Alpaquita uses apk and has a musl variant, a scanner might mistake it for Alpine and consequently, look up the wrong advisories — the ones for Alpine.
What’s the problem with that if the packages are the same?
BellSoft frequently patches CVEs in Alpaquita and releases the patches earlier than Alpine does. For example, CVE-2026-12080 brings a flaw to the QEMU Guest Agent. As of November 16, 2026, Alpaquita 25 LTS ships the fix in qemu 10.0.15-r0, while Alpine's security tracker lists the CVE with no fixed package. Matching the Alpaquita package against Alpine's data could flag a vulnerability that was already fixed and block a release. See the BellSoft advisory and Alpine security tracker.
Another possible issue is the blind spot we saw in the introduction. The scanner doesn't recognize the OS and skips the OS packages entirely, but still reports vulnerabilities in the application dependencies it recognizes.
Either way, the report is wrong. As a result, you are left with inconsistencies you are not supposed to have. But we want you to have convenience and transparency: a scanner that sees what's in the image and knows what's already patched.
The upstream version of OSV-scanner supports Alpaquita and BellSoft’s vulnerability data. As for Trivy and Grype, we are working on adding Alpaquita support to their upstream versions (for Grype, you can follow the open pull requests in anchore/vunnel and anchore/grype). It's a work in progress, so meanwhile, we offer a temporary workaround.
Prepare the demo images
The examples below need a running Docker daemon and a Docker CLI. The scanners pull images on demand, but you can do a pull manually as well.
Find Your Perfect Image on BellSoft Image Hub
Pull the hardened Liberica Runtime Container to scan the base image on its own.
docker pull bellsoft/hardened-liberica-runtime-container:jre-25-nonroot-musl
For the application scan, you can clone MedFlow, a Spring Boot demo. With Docker Compose installed, run the following commands:
git clone https://github.com/code-with-bellsoft/medflow.git
cd medflow
export MEDFLOW_DB_PASSWORD=medflow-demo-password
SUFFIX=-simple docker compose up
The SUFFIX selects Dockerfile-simple, which uses the hardened JRE above. The demo password is for a fresh local Compose setup.
Once Compose has built medflow:latest, you can stop the services with Ctrl+C. The image remains available to scan.
Scan with OSV-Scanner
Install the upstream OSV-Scanner binary for your platform, or run this command with administrative privileges on Alpaquita. See the OSV-Scanner releases and the BellSoft installation guide.
apk add osv-scanner
Scan the hardened runtime by tag, then scan the locally built MedFlow image in the same way.
osv-scanner scan image bellsoft/hardened-liberica-runtime-container:jre-25-nonroot-musl
Saving docker image ("bellsoft/hardened-liberica-runtime-container:jre-25-nonroot-musl") to temporary file...
Scanning image "bellsoft/hardened-liberica-runtime-container:jre-25-nonroot-musl"
Starting filesystem walk for root:
End status: 133 dirs visited, 760 inodes visited, 114 Extract calls, 1.800208ms elapsed, 1.8ms wall time
Skipping java-common: short commit hash "-dirty" cannot be queried; OSV API requires a full 40-character SHA.
Filtered 1 local/unscannable package/s from the scan.
No issues found
osv-scanner scan image medflow:latest
Saving docker image ("medflow:latest") to temporary file...
Scanning image "medflow:latest"
Starting filesystem walk for root:
End status: 134 dirs visited, 762 inodes visited, 115 Extract calls, 65.5055ms elapsed, 65.503ms wall time
Starting filesystem walk for root:
End status: 0 dirs visited, 1 inodes visited, 1 Extract calls, 103.291µs elapsed, 103µs wall time
Starting filesystem walk for root:
End status: 0 dirs visited, 1 inodes visited, 1 Extract calls, 61.9615ms elapsed, 61.959ms wall time
Starting filesystem walk for root:
End status: 0 dirs visited, 1 inodes visited, 1 Extract calls, 123.042µs elapsed, 123µs wall time
Skipping java-common: short commit hash "-dirty" cannot be queried; OSV API requires a full 40-character SHA.
Filtered 1 local/unscannable package/s from the scan.
Total 2 packages affected by 7 known vulnerabilities (0 Critical, 5 High, 2 Medium, 0 Low, 0 Unknown) from 1 ecosystem.
7 vulnerabilities can be fixed.
╭─────────────────────────────────────┬──────┬───────────┬─────────────────────────────────────┬─────────┬─ ≈
│ OSV URL │ CVSS │ ECOSYSTEM │ PACKAGE │ VERSION │ ≈
├─────────────────────────────────────┼──────┼───────────┼─────────────────────────────────────┼─────────┼─ ≈
│ https://osv.dev/GHSA-7hhh-6rmp-j9qf │ 7.5 │ Maven │ tools.jackson.core:jackson-core │ 3.1.5 │ ≈
│ https://osv.dev/GHSA-p6pp-m3f8-5c89 │ 7.5 │ Maven │ tools.jackson.core:jackson-core │ 3.1.5 │ ≈
│ https://osv.dev/GHSA-cxp5-3px4-pw24 │ 7.5 │ Maven │ tools.jackson.core:jackson-databind │ 3.1.5 │ ≈
│ https://osv.dev/GHSA-gx83-3vf8-gh7j │ 5.6 │ Maven │ tools.jackson.core:jackson-databind │ 3.1.5 │ ≈
│ https://osv.dev/GHSA-q4xh-88c3-wmh7 │ 7.5 │ Maven │ tools.jackson.core:jackson-databind │ 3.1.5 │ ≈
│ https://osv.dev/GHSA-wjgm-6hv5-3cvf │ 5.3 │ Maven │ tools.jackson.core:jackson-databind │ 3.1.5 │ ≈
│ https://osv.dev/GHSA-wv8q-qhhj-9h54 │ 7.5 │ Maven │ tools.jackson.core:jackson-databind │ 3.1.5 │ ≈
╰─────────────────────────────────────┴──────┴───────────┴─────────────────────────────────────┴─────────┴─ ≈
For a scan by tag, OSV-Scanner needs the docker executable on its PATH and access to the daemon holding the image. It uses docker save to read the image without starting a container.
If the machine running the scanner has no Docker installation, save the image on the build machine and copy the tar archive over. Scanning the archive still uses OSV.dev in the default online mode.
docker save -o medflow-image.tar medflow:latest
osv-scanner scan image --archive ./medflow-image.tar
The console report identifies the OS and groups findings by package. To check which packages were scanned, you can include the full package inventory in a JSON report.
osv-scanner scan image --all-packages -f json --output medflow-osv.json medflow:latest
Check image_metadata.os for the detected OS. In results, an entry with source.type set to os lists packages detected from the image's APK package database, such as var/lib/apk/db/installed. Each package entry includes its installed version and any matched advisory records under vulnerabilities. Language dependencies appear under their own sources.
With jq installed, these commands show the detected OS and the OS package inventory with any advisory IDs.
jq '.image_metadata.os' medflow-osv.json
jq '.results[] | select(.source.type == "os") | .packages[] |
{name: .package.name, version: .package.version,
advisories: [.vulnerabilities[]?.id]}' medflow-osv.json
An OS inventory with no advisory matches shows that the scan found OS packages and reported no known vulnerabilities for them.
Use the patched Trivy and Grype packages
BellSoft provides patched trivy and grype packages in Alpaquita's universe repository. The patched builds recognize Alpaquita and BellSoft Hardened Images and read vulnerability data sourced from BellSoft's OSV archives. For other distributions, these scanners continue using their respective vulnerability databases. The package recipes are public if you want to see exactly what we changed.
You may notice that the package version doesn't match the latest upstream release of Trivy or Grype. That's because we took an earlier release and patched it to support Alpaquita. No need to worry that the package will grow stale, though: we update it just like any other package in the repository.
Scan with Trivy
Take a base image with Alpaquita and install your preferred Trivy package with apk add. Here's the Dockerfile. Save it as Dockerfile in a separate scanner build directory, then run the build from that directory.
FROM bellsoft/alpaquita-linux-base:stream-musl
RUN apk add trivy
docker build -t alpaquita-trivy .
For comparison, here's the recorded MedFlow scan with upstream Trivy installed on the host.
trivy image medflow:latest
Report Summary
┌─────────────────────────────┬──────┬─────────────────┬─────────┐
│ Target │ Type │ Vulnerabilities │ Secrets │
├─────────────────────────────┼──────┼─────────────────┼─────────┤
│ application/application.jar │ jar │ 11 │ - │
└──────── ─────────────────────┴──────┴─────────────────┴─────────┘
Legend:
- '-': Not scanned
- '0': Clean (no security findings detected)
Trivy found the jar and its dependencies, but there's no row for the OS packages at all.
Now, let's scan the same image with Trivy from the Alpaquita repository, using the scanner image we built earlier. The container needs the Docker socket to reach your local images, and a named volume for the cache so that Trivy doesn't download its databases on every run:
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
-v trivy-cache:/root/.cache/trivy \
alpaquita-trivy:latest \
trivy image --timeout 30m medflow:latest
Report Summary
┌──────────────────────────────────────────────────────┬──────────────────────────────┬─────────────────┬─────────┐
│ Target │ Type │ Vulnerabilities │ Secrets │
├──────────────────────────────────────────────────────┼──────────────────────────────┼─────────────────┼─────────┤
│ medflow:latest (bellsoft-hardened-containers stream) │ bellsoft-hardened-containers │ 0 │ - │
├──────────────────────────────────────────────────────┼──────────────────────────────┼─────────────────┼─────────┤
│ application/application.jar │ jar │ 11 │ - │
└──────────────────────────────────────────────────────┴──────────────────────────────┴─────────────────┴─────────┘
Legend:
- '-': Not scanned
- '0': Clean (no security findings detected)
There it is: a new row for the OS layer, identified as bellsoft-hardened-containers stream, with zero vulnerabilities. The jar's 11 findings haven't gone anywhere, because they belong to the application's dependencies, not the OS.
The base image alone:
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
-v trivy-cache:/root/.cache/trivy \
alpaquita-trivy:latest \
trivy image --timeout 30m bellsoft/hardened-liberica-runtime-container:jre-25-nonroot-musl
Report Summary
┌──────────────────────────────────────────────────────────────────┬──────────────────────────────┬─────────────────┬─────────┐
│ Target │ Type │ Vulnerabilities │ Secrets │
├──────────────────────────────────────────────────────────────────┼──────────────────────────────┼─────────────────┼─────────┤
│ bellsoft/hardened-liberica-runtime-container:jre-25-nonroot-musl │ bellsoft-hardened-containers │ 0 │ - │
│ (bellsoft-hardened-containers stream) │ │ │ │
└───────────────────────────── ─────────────────────────────────────┴──────────────────────────────┴─────────────────┴─────────┘
Legend:
- '-': Not scanned
- '0': Clean (no security findings detected)
Same image as in the opening. This time, Trivy recognized the OS, checked its packages, and found zero known vulnerabilities.
Scan with Grype
Create Dockerfile-grype with the following contents and build it in the scanner build directory.
FROM bellsoft/alpaquita-linux-base:stream-musl
RUN apk add grype
docker build -f Dockerfile-grype -t alpaquita-grype .
To scan the local MedFlow image, mount the Docker socket and use Grype's --from docker option to select the daemon explicitly. The optional named volume persists Grype's vulnerability database at the path set by GRYPE_DB_CACHE_DIR. See the Grype scan targets and configuration reference.
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
-v grype-cache:/var/cache/grype \
-e GRYPE_DB_CACHE_DIR=/var/cache/grype \
alpaquita-grype:latest \
grype --from docker medflow:latest
You can scan the public hardened runtime directly from its registry. With --from registry, Grype fetches the target itself, so this command needs no Docker socket mount.
docker run --rm \
-v grype-cache:/var/cache/grype \
-e GRYPE_DB_CACHE_DIR=/var/cache/grype \
alpaquita-grype:latest \
grype --from registry \
bellsoft/hardened-liberica-runtime-container:jre-25-nonroot-musl
In the MedFlow table, use TYPE to distinguish OS package findings (apk) from Java dependency findings. In JSON, check the top-level distro for the detected distribution. Each entry in matches identifies the affected package in artifact, the advisory in vulnerability, and the matching criteria in matchDetails. Check the advisory namespace and the distro used for OS matches. Grype's table lists findings, so an absent apk row alone can't tell you whether the scanner checked the OS packages. See Grype's package ecosystem guide and JSON report guide.
Gating the pipeline in GitHub Actions
Of course, you can do that in your pipeline as well! Let's set up scanning in CI/CD with GitHub Actions. The MedFlow repo contains the dockerfiles/Dockerfile-scanners file:
FROM bellsoft/alpaquita-linux-base:stream-musl
RUN apk add --no-cache trivy grype
The workflow can build the scanner image itself.
The following pipeline:
- Builds the Alpaquita image with Trivy and Grype.
- Pulls the hardened JRE base image.
- Scans the hardened JRE for vulnerabilities first with Trivy, then with Grype.
- Builds the MedFlow application image.
- Runs a placeholder security-process step. This is just for demo purposes; your pipeline runs further as required.
name: MedFlow - Base Image Security Gate
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
container-security:
runs-on: ubuntu-latest
env:
RUNTIME_BASE: bellsoft/hardened-liberica-runtime-container:jre-25-nonroot-musl
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Alpaquita image with scanners
run: |
docker build \
-f dockerfiles/Dockerfile-scanners \
-t alpaquita-scanners:ci .
- name: Pull hardened JRE base image
run: docker pull "$RUNTIME_BASE"
- name: Scan hardened JRE with Trivy
run: |
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
alpaquita-scanners:ci \
trivy image \
--image-src docker \
--scanners vuln \
--severity CRITICAL \
--exit-code 1 \
--timeout 30m \
"$RUNTIME_BASE"
- name: Scan hardened JRE with Grype
run: |
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
alpaquita-scanners:ci \
grype --from docker --fail-on critical "$RUNTIME_BASE"
- name: Build MedFlow image
run: |
docker build \
-f dockerfiles/Dockerfile \
-t medflow:ci .
- name: Security process placeholder
run: echo "Your cool security process here"
The gate has two flags. --severity CRITICAL narrows the report to critical findings, and --exit-code 1 makes Trivy and Grype fail the step when they find any, which stops the job before the application image gets built. --image-src docker tells Trivy to take the image from the Docker daemon behind the mounted socket instead of pulling it from a registry again.
Copy the workflow, swap RUNTIME_BASE for your own base image, and plug your actual security process into the last step. When upstream Trivy and Grype learn about Alpaquita, replace the scanner image with the official tooling and keep the gate.
Conclusion
When you scan an Alpaquita-based image, confirm that the report identifies the OS and covers its packages. Use upstream OSV-Scanner or the Alpaquita builds of Trivy and Grype for that coverage. Read OS package and application dependency results separately, and treat zero findings as a result for the image and advisory data used in that scan.






