feat: схемы отчёта аудита, профили/пресеты и движок разрешения (BHL-019, BHL-012, BHL-013)

- spec/schemas: evidence, audit-finding, audit-report (BHL-019)
- spec/schemas: profile, preset с явным relax_to (BHL-012)
- packages/bhl: resolve.ts + bhl profile resolve — порядок не влияет,
  конфликты параметров и ослаблений, provenance и applicability (BHL-012, BHL-013)
- tests: корневые схемы 13/13, пакет 17/17
This commit is contained in:
Suslov-MD
2026-11-28 23:36:53 +03:00
parent 294bf9d68f
commit 5b514272cf
13 changed files with 1302 additions and 79 deletions
+26
View File
@@ -0,0 +1,26 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://baseline-harness.dev/spec/schemas/evidence.schema.json",
"title": "Evidence",
"description": "Доказательство для Audit Finding (D-005, D-019). Класс доказательств отличает наблюдение от интерпретации.",
"type": "object",
"additionalProperties": false,
"required": ["kind", "locator", "description"],
"properties": {
"kind": {
"enum": ["file", "command-output", "test-run", "session-observation", "review-note", "hash", "other"]
},
"locator": {
"type": "string",
"minLength": 1,
"description": "Путь, команда или идентификатор наблюдения."
},
"description": { "type": "string", "minLength": 3 },
"fingerprint": {
"type": "string",
"pattern": "^sha256:[a-f0-9]{64}$",
"description": "Отпечаток состояния источника доказательства (D-019)."
},
"captured_at": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" }
}
}