Initial: Node-RED flow validator with conftest/Rego

- Declarative YAML flow format
- Python flow2json converter with auto-positioning
- Rego policies: 14 validation rules for flow integrity
- Conftest integration
- justfile workflow: generate → validate → deploy
This commit is contained in:
2026-06-30 19:15:45 -07:00
commit ca1c7eda26
6 changed files with 596 additions and 0 deletions
+132
View File
@@ -0,0 +1,132 @@
[
{
"id": "br1f38755c",
"z": "",
"type": "mqtt-broker",
"name": "mosquitto",
"broker": "mosquitto",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"willTopic": "",
"willQos": "0",
"willPayload": ""
},
{
"id": "t66ef1944",
"z": "",
"type": "ui_tab",
"name": "Home",
"icon": "dashboard",
"order": 1,
"disabled": false,
"hidden": false
},
{
"id": "gc40a46a5",
"z": "t66ef1944",
"type": "ui_group",
"name": "Zigbee",
"tab": "t66ef1944",
"order": 1,
"disp": true,
"width": "6"
},
{
"id": "zigbee-in",
"z": "f44444498",
"type": "mqtt-in",
"name": "",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"datatype": "auto",
"x": 170,
"y": 80,
"broker": "br1f38755c",
"topic": "zigbee2mqtt/#",
"qos": "2",
"wires": [
[
"debug",
"last-msg"
]
]
},
{
"id": "debug",
"z": "f44444498",
"type": "debug",
"name": "Debug",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 770,
"y": 80
},
{
"id": "last-msg",
"z": "f44444498",
"type": "ui-text",
"name": "Text",
"width": "6",
"height": "2",
"layout": "row-spread",
"x": 770,
"y": 80,
"group": "gc40a46a5",
"format": "{{msg.payload|json}}"
},
{
"id": "permit-btn",
"z": "f44444498",
"type": "ui-button",
"name": "Permit Join (60s)",
"width": "3",
"height": "1",
"payloadType": "json",
"x": 170,
"y": 220,
"group": "gc40a46a5",
"payload": "{\"value\": true, \"time\": 60}",
"topic": "zigbee2mqtt/bridge/request/permit_join",
"wires": [
[
"mqtt-out"
]
]
},
{
"id": "mqtt-out",
"z": "f44444498",
"type": "mqtt-out",
"name": "",
"qos": "2",
"retain": false,
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"x": 770,
"y": 220,
"broker": "br1f38755c",
"topic": ""
}
]