Kelvar Docs

Reference

Configuration

The scanner and the service read three kinds of configuration. Each is a small JSON file. All of them live in your repository or next to it, so you can review them like code.

FilePurpose
.vigil/agent.jsonAdd a repository agent that scopes checks to paths.
.vigil/policy.jsonSet the severity thresholds that serve uses.
connectors/*.jsonDescribe the HTTP sources serve polls.

#Repository agent

An agent is configuration, not code. .vigil/agent.json in the scanned folder defines one extra agent that runs in addition to the built-in codebase-guardian.

json
{
  "name": "payments-strict",
  "permissions": { "paths": ["services/payments/**"] },
  "checks": ["secrets", "deps", "iac", "zero_click"],
  "on_finding": "block"
}
FieldRequiredMeaning
nameyesA label for the agent.
checksyesA list drawn from secrets, deps, iac and zero_click. An unknown name is an error.
permissions.pathsnoGlob patterns relative to the scanned folder. Only findings in matching files count for this agent. Empty or missing means every file.
on_findingnoreport or block. Defaults to report. Any other value is an error.

on_finding set to block makes scan exit with status 1 when this agent finds a high or critical issue in its paths.

#Built-in agent

codebase-guardian ships with the scanner.

json
{
  "name": "codebase-guardian",
  "permissions": { "paths": ["**"] },
  "checks": ["secrets", "deps", "iac", "zero_click"],
  "on_finding": "block"
}

#Policy

.vigil/policy.json in the folder you pass to serve sets the thresholds.

json
{
  "block_at_severity": "high",
  "alert_at_severity": "medium"
}
FieldDefaultMeaning
block_at_severityhighFindings and connector items at or above this severity become a block.
alert_at_severitymediumConnector items at or above this severity, and below the block level, become an alert.

Severities in order are info, low, medium, high and critical.

#Connectors

Each file in the connectors folder describes one HTTP source. ${NAME} is replaced with the environment variable NAME when the file loads, so secrets stay out of the file.

json
{
  "name": "siem-alerts",
  "type": "http",
  "url": "https://siem.example.com/api/alerts",
  "method": "GET",
  "headers": { "Authorization": "Bearer ${SIEM_TOKEN}" },
  "response_path": "results",
  "id_key": "id",
  "title_key": "title",
  "severity_key": "severity"
}
FieldDefaultMeaning
namerequiredA label for the source.
urlrequiredThe endpoint to fetch. A connector without a name and a url is ignored.
methodGETThe HTTP method.
headersnoneRequest headers.
bodynoneA request body, sent as given.
response_pathwhole responseA dotted path into the JSON response that holds the list of items.
id_keyidThe key in each item used as its identifier.
title_keytitleThe key used as the summary.
severity_keyseverityThe key used for severity. A missing value means info.

If a source cannot be reached or does not return JSON, Kelvar records an error insight and keeps going.

#Home and environment

The Kelvar system keeps its state in the Home directory, which is ~/.vigil unless VIGIL_HOME says otherwise. The registry of agents, interfaces and rooms lives in the Home. You normally change it through the app, or by asking Home to author a change. See Security agents and Permissions and sandboxing.