Documentation The sc command line

One command scans an image. Two more show the report and download it.

Install

  • macOS

    Intel and Apple silicon. Run it in Terminal.

    curl -fsSL https://scancontainer.com/install.sh | sh
  • Linux

    x86-64 and ARM64. Any distribution.

    curl -fsSL https://scancontainer.com/install.sh | sh
  • Windows

    Windows 10 and 11. Run it in PowerShell.

    irm https://scancontainer.com/install.ps1 | iex

The installer detects your system, downloads a single file called sc and adds it to your PATH. It needs nothing else: no Docker, no runtime.

Open a new terminal and check that it works.

sc version

Sign in

sc login      # Opens the browser to sign in
sc whoami     # Shows the account and the plan
sc logout     # Removes the session from this machine

On a machine without a browser, such as a CI runner, use an access token instead. Set it in the SC_TOKEN environment variable and sc uses it without asking.

Scan an image

Give sc image the name of the image, as you would give it to docker pull.

sc image nginx:latest                          # A public image
sc image myapp:1.4                             # An image you have just built
sc image registry.example.com/team/myapp:1.4   # An image in a private registry
sc image ./myapp.tar                           # A file made with docker save
  • If the image is on your machine, it is sent from there. If it is not, scancontainer pulls it from the registry.
  • For a private registry, sc reads the image with the access Docker already has on your machine. Your registry password is never sent to scancontainer.
  • The image is deleted when the analysis ends.

What you see

The scan ends with a verdict, the fixes in order of importance and the link to the report.

$ sc image myapp:1.4

  myapp:1.4

  Almost ready. Fix 2 things first.

  1. Update the base image
     node:18 no longer gets security patches.
     FROM node:22-alpine

  2. Take the .env out of the image
     It was copied in layer 5.
     echo ".env" >> .dockerignore

  14 low-risk notes can wait.

  Report     https://platform.scancontainer.com/reports/r_8f3k2a
  Download   sc download r_8f3k2a --format pdf

Options

OptionWhat it does
--fail-on <level>Ends with exit code 1 when there is a finding of this level or higher: critical, high, medium or low. Use it to stop a pipeline.
--format <format>Prints the result as text, json or sarif. The default is text.
--output <file>Writes the result to a file instead of the terminal.
--no-waitStarts the scan and returns at once with the report ID.
--quietPrints only the verdict and the link to the report.
--helpShows the help for any command.

Settings file

To avoid repeating options, put them in a file called .sc.yml in the folder where you run sc. Options on the command line win over the file.

# .sc.yml
fail-on: high        # Same as --fail-on high
format: text         # text, json or sarif
quiet: false

Output for other tools

With the json format, sc prints the same data the API returns, ready for jq or for your own scripts.

sc image myapp:1.4 --format json
{
  "id": "r_8f3k2a",
  "target": "myapp:1.4",
  "created": "2026-11-17T10:42:00Z",
  "verdict": "almost_ready",
  "findings": {"critical": 0, "high": 2, "medium": 0, "low": 14},
  "fix_first": [
    {"title": "Update the base image", "fix": "FROM node:22-alpine"}
  ],
  "url": "https://platform.scancontainer.com/reports/r_8f3k2a"
}

See your reports

sc reports                  # Lists your latest reports
sc report last              # Shows the latest report in the terminal
sc report r_8f3k2a          # Shows one report by its ID
sc report r_8f3k2a --open   # Opens it in the browser
$ sc reports

ID         DATE               TARGET          VERDICT
r_8f3k2a   2026-11-17 10:42   myapp:1.4       Almost ready
r_7c1m9d   2026-11-16 18:05   nginx:latest    Ready
r_5t0q2x   2026-11-14 09:30   api:2.0         Not ready

Download a report

sc download last --format pdf                         # Saves the latest report as PDF
sc download r_8f3k2a --format json                    # Saves one report as JSON
sc download r_8f3k2a --format sarif --output scan.sarif   # Chooses the file name
FormatWhat you get
pdfThe report as a document to send or file.
htmlThe report as a single page that opens in any browser.
jsonEvery finding as data, for your own tools.
sarifFindings for GitHub, GitLab and Azure DevOps code scanning.
cyclonedxThe SBOM in CycloneDX.
spdxThe SBOM in SPDX.
openvexThe VEX statement in OpenVEX.
cyclonedx-vexThe VEX statement in CycloneDX VEX.
csafThe VEX statement in CSAF.

The formats you can download depend on your plan. Free accounts get the simple report.

Other commands

CommandWhat it does
sc usageShows the scans used and the scans left this month.
sc delete r_8f3k2aDeletes a report from your account for good.
sc completion zshPrints the completion script for your shell: bash, zsh, fish or powershell.
sc updateUpdates sc to the latest version.
sc versionShows the installed version.

Exit codes

CodeMeaning
0The scan finished and nothing reached the level set with --fail-on.
1The scan finished and at least one finding reached that level.
2The scan could not run: wrong arguments, no session or no network.
3The limit of your plan was reached.

Environment variables

VariableWhat it does
SC_TOKENThe access token to use instead of the session from sc login.
NO_COLORTurns colours off in the output.

Recipes

# Build, scan and push only if the scan passes
docker build -t myapp:1.4 .
sc image myapp:1.4 --fail-on high && docker push registry.example.com/team/myapp:1.4

# Scan every image a compose file uses
docker compose config --images | xargs -n1 sc image

# Keep a PDF of every scan
sc image myapp:1.4 && sc download last --format pdf --output myapp-1.4.pdf

One tool for images and code

The same tool works with scancontainer and with scancodebase: sc image scans a container image and sc code scans source code.

If something goes wrong

What you seeWhat to do
command not found: scOpen a new terminal. If it is still missing, run the installer again.
No sessionRun sc login, or check that SC_TOKEN is set and has not been revoked.
Limit reachedRun sc usage to see what is left. The scan runs when the limit resets or when you add scans.
Cannot read the imageCheck the name and the tag, and that docker pull works with the same name.
Part of the image could not be readThe report lists it as a gap instead of passing it as clean.

Scan yours before the next deploy.