A comprehensive security scanning CLI tool that integrates multiple security scanners to analyze source code, container images, and artifacts for vulnerabilities, secrets, licenses, and security best practices.
- What is SSD Scanner CLI?
- Installation
- Quick Start
- Use Cases & Examples
- Scanner-Specific Options
- Authentication Options
- Advanced Configuration
- Common Scanner Combinations
- CI/CD Integration Examples
- Troubleshooting
- Dependencies Installation
SSD Scanner CLI is a unified security scanning platform that combines the power of industry-leading security tools:
- Vulnerability Scanning - Trivy, Grype, Snyk
- SAST (Static Analysis) - Semgrep, Opengrep, Codacy
- Security Scorecards - OpenSSF Scorecard
- SBOM Generation - Syft, Trivy, Grype
- Kubernetes Security - Kubescape, Trivy
- Secret Detection - Trivy, Semgrep
- License Compliance - Trivy
Download the latest release for your architecture:
Linux AMD64
curl -L -o ssd-scanner-cli https://github.com/OpsMx/ssd-scanner-cli-public/releases/download/v2025.07.12/ssd-scanner-cli-amd64
chmod +x ssd-scanner-cli
sudo mv ssd-scanner-cli /usr/local/bin/Linux ARM64
curl -L -o ssd-scanner-cli https://github.com/OpsMx/ssd-scanner-cli-public/releases/download/v2025.07.12/ssd-scanner-cli-arm64
chmod +x ssd-scanner-cli
sudo mv ssd-scanner-cli /usr/local/bin/Pull Docker Image
# Pull the latest image
docker pull opsmx11/ssd-scanner-cli:v2025.07.12Scan Local Source Code (Offline)
ssd-scanner-cli \
--scanners=trivy,semgrep \
--source-code-path=./my-project \
--repository-url=https://github.com/user/my-app \
--branch=main \
--build-id=local-scan \
--trivy-scanners=codelicensescan,codesecretscan \
--offline-modeScan Container Image
ssd-scanner-cli \
--scanners=trivy,grype \
--artifact-type=image \
--artifact-name=nginx \
--artifact-tag=latest \
--trivy-scanners=imagelicensescan,imagesecretscan,sbom \
--grype-scanners=sbom \
--offline-modeDocker Scan with Mounted Source Code
docker run -v $(pwd):/home/scanner/source opsmx11/ssd-scanner-cli:v2025.07.12 \
--scanners=semgrep,trivy \
--source-code-path=/home/scanner/source \
--repository-url=https://github.com/user/my-app \
--branch=main \
--build-id=docker-scan \
--trivy-scanners=codelicensescan,codesecretscan \
--offline-modeAnalyze your source code for security vulnerabilities, secrets, license compliance, and code quality issues using static analysis tools.
Binary Command
ssd-scanner-cli \
--scanners=semgrep,trivy,openssf \
--source-code-path=./my-application \
--repository-url=https://github.com/user/my-app \
--branch=main \
--build-id=local-123 \
--trivy-scanners=codelicensescan,codesecretscan \
--offline-modeDocker Command
docker run -v $(pwd):/home/scanner/source opsmx11/ssd-scanner-cli:v2025.07.12 \
--scanners=semgrep,trivy,openssf \
--source-code-path=/home/scanner/source \
--repository-url=https://github.com/user/my-app \
--branch=main \
--build-id=docker-123 \
--trivy-scanners=codelicensescan,codesecretscan \
--offline-modeClone and scan remote repositories without having the code locally. Perfect for CI/CD pipelines.
With Token Authentication
ssd-scanner-cli \
--scanners=semgrep,codacy,snyk \
--repository-url=https://github.com/user/private-repo \
--branch=develop \
--build-id=remote-456 \
--git-auth-type=token \
--git-auth-key=ghp_your_token_here \
--codacy-api-token=your_codacy_token \
--snyk-api-token=your_snyk_token \
--upload-url=https://your-ssd-instance.com \
--ssd-token=your_ssd_tokenWith Username/Password
ssd-scanner-cli \
--scanners=semgrep,opengrep \
--repository-url=https://github.com/user/private-repo \
--branch=main \
--build-id=auth-789 \
--git-auth-type=password \
--git-username=your_username \
--git-password=your_password \
--offline-modeScan container images and local artifacts for vulnerabilities, malware, and security issues. Use --artifact-type=image for container images from registries, or --artifact-type=file for local files and artifacts.
Scan container images that are available locally or in accessible registries.
Binary Command
ssd-scanner-cli \
--scanners=trivy,grype,syft \
--artifact-type=image \
--artifact-name=python \
--artifact-tag=3.9-slim \
--trivy-scanners=imagelicensescan,imagesecretscan,sbom \
--grype-scanners=sbom \
--syft-scanners=sbom \
--offline-modeDocker Command
docker run -v /var/run/docker.sock:/var/run/docker.sock opsmx11/ssd-scanner-cli:v2025.07.12 \
--scanners=trivy,grype \
--artifact-type=image \
--artifact-name=nginx \
--artifact-tag=latest \
--trivy-scanners=sbom,imagelicensescan \
--grype-scanners=sbom \
--offline-modePull and scan images from remote container registries with authentication.
With Registry Authentication
ssd-scanner-cli \
--scanners=trivy,syft \
--artifact-type=image \
--artifact-name=my-app \
--artifact-tag=v1.2.3 \
--image-registry=registry.hub.docker.com \
--registry-username=user \
--registry-password=pass \
--trivy-scanners=sbom,imagelicensescan \
--syft-scanners=sbom \
--upload-url=https://your-ssd-instance.com \
--ssd-token=your_ssd_tokenScan local files, binaries, archives, or any artifacts stored on the filesystem.
Binary Command
ssd-scanner-cli \
--scanners=trivy,syft \
--artifact-type=file \
--artifact-name=my-binary \
--artifact-tag=v1.0.0 \
--artifact-path=./dist/my-binary.tar.gz \
--trivy-scanners=sbom \
--syft-scanners=sbom \
--offline-modeDocker Command (with file mount)
docker run -v $(pwd):/home/scanner/source opsmx11/ssd-scanner-cli:v2025.07.12 \
--scanners=semgrep,openssf,trivy,syft \
--artifact-type=file \
--artifact-name=supply-chain \
--artifact-tag=v2 \
--artifact-path=/home/scanner/source \
--syft-scanners=sourcecodesbom \
--trivy-scanners=codelicensescan \
--source-code-path=/home/scanner/source \
--repository-url=https://github.com/OpsMx/supplychain-api \
--branch=main \
--build-id=test-131 \
--offline-modeAnalyze Helm charts for security misconfigurations, vulnerabilities, and compliance issues using Kubernetes security scanners.
Command Example
ssd-scanner-cli \
--scanners=trivy,kubescape \
--helm-template-path=./helm-charts/my-app \
--helm-release-name=my-app \
--helm-release-version=1.0.0 \
--trivy-scanners=helmscan \
--offline-modeCommand Example
ssd-scanner-cli \
--scanners=kubescape \
--helm-package-path=./my-app-1.0.0.tgz \
--helm-release-name=my-app \
--helm-release-version=1.0.0 \
--offline-modeGenerate Software Bill of Materials (SBOM) for container images and source code to track dependencies and supply chain security.
Command Example
ssd-scanner-cli \
--scanners=syft,grype,trivy \
--artifact-type=image \
--artifact-name=alpine \
--artifact-tag=latest \
--syft-scanners=sbom \
--grype-scanners=sbom \
--trivy-scanners=sbom \
--offline-modeCommand Example
ssd-scanner-cli \
--scanners=syft,trivy \
--source-code-path=./my-project \
--artifact-type=file \
--artifact-name=my-project \
--artifact-tag=main \
--artifact-path=./my-project \
--syft-scanners=sourcecodesbom \
--trivy-scanners=sourcecodesbom \
--repository-url=https://github.com/user/my-project \
--branch=main \
--build-id=sbom-gen \
--offline-modeCompare security findings between branches to identify new issues introduced in pull requests. This helps maintain security standards by catching issues before they reach production.
Command Example
ssd-scanner-cli \
--scanners=semgrep,trivy \
--source-code-path=./my-project \
--repository-url=https://github.com/user/my-project \
--branch=feature-branch \
--build-id=pr-123 \
--diff-scan=true \
--base-branch=main \
--base-commit=abc123def \
--head-commit=xyz789uvw \
--interrupt-condition=critical,high \
--trivy-scanners=codelicensescan,codesecretscan \
--upload-url=https://your-ssd-instance.com \
--ssd-token=your_ssd_tokenCommand Example
ssd-scanner-cli \
--scanners=semgrep,trivy,snyk \
--repository-url=https://github.com/user/my-project \
--branch=feature-branch \
--build-id=pr-456 \
--diff-scan=true \
--base-branch=main \
--base-commit=abc123def \
--head-commit=xyz789uvw \
--interrupt-condition=all \
--interrupt-for-old-issues=true \
--git-auth-type=token \
--git-auth-key=your_token \
--snyk-api-token=your_snyk_token \
--trivy-scanners=codelicensescan,codesecretscan \
--upload-url=https://your-ssd-instance.com \
--ssd-token=your_ssd_token| Scanner | Purpose | Special Flags |
|---|---|---|
trivy |
Vulnerability, License, Secret scanning | --trivy-scanners |
semgrep |
Static Analysis Security Testing (SAST) | - |
opengrep |
Open-source SAST | - |
grype |
Vulnerability scanning | --grype-scanners |
syft |
SBOM generation | --syft-scanners |
snyk |
Vulnerability and license scanning | --snyk-api-token |
codacy |
Code quality and security | --codacy-api-token |
openssf |
Security scorecards | - |
kubescape |
Kubernetes security | - |
Available Modes
--trivy-scanners=codelicensescan,codesecretscan,imagelicensescan,imagesecretscan,sbom,sourcecodesbom,helmscanAvailable modes:
codelicensescan- License scanning for source codecodesecretscan- Secret detection in source codeimagelicensescan- License scanning for container imagesimagesecretscan- Secret detection in container imagessbom- Generate SBOM for imagessourcecodesbom- Generate SBOM for source codehelmscan- Security scanning for Helm charts
Available Modes
--grype-scanners=sbom,sourcecodesbomAvailable Modes
--syft-scanners=sbom,sourcecodesbomCommand Example
--git-auth-type=token \
--git-auth-key=ghp_your_github_tokenCommand Example
--git-auth-type=password \
--git-username=your_username \
--git-password=your_passwordCommand Example
--image-registry=registry.hub.docker.com \
--registry-token=your_registry_tokenCommand Example
--image-registry=registry.hub.docker.com \
--registry-username=your_username \
--registry-password=your_passwordSupported Registries:
- Docker Hub
More registry support coming soon
--artifact-type=image: For container images stored in registries (Docker Hub, etc.). No --artifact-path required.
--artifact-type=file: For local files, binaries, archives, or any filesystem artifacts. Requires --artifact-path to specify the local file location.
Usage
Run scans without uploading results:
--offline-mode=trueUsage
Enable detailed logging:
--debug=trueUsage
--scanners-path=/custom/path/to/scannersUsage
--keep-results=trueCommand Example
--scanners=semgrep,trivy,openssf,snyk \
--trivy-scanners=codelicensescan,codesecretscanCommand Example
--scanners=syft,grype,trivy \
--syft-scanners=sbom \
--grype-scanners=sbom \
--trivy-scanners=sbomCommand Example
--scanners=semgrep,codacy,opengrepCommand Example
--scanners=trivy,grype \
--trivy-scanners=imagelicensescan,imagesecretscan,sbom \
--grype-scanners=sbomComplete Workflow Example
Create .github/workflows/security-scan.yml:
name: Security Scan
on:
pull_request:
branches: [ main, develop ]
push:
branches: [ main ]
jobs:
security-scan:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Needed for diff scanning
- name: Run SSD Scanner CLI
run: |
curl -L -o ssd-scanner-cli https://github.com/OpsMx/ssd-scanner-cli-public/releases/download/v2025.07.12/ssd-scanner-cli-amd64
chmod +x ssd-scanner-cli
./ssd-scanner-cli \
--scanners=semgrep,trivy,openssf \
--source-code-path=. \
--repository-url=${{ github.server_url }}/${{ github.repository }} \
--branch=${{ github.ref_name }} \
--build-id=${{ github.run_number }} \
--trivy-scanners=codelicensescan,codesecretscan \
--upload-url=${{ secrets.SSD_UPLOAD_URL }} \
--ssd-token=${{ secrets.SSD_TOKEN }}
differential-scan:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run Differential Scan
run: |
curl -L -o ssd-scanner-cli https://github.com/OpsMx/ssd-scanner-cli-public/releases/download/v2025.07.12/ssd-scanner-cli-amd64
chmod +x ssd-scanner-cli
./ssd-scanner-cli \
--scanners=semgrep,trivy \
--source-code-path=. \
--repository-url=${{ github.server_url }}/${{ github.repository }} \
--branch=${{ github.head_ref }} \
--build-id=pr-${{ github.event.number }} \
--diff-scan=true \
--base-branch=${{ github.base_ref }} \
--base-commit=${{ github.event.pull_request.base.sha }} \
--head-commit=${{ github.event.pull_request.head.sha }} \
--interrupt-condition=critical,high \
--git-auth-type=token \
--git-auth-key=${{ secrets.GITHUB_TOKEN }} \
--trivy-scanners=codelicensescan,codesecretscan \
--upload-url=${{ secrets.SSD_UPLOAD_URL }} \
--ssd-token=${{ secrets.SSD_TOKEN }}
container-scan:
runs-on: ubuntu-latest
steps:
- name: Build Docker image
run: |
docker build -t my-app:${{ github.sha }} .
- name: Scan Container Image
run: |
docker run -v /var/run/docker.sock:/var/run/docker.sock \
opsmx11/ssd-scanner-cli:v2025.07.12 \
--scanners=trivy,grype \
--artifact-type=image \
--artifact-name=my-app \
--artifact-tag=${{ github.sha }} \
--trivy-scanners=imagelicensescan,imagesecretscan,sbom \
--grype-scanners=sbom \
--upload-url=${{ secrets.SSD_UPLOAD_URL }} \
--ssd-token=${{ secrets.SSD_TOKEN }}Permission denied when running binary
chmod +x ssd-scanner-cliDocker socket permission issues
# Add your user to docker group
sudo usermod -aG docker $USER
# Or run with sudo
sudo docker run...Git authentication failures
- Ensure your token has appropriate repository permissions
- For private repositories, use a token with
reposcope - Check that the repository URL is correct
Scanner-specific failures
- Ensure API tokens are valid for Snyk and Codacy
- Check that the source code path exists and is readable
- Verify artifact paths and names are correct
Memory issues with large repositories
- Use
--sub-directoryto scan specific parts - Consider running scanners individually rather than all at once
- Check scanner logs with
--debug=true - Verify all required flags are provided
- Ensure you have sufficient disk space for scan results
- For upload issues, verify your SSD instance URL and token
Install Scanner Dependencies
ssd-scanner-cli install-deps --scanners=trivy,semgrep,opengrep,kubescapeVersion: v2025.07.12
Support: For issues and questions, please create an issue in the GitHub repository.