Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>policycheckerNew to Visual Studio Code? Get it now.
policychecker

policychecker

policychecker

| (0) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PolicyCheck — YAML Policy Validator

PolicyCheck is a VS Code extension that validates YAML configuration files in real time using your existing Rego (OPA) policy files.


🚀 Features

  • 🧩 Runs Open Policy Agent rules directly inside VS Code
  • 🧠 Highlights YAML policy violations inline with red or yellow squiggles
  • 📋 Displays rule IDs and messages in the Problems panel
  • ⚙️ Detects and loads .rego policies automatically from your workspace policies/ folder
  • 💾 Re-checks automatically when you save or manually via a “PolicyCheck: Validate YAML” command

Example Screenshot


⚙️ Requirements

  • OPA CLI installed and available in your system path
    • Download: https://www.openpolicyagent.org/downloads/
  • Rego policies placed under ./policies/ in your workspace (configurable)
  • YAML files must follow your organization’s structure conventions

🧰 Extension Settings

This extension contributes the following settings:

Setting Description Default
policyChecker.policiesPath Path to your folder containing .rego files "policies"
policyChecker.runOnSave Run automatically when YAML is saved true

Example .vscode/settings.json:

{
  "policyChecker.policiesPath": "policies",
  "policyChecker.runOnSave": true
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft