-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
John Williams edited this page Mar 16, 2026
·
1 revision
Last Mile 360 is configured via a .last-mile.yml file in the project root. All options are optional — the scanner runs with sensible defaults if no config file exists.
# .last-mile.yml — Last Mile 360 Configuration
# ─── Agent Selection ─────────────────────────────────────────────
# Choose which agents to run. Default: all
agents:
- security
- database
- infrastructure
- observability
- quality
# ─── Rule Overrides ──────────────────────────────────────────────
rules:
# Disable specific rules entirely
disable:
- sast/console-log-production # We use console.log intentionally
- obs/console-only # Same reason
# Override severity for specific rules
severity:
sast/insecure-http-url: low # We have HTTP URLs for local dev
infra/no-dockerfile: info # We deploy to Cloudflare, no Docker needed
# ─── File Ignoring ───────────────────────────────────────────────
ignore:
# Glob patterns for files/directories to skip
paths:
- "node_modules/**" # Always ignored by default
- "dist/**" # Build output
- "coverage/**" # Test coverage reports
- ".next/**" # Next.js build cache
- "vendor/**" # Vendored dependencies
- "**/*.min.js" # Minified files
- "**/*.bundle.js" # Bundled files
- "migrations/*.sql" # Generated migration files
- "docs/**" # Documentation
# ─── Secret Scanning ─────────────────────────────────────────────
secrets:
# Allow specific patterns (useful for private repos with test keys)
allow:
- "sk-test-*" # Stripe test keys are not real secrets
- "pk_test_*" # Stripe publishable test keys
- "EXAMPLE_*" # Example values in docs
# Additional secret patterns to detect
custom_patterns:
- name: "Internal API Token"
pattern: "int_[a-zA-Z0-9]{32}"
severity: high
# ─── Scoring ─────────────────────────────────────────────────────
scoring:
# Override category weights (must sum to 100)
weights:
security: 35
database: 20
infrastructure: 20
observability: 12.5
quality: 12.5
# Minimum score to pass (used with --fail-under flag)
fail_under: 70
# ─── Output ──────────────────────────────────────────────────────
output:
# Where to write the report
report_path: ".last-mile/report.md"
# Include source code snippets in findings
include_snippets: true
# Maximum findings to display per rule (0 = unlimited)
max_findings_per_rule: 10
# ─── AI / Inference ──────────────────────────────────────────────
inference:
# Disable AI-powered analysis (SAST rules only)
disable_ai: false
# Model preference
model: "claude-sonnet" # Options: claude-sonnet, workers-ai, gpt-4
# Cost limit per scan (USD)
cost_limit: 0.50agents:
- security
ignore:
paths:
- "**/*.test.*"
- "**/*.spec.*"scoring:
fail_under: 80
output:
report_path: ".last-mile/report.md"
include_snippets: false
inference:
disable_ai: trueagents:
- security
- database
rules:
severity:
db/no-rls: criticalrules:
disable:
- infra/no-dockerfile
- infra/no-health-endpoint
severity:
infra/no-node-version: infosecrets:
allow:
- "sk_test_*"
- "pk_test_*"
- "whsec_test_*"
- "DUMMY_*"
- "FAKE_*"Rules can be disabled in three ways:
rules:
disable:
- sast/console-log-production// last-mile-disable-next-line sast/console-log-production
console.log('This is intentional debug output');LAST_MILE_DISABLE_RULES=sast/console-log-production,obs/console-only last-mile scan .These paths are always ignored (cannot be overridden):
node_modules/.git/package-lock.jsonyarn.lockpnpm-lock.yaml
ignore:
paths:
- "generated/**"
- "**/*.generated.ts"
- "legacy/**"Alternatively, create a .last-mileignore file (same syntax as .gitignore):
# .last-mileignore
dist/
build/
*.min.js
*.map
Any rule's severity can be raised or lowered:
rules:
severity:
# Raise: treat console.log as medium instead of low
sast/console-log-production: medium
# Lower: treat missing Dockerfile as info (not applicable)
infra/no-dockerfile: info
# Raise: treat missing RLS as critical for Supabase projects
db/no-rls: criticalValid severity values: critical, high, medium, low, info
Run only specific agents for faster, focused scans:
agents:
- security # Only security analysis
- database # Only database rulesOr via CLI flag:
last-mile scan . --agents security,databaseWhen agents are excluded, their category still appears in the report with score N/A and weight redistributed proportionally.
Last Mile 360
Agents
Usage
Technical
Project