── CLI REFERENCE ──

exo validate

Validate the .exo.yaml config and optionally run a Trivy security scan on the generated Dockerfile.

## Synopsis

bash
exo validate [--security]

## Description

Without flags, reads .exo.yaml and checks all field values against the set of allowed options. Reports errors for invalid languages, providers, CI platforms, monitoring options, or database types.

With --security, additionally invokes Trivy (if installed) to scan Dockerfile for known CVEs, outdated base images, and misconfiguration issues.

## Flags

FlagDescription
--securityRun Trivy security scan on Dockerfile after config validation

## Validation Rules

FieldValid Values
nameNon-empty string
languagego, node, python, java, rust
provideraws, gcp, azure, none
cigithub-actions, gitlab-ci, none
monitoringprometheus, none
databasepostgres, mysql, mongo, redis, none

## Examples

Config validation only

bash
$ exo validate
Validating .exo.yaml...
✓ name: my-service
✓ language: go
✓ provider: aws
✓ ci: github-actions
✓ monitoring: prometheus
✓ database: postgres
Configuration is valid.

With Trivy security scan

bash
$ exo validate --security
Validating .exo.yaml... ✓ valid
Running Trivy security scan on Dockerfile...
2024-01-15T10:23:45Z INFO Scanning Dockerfile...
Dockerfile (dockerfile)
=======================
Tests: 24 (SUCCESSES: 22, FAILURES: 2, EXCEPTIONS: 0)
FAILURES: 2 (HIGH: 1, MEDIUM: 1)
HIGH: Specify a tag in the FROM statement
MEDIUM: Last USER command is root

When Trivy is not installed

bash
$ exo validate --security
Validating .exo.yaml... ✓ valid
[warn] trivy not found in PATH — skipping security scan.
Install: https://github.com/aquasecurity/trivy