Apptainer / Singularity (SIF)
Scan Apptainer and Singularity images (SIF) from a library service or an OCI registry, or on an HPC host with the Safeguard CLI. Signatures checked, the access each source needs, and step-by-step setup.
Availability
This integration is switched on per workspace. If you do not see the card under Integrations, ask your Safeguard contact. The safeguard sif CLI commands work in every workspace.
What it does
The Apptainer / Singularity (SIF) card scans images in the Singularity Image Format, the single-file images that Apptainer and SingularityCE run. Each image you select becomes a project. Every scan downloads the SIF, records its sha256, checks every signature in it (PGP, and x509 or PEM keys in DSSE envelopes), and builds the SBOM and the vulnerability findings of its root filesystem. Nothing in the image is run, mounted or unpacked: the scanner reads the squashfs root filesystem in place. Find the card under Integrations on the Project/Product tab.
It reads from two kinds of source:
- A library (
library://): a Library API service, such as Singularity Enterprise or another Apptainer-compatible library. The Sylabs Cloud Library (cloud.sylabs.io) closes on 2026-10-22; Apptainer itself has no default library. - An OCI registry holding SIF artifacts (
oras://): images pushed withapptainer push image.sif oras://<registry>/<repository>:<tag>, in any registry that accepts OCI artifacts (GitHub Container Registry, Harbor, zot and others).
Images Apptainer runs from docker:// are ordinary OCI images. Connect their container registry instead (Docker Hub, GitHub Container Registry, Harbor and the others); it scans the same image. For SIF files on an HPC host or a shared file system, run safeguard sif scan there.
Public vs private
| Public | Private | |
|---|---|---|
| What you enter | The library URL or registry host, and the images (a library can also list entities or collections) | The same, plus a token (and the username, for a registry) |
| Credential needed | None: anonymous reads | A library access token, or a registry token or password with its username |
| What you can scan | Images the source lets anyone pull | Images the token's user can pull; with a registry token that can read the catalog, every repository |
Supported auth methods
| Method | Use it when | Notes |
|---|---|---|
| Anonymous (library or registry) | The images are public | Nothing is stored. |
| Library access token | The library collections are private | Sent as a bearer token to the library host only. |
| Registry username and token or password | The registry repositories are private | Exchanged at the registry's token service, as apptainer pull oras:// does. |
| Safeguard CLI on the host | The SIF files are on an HPC host or file system | safeguard sif scan /path/image.sif. Nothing is uploaded. |
Permissions required
Safeguard only reads. It never pushes, deletes, signs or changes an image, tag or collection.
Library access token
| Permission / scope | Required? | What Safeguard uses it for |
|---|---|---|
| Read access to the entities and collections you list (the token's user can pull their containers) | Required | Listing containers and tags (/v1/entities, /v1/collections, /v1/tags), reading image metadata (/v1/images) and downloading the image. |
Read access to the library's OCI registry (granted by the library through /v1/oci-redirect) | Required on OCI-backed libraries | Downloading the image file. The library issues a pull token for it; Safeguard does not store that token. |
Least privilege: create the token for a dedicated user that can read only the collections you want scanned. Library tokens carry the user's own access; there are no narrower scopes.
Registry token (ORAS)
| Permission / scope | Required? | What Safeguard uses it for |
|---|---|---|
Pull (repository:<name>:pull) on the repositories you list | Required | Reading manifests, tags and the SIF layer. |
Catalog read (registry:catalog:*) | Optional | Listing every repository when you list none. Without it, add repositories by name. |
Least privilege: a robot or service account with pull access to the SIF repositories only (for example a GitHub token with read:packages, or a Harbor robot account with pull permission).
Token types
| Token type | Works? | Notes |
|---|---|---|
| Library access token (the library's "Access Tokens" page) | Yes | The same token apptainer remote login takes. |
| Registry robot or service account token | Yes (recommended for registries) | Pull only. |
| Registry personal access token or password | Yes | Use a dedicated account where you can. |
| Keyserver credentials, PGP private keys, x509 private keys | No | Never needed. Signatures are checked with public keys only. |
Expiry: library tokens and registry tokens expire on the schedule the service sets. Rotate them before they expire, for example every 90 days. An expired token makes validation and scans fail with an authentication error.
What we never need: push or delete rights, a signing key, root on any host, or docker:// registry credentials (the registry integrations cover those).
Step-by-step setup
Create the credential in the library or registry
- For a library: sign in to its web interface, open Access Tokens, and create a token for a user that can read the collections to scan.
- For an ORAS registry: create a robot or service account with pull access to the SIF repositories, and a token for it.
- To check a token before connecting:
apptainer remote login(library) orapptainer registry login oras://<registry>(registry), thenapptainer pullone image.
Or with the Safeguard CLI on the host
safeguard sif inspect image.sif # header, objects, architecture, definition file, labels
safeguard sif verify image.sif --key signer.asc # PGP public key or PEM public key
safeguard sif verify image.sif --certificate leaf.pem --certificate-roots ca.pem
safeguard sif scan image.sif # SBOM, vulnerabilities, sha256 and signature status
safeguard scan image.sif # the same scan, from the scan command
SG_LIBRARY_TOKEN=... safeguard sif scan library://library.example.com/team/tools/app:1.2
SG_REGISTRY_PASSWORD=... safeguard sif scan oras://ghcr.io/acme/app:1.2 --registry-username botverify exits 0 when every object is verified, 2 when a signature or signed object is invalid, and 3 when the image is unsigned or not fully verified. Results stay on the machine. See CLI usage.
Connect it in Safeguard
- Open Integrations and choose the Project/Product tab.
- Click Connect on the Apptainer / Singularity (SIF) card.
- Enter a Name, then choose the Source: Library or OCI registry, and the Access: Public or Private.
- Enter the Library URL (such as
https://library.example.com) or the Registry host (such asghcr.io). - Under Images, add one image per line:
entity/collection/container[:tag]for a library,repository/name[:tag]for a registry. For a library you can also add Entities or collections to list. - For Private, enter the Library access token, or the Registry username and Registry token or password.
- Click Verify access, then Next, pick the images and tags to scan, and finish.
Webhooks and triggers
Libraries and registries send Safeguard no events for SIF images. Images are scanned when you connect them, on the schedule you set under Integrations > Scheduled, or when you rescan by hand.
What we read and store
- Read: for a library,
/version,/v1/entities/<entity>,/v1/collections/<entity>/<collection>,/v1/tags/<container>,/v1/images/<container>:<tag>and the image file (from the library's OCI registry through/v1/oci-redirect, or/v1/imagefile); for a registry,/v2/_catalog,/v2/<repository>/tags/list, the manifest and the SIF layer (application/vnd.sylabs.sif.layer.v1.sif). - Checked: the downloaded file against the hash the library names (
sha256.<hex>), or the layer against the digest its manifest names. A mismatch fails the scan. - Stored: the SBOM, the findings, the SIF's sha256 and the signature status of each scan. The token is encrypted at rest and never shown again after you save it.
- Not stored: the SIF file is deleted with the scan's working folder when the scan ends.
- No customer data from this integration is sent to third-party LLMs.
Troubleshooting
| Message you see | Cause | Fix |
|---|---|---|
refused anonymous access ... it is private | The collection or repository needs a token. | Connect as Private with a token. |
refused the access token | The token expired, was revoked, or its user cannot read the collection. | Create a new token for a user with read access and update the connection. |
has no collection or has no image | A name, tag or architecture is wrong. | Check the entity, collection and container names and the tag. Scans pull amd64. |
is not a SIF artifact | The repository holds an ordinary container image. | Scan it with that registry's integration. |
is not on <host> | An image names another host than the connection. | Add a connection for the other library or registry. |
the tag moved during the download or the file is damaged | The image changed between resolving the tag and downloading it. | Rescan. |
has no squashfs root filesystem to scan | The image is encrypted, or its root filesystem is not squashfs. | Encrypted SIFs cannot be scanned without their key. |
Rotation and disconnect
- Rotate: create the new token, open the connection's edit dialog, enter it, click Verify access and save. Then revoke the old token in the library or registry.
- Disconnect: delete the connection under Integrations, then revoke the token. Nothing else was created on your side.
Limits
- Only the primary system partition (the root filesystem) is scanned. Overlay and data partitions are listed by
safeguard sif inspectbut not scanned. Encrypted SIFs cannot be scanned. - Hosted scans check signatures against the public keys your workspace trusts; without them a signed image shows as signed but not verified. Legacy signatures (Singularity before 3.6) are checked only by the CLI with
--legacy-insecure. - When a DSSE signature fails with the keys you gave, Safeguard cannot tell a different key from an altered signature, so it reports the signature as not verifiable rather than invalid.
- The Library API returns whole lists, so listings are complete. A registry is listed in full only with catalog access.
- The signature status is recorded with each scan; showing it on the project page is rolling out.
Vendor references
- Apptainer: Signing and verifying containers, checked 2026-10-16.
- Apptainer: Library API registries, checked 2026-10-16.
- Apptainer: Remote endpoints, checked 2026-10-16.
- SingularityCE: Remote endpoints (Singularity Enterprise and compatible services), checked 2026-10-16.
- sylabs/sif (format and integrity package), checked 2026-10-16.
- sylabs/scs-library-client (Library API client), checked 2026-10-16.
- Apptainer ORAS client (SIF media types), checked 2026-10-16.
WebAssembly (Wasm)
Connect a registry of WebAssembly components and modules to Safeguard, or scan .wasm files with the Safeguard CLI. The credentials each connection needs, which token types work, what a Wasm scan can and cannot know, and step-by-step setup.
Google Artifact Registry
Connect Google Artifact Registry (and public gcr.io images) to Safeguard. The IAM role the service account needs, which credentials work, and step-by-step setup.