Skip to main content

vlayer scan

Scan a directory for HIPAA compliance issues.

Synopsis

vlayer scan <path> [options]

Arguments

ArgumentDescriptionDefault
pathDirectory or file to scan. (current directory)

Options

OptionAliasDescription
--format <type>-fOutput format: text, json, html, markdown
--output <file>-oWrite report to file
--category <cats>-cComma-separated categories to scan
--severity <level>-sMinimum severity: low, medium, high, critical
--exclude <patterns>-eGlob patterns to exclude
--config <file>Path to config file
--fixAuto-fix issues where possible
--fail-on <level>Exit with error if severity >= level

Categories

Available categories:

  • phi - Protected Health Information detection
  • encryption - Encryption and cryptography
  • audit - Audit logging
  • access - Access control
  • retention - Data retention

Examples

Basic Scan

# Scan current directory
vlayer scan .

# Scan specific directory
vlayer scan ./src

Output Formats

# JSON output
vlayer scan . -f json

# HTML report
vlayer scan . -f html -o report.html

# Markdown
vlayer scan . -f markdown -o FINDINGS.md

Filtering

# Only PHI and encryption
vlayer scan . -c phi,encryption

# High and critical only
vlayer scan . -s high

# Exclude test files
vlayer scan . -e "**/*.test.ts" -e "**/node_modules/**"

CI/CD Usage

# Fail on high or critical
vlayer scan . --fail-on high

# Quiet mode with JSON output
vlayer scan . --quiet -f json -o results.json

Output Format

Text (Default)

PHI Exposure
⚠ HIGH: Potential SSN pattern found
→ src/utils/validate.ts:45
Reference: HIPAA §164.514

Summary: 1 high, 0 medium, 0 low

JSON

{
"scanDate": "2024-01-15T10:30:00Z",
"findings": [
{
"category": "phi",
"severity": "HIGH",
"message": "Potential SSN pattern found",
"file": "src/utils/validate.ts",
"line": 45,
"hipaaReference": "§164.514"
}
],
"summary": {
"critical": 0,
"high": 1,
"medium": 0,
"low": 0
}
}

See Also