From 47fefe7e2da2e8e6d827f5ab52808b3599260c0c Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Fri, 28 May 2021 20:07:03 +0200 Subject: [PATCH] schema/v2: restrict input names Ensure that input names start with a character and otherwise only contain characters, numbers, `-`, `_` and `.`. Limit their length to 255. --- schemas/osbuild2.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/schemas/osbuild2.json b/schemas/osbuild2.json index 04645913..4e258810 100644 --- a/schemas/osbuild2.json +++ b/schemas/osbuild2.json @@ -18,8 +18,11 @@ "inputs": { "title": "Collection of inputs for a stage", - "additionalProperties": { - "$ref": "#/definitions/input" + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z][a-zA-Z0-9_\\-\\.]{0,254}": { + "$ref": "#/definitions/input" + } } },