-
Notifications
You must be signed in to change notification settings - Fork 1
feat: v0.13.0 hot policy reload, OVERT Phase 3 IAP, named detectors, HTML dashboard #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -166,6 +166,95 @@ paths: | |
| application/json: | ||
| schema: { $ref: "#/components/schemas/VerifyResponse" } | ||
|
|
||
| /v1/detect/injection: | ||
| post: | ||
| tags: [detect] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # Check if the file exists and get its size
ls -lh docs/openapi.yaml && wc -l docs/openapi.yamlRepository: vaaraio/vaara Length of output: 145 🏁 Script executed: # Read the global tags section (around lines 30-32)
sed -n '25,45p' docs/openapi.yamlRepository: vaaraio/vaara Length of output: 778 🏁 Script executed: # Read line 171 to verify the detect tag usage
sed -n '165,180p' docs/openapi.yamlRepository: vaaraio/vaara Length of output: 655 🏁 Script executed: # Read line 215 to verify the policy tag usage
sed -n '210,220p' docs/openapi.yamlRepository: vaaraio/vaara Length of output: 515 🏁 Script executed: # Find all tags used in operation definitions
rg 'tags:\s*\[' docs/openapi.yaml -o | sort | uniqRepository: vaaraio/vaara Length of output: 65 🏁 Script executed: # Get all tags used in operation definitions with context
rg 'tags:\s*\[(\w+)\]' docs/openapi.yaml -o --replace '$1' | sort | uniqRepository: vaaraio/vaara Length of output: 90 🏁 Script executed: # Verify the exact global tags declaration
sed -n '30,35p' docs/openapi.yamlRepository: vaaraio/vaara Length of output: 251 Declare Lines 171 and 215 reference tags not declared in the top-level catalog (lines 30–32). Without these declarations, generated documentation loses tag descriptions and grouping metadata. 📌 Proposed spec patch tags:
- { name: score, description: Risk evaluation }
- { name: audit, description: Hash-chained audit trail }
- { name: server, description: Server identity and liveness }
+ - { name: detect, description: Prompt-injection and PII detection }
+ - { name: policy, description: Runtime policy operations }🤖 Prompt for AI Agents |
||
| summary: Score text for prompt-injection likelihood. | ||
| description: | | ||
| Routes through the Vaara adversarial scorer (the same model | ||
| behind vaara-bench-v1). Falls back to a small regex heuristic | ||
| set when the `ml` extra is not installed; the backend field | ||
| in the response reports which path served the call. | ||
| operationId: detectInjection | ||
| requestBody: | ||
| required: true | ||
| content: | ||
| application/json: | ||
| schema: { $ref: "#/components/schemas/DetectInjectionRequest" } | ||
| responses: | ||
| "200": | ||
| description: Detection result. | ||
| content: | ||
| application/json: | ||
| schema: { $ref: "#/components/schemas/DetectInjectionResponse" } | ||
|
|
||
| /v1/detect/pii: | ||
| post: | ||
| tags: [detect] | ||
| summary: Scan text for PII. | ||
| description: | | ||
| Regex-based extractor over six categories: email, phone, ssn, | ||
| ipv4, credit_card (Luhn-checked), iban (checksum-checked). | ||
| Returns per-finding category, value, offset, and length so | ||
| callers can highlight or redact in place. | ||
| operationId: detectPII | ||
| requestBody: | ||
| required: true | ||
| content: | ||
| application/json: | ||
| schema: { $ref: "#/components/schemas/DetectPIIRequest" } | ||
| responses: | ||
| "200": | ||
| description: Detection result. | ||
| content: | ||
| application/json: | ||
| schema: { $ref: "#/components/schemas/DetectPIIResponse" } | ||
|
|
||
| /v1/policy/reload: | ||
| post: | ||
| tags: [policy] | ||
| summary: Atomically reload the running policy. | ||
| description: | | ||
| Parse and validate a new policy document, then swap it in atomically. | ||
| The scorer's thresholds and sequence patterns rebind under its own | ||
| lock so an evaluate() call in flight on another thread either sees | ||
| the old pair or the new pair, never a torn half. Conformal | ||
| calibration, MWU expert state, and agent profiles are preserved. | ||
|
|
||
| Exactly one of `path` (server-side file path) or `body` (parsed | ||
| policy document) must be supplied. The server must have been | ||
| started with `vaara serve --policy PATH` for this endpoint to be | ||
| available; otherwise it returns `409 policy_not_configured`. A | ||
| malformed document returns `422 policy_invalid` and leaves the | ||
| previously loaded policy in place. | ||
| operationId: reloadPolicy | ||
| requestBody: | ||
| required: true | ||
| content: | ||
| application/json: | ||
| schema: { $ref: "#/components/schemas/PolicyReloadRequest" } | ||
| responses: | ||
| "200": | ||
| description: Reload accepted, new policy active. | ||
| content: | ||
| application/json: | ||
| schema: { $ref: "#/components/schemas/PolicyReloadResponse" } | ||
| "400": | ||
| description: Request supplied both `path` and `body`, or neither. | ||
| content: | ||
| application/json: | ||
| schema: { $ref: "#/components/schemas/Error" } | ||
| "409": | ||
| description: Server has no PolicyController; reload is disabled. | ||
| content: | ||
| application/json: | ||
| schema: { $ref: "#/components/schemas/Error" } | ||
| "422": | ||
| description: Policy document failed to parse or validate. | ||
| content: | ||
| application/json: | ||
| schema: { $ref: "#/components/schemas/Error" } | ||
|
|
||
| /v1/server: | ||
| get: | ||
| tags: [server] | ||
|
|
@@ -416,6 +505,99 @@ components: | |
| threshold_deny: { type: number, format: float } | ||
| alpha: { type: number, format: float } | ||
|
|
||
| DetectInjectionRequest: | ||
| type: object | ||
| required: [text] | ||
| properties: | ||
| text: { type: string, maxLength: 100000 } | ||
| threshold: | ||
| type: number | ||
| format: float | ||
| minimum: 0 | ||
| maximum: 1 | ||
| nullable: true | ||
|
|
||
| DetectInjectionResponse: | ||
| type: object | ||
| required: [detected, score, threshold, bundle_version, backend] | ||
| properties: | ||
| detected: { type: boolean } | ||
| score: { type: number, format: float, minimum: 0, maximum: 1 } | ||
| threshold: { type: number, format: float, minimum: 0, maximum: 1 } | ||
| bundle_version: { type: string } | ||
| backend: | ||
| type: string | ||
| enum: [vaara_adversarial, heuristic] | ||
|
|
||
| DetectPIIRequest: | ||
| type: object | ||
| required: [text] | ||
| properties: | ||
| text: { type: string, maxLength: 100000 } | ||
|
|
||
| DetectPIIFinding: | ||
| type: object | ||
| required: [category, value, offset, length] | ||
| properties: | ||
| category: | ||
| type: string | ||
| enum: [email, phone, ssn, ipv4, credit_card, iban] | ||
| value: { type: string } | ||
| offset: { type: integer, minimum: 0 } | ||
| length: { type: integer, minimum: 1 } | ||
|
|
||
| DetectPIIResponse: | ||
| type: object | ||
| required: [detected, categories, findings] | ||
| properties: | ||
| detected: { type: boolean } | ||
| categories: | ||
| type: array | ||
| items: { type: string } | ||
| findings: | ||
| type: array | ||
| items: { $ref: "#/components/schemas/DetectPIIFinding" } | ||
|
|
||
| PolicyReloadRequest: | ||
| type: object | ||
| description: | | ||
| Exactly one of `path` or `body` must be supplied. `path` lets the | ||
| server read the policy file directly; `body` carries an inline | ||
| parsed document for cases where the operator runs on a different | ||
| host than the server. | ||
| properties: | ||
| path: { type: string, maxLength: 4096 } | ||
| body: | ||
| type: object | ||
| additionalProperties: true | ||
| format: | ||
| type: string | ||
| enum: [json, yaml] | ||
| nullable: true | ||
|
|
||
| PolicyReloadResponse: | ||
| type: object | ||
| required: | ||
| - version | ||
| - thresholds_default | ||
| - sequence_count | ||
| - action_class_count | ||
| - escalation_route_count | ||
| properties: | ||
| version: | ||
| type: integer | ||
| minimum: 1 | ||
| description: Monotonic generation counter; increments on every accepted reload. | ||
| thresholds_default: | ||
| type: object | ||
| required: [escalate, deny] | ||
| properties: | ||
| escalate: { type: number, format: float, minimum: 0, maximum: 1 } | ||
| deny: { type: number, format: float, minimum: 0, maximum: 1 } | ||
| sequence_count: { type: integer, minimum: 0 } | ||
| action_class_count: { type: integer, minimum: 0 } | ||
| escalation_route_count: { type: integer, minimum: 0 } | ||
|
|
||
| Error: | ||
| type: object | ||
| required: [error] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verify the release date.
The changelog shows release date
2026-05-17, but according to the PR context the current date isMay 16, 2026. If this PR hasn't merged yet, the release date should either match the actual release date or be updated when the release is cut.🤖 Prompt for AI Agents