Skip to main content

CV-S001: Invalid YAML Syntax

Error Schema

Why This Matters

The YAML parser encountered a syntax error that prevents the file from being parsed. Common causes include incorrect indentation (YAML uses spaces, never tabs), unclosed quotes or brackets, duplicate keys at the same nesting level, and missing colons after mapping keys. Docker Compose files use YAML 1.1, which supports merge keys (<<) and anchors (&alias/*alias), but these must follow strict formatting rules. Fix the syntax error at the indicated line before any further validation can proceed.

How to Fix

Fix the YAML syntax error at the indicated line.

Before (incorrect)

services:
  web:
    image: nginx
  	ports:
      - "80:80"

After (correct)

services:
  web:
    image: nginx
    ports:
      - "80:80"

Rule Details

Rule Code
CV-S001
Severity
Error
Category
Schema

Related Rules