From 7b69b3fb975d7e6f3bfb50a97721476e3d6c9678 Mon Sep 17 00:00:00 2001 From: patrickryan01 Date: Sun, 29 Nov 2026 02:41:32 -0500 Subject: [PATCH 1/3] feat(defaults): i turned the deploy gate, the scan nodes, the exec node and plugins on by default with working allowlists, because nothing finished ships off and a list that starts empty is a feature that does not work --- README.md | 26 +++++++------ charts/hotloop-flow/values.yaml | 66 +++++++++++++++++++++++---------- docs/deploying.md | 8 ++-- internal/config/config.go | 57 ++++++++++++++++++++-------- internal/config/config_test.go | 55 ++++++++++++++++++++++----- 5 files changed, 153 insertions(+), 59 deletions(-) diff --git a/README.md b/README.md index f70a5a2..cdfa007 100644 --- a/README.md +++ b/README.md @@ -877,9 +877,10 @@ plant, and the memory goes back when it exits. The test proves it the hard way: the refused candidate has the same Link In, and after the refusal a message through the running flow's link still arrives. -Three decisions worth knowing. **It's off by default**, because a gate an -operator didn't ask for is a deploy that fails at 3 AM for a reason nobody on -shift has heard of. **Tests that can't run don't pass**: a child that won't +Three decisions worth knowing. **It's on by default.** With no suite beside the +flow file there is nothing to fail and the deploy goes through, saying it wasn't +checked; the day somebody writes a suite, every deploy runs it. Set +`tests.gate: false` to deploy without checking. **Tests that can't run don't pass**: a child that won't start or a run longer than `tests.timeout` refuses the deploy and says which. And **rollbacks aren't gated.** A rollback is how somebody gets out of a bad state, to one that already ran, and holding it up on today's tests is how an @@ -1281,8 +1282,9 @@ temp, fsync, rename, fsync the directory, three backups deep, so a power cut mid-save leaves you the old file or the new one, never half of each. If it ever reads a corrupt one, it falls back to a backup and says so out loud. -**The discovery nodes are off by default** and bounded by an operator-configured -CIDR allowlist. A hostname that resolves to one in-scope address and one +**The discovery nodes are on by default** and bounded by a CIDR allowlist that +starts as the private ranges a plant floor lives on, and that an operator +replaces with their own networks. A hostname that resolves to one in-scope address and one out-of-scope address is refused outright, because otherwise DNS is just the way around the allowlist. @@ -2188,12 +2190,12 @@ store: ackFlush: 100ms # how long a delivered message waits to be marked done; 0s marks each one first discovery: - enabled: false - allowedCIDRs: [] # enabled with this empty is a startup error + enabled: true + allowedCIDRs: [10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10, fc00::/7, 127.0.0.0/8, "::1/128"] # naming your own replaces these; enabled with this empty is a startup error exec: - enabled: false - allowedCommands: [] # enabled with this empty is a startup error + enabled: true + allowedCommands: [ping, curl, mbpoll, snmpget, snmpset, snmpwalk, date, hostname, uname, uptime, df, free, ls, cat, grep, jq, echo, "true"] # naming your own replaces these; enabled with this empty is a startup error files: allowedPaths: [] # extra trees on top of data.dir, which is always allowed @@ -2265,10 +2267,10 @@ Secret. | `HOTLOOP_FLOW_CONTEXT_PERSIST`, `HOTLOOP_FLOW_CONTEXT_FLUSH_INTERVAL` | Persistent context. `false` turns it off; the interval is a duration such as `30s`. | | `HOTLOOP_FLOW_TRACE_OTLP_HEADERS` | Headers for the collector, `Name=value` pairs separated by commas, added to any in the file. For an API key that has no business in a ConfigMap. | | `HOTLOOP_FLOW_DURABLE_MAX_BYTES`, `HOTLOOP_FLOW_DURABLE_ACK_FLUSH` | The disk quota for durable wires, and how long a delivered message waits to be marked done. | -| `HOTLOOP_FLOW_TESTS_GATE` | `true` turns on the [deploy gate](#the-deploy-gate). | +| `HOTLOOP_FLOW_TESTS_GATE` | The [deploy gate](#the-deploy-gate), on by default; `false` turns it off. | | `HOTLOOP_FLOW_LOG_LEVEL`, `HOTLOOP_FLOW_LOG_FORMAT` | Logging. | -| `HOTLOOP_FLOW_DISCOVERY_ENABLED`, `HOTLOOP_FLOW_DISCOVERY_CIDRS` | Discovery nodes. Comma-separated CIDRs. | -| `HOTLOOP_FLOW_EXEC_ENABLED`, `HOTLOOP_FLOW_EXEC_ALLOWED_COMMANDS` | The exec node. Comma-separated commands. | +| `HOTLOOP_FLOW_DISCOVERY_ENABLED`, `HOTLOOP_FLOW_DISCOVERY_CIDRS` | Discovery nodes, on by default; `false` turns them off. Comma-separated CIDRs replace the default private ranges. | +| `HOTLOOP_FLOW_EXEC_ENABLED`, `HOTLOOP_FLOW_EXEC_ALLOWED_COMMANDS` | The exec node, on by default; `false` turns it off. Comma-separated commands replace the default field tools. | | `HOTLOOP_FLOW_PLUGINS_DIR`, `HOTLOOP_FLOW_PLUGIN_TRUSTED_KEYS` | Where plugins are, and the publisher keys to trust. Comma-separated keys. | | `HOTLOOP_FLOW_PLUGIN_GRANTS` | What plugins may use: `name=cap,cap;name=cap`. | | `HOTLOOP_FLOW_PLUGIN_MAX_MEMORY_MIB`, `HOTLOOP_FLOW_PLUGIN_MAX_TIMEOUT` | The ceilings on a plugin node's memory and per-message time. | diff --git a/charts/hotloop-flow/values.yaml b/charts/hotloop-flow/values.yaml index 8513315..74690ee 100644 --- a/charts/hotloop-flow/values.yaml +++ b/charts/hotloop-flow/values.yaml @@ -135,19 +135,29 @@ bindToInterface: netRaw: false # ── Discovery ──────────────────────────────────────────────────────────────── -# The scan nodes. Off by default: this is a plant-floor inventory tool, not a -# scanner anybody with edit access can aim anywhere. Enabling it without listing -# the networks it may probe is a startup error, not a licence to scan the world. +# The scan nodes, on. They probe only the networks listed here, which by default +# are the private ranges a plant floor lives on (nothing public), so a scan +# cannot be aimed at the internet from an edit dialog. Name your own networks to +# replace the list. An empty list with discovery enabled is a startup error, not +# a licence to scan the world. # # It needs no extra capability: scan only makes TCP connections and netinfo only # reads the interface list, so the pod keeps every capability dropped either way. discovery: - enabled: false - allowedCIDRs: [] + enabled: true + allowedCIDRs: + - 10.0.0.0/8 + - 172.16.0.0/12 + - 192.168.0.0/16 + - 100.64.0.0/10 + - fc00::/7 + - 127.0.0.0/8 + - ::1/128 # ── The exec node ──────────────────────────────────────────────────────────── -# Off by default, and enabling it without listing the commands is a startup -# error rather than a licence to run anything. +# On, with a short list of the field tools a plant flow reaches for. An empty +# list with the node enabled is a startup error rather than a licence to run +# anything. Name your own commands to replace the list. # # Node-RED's exec node runs anything, and Node-RED starts with no authentication # by default. Pilz shipped exactly that on a device and it became CVE-2025-41656 @@ -161,10 +171,27 @@ discovery: # the PATH yet is kept and resolved again when a flow uses it, so an init # container or a mounted volume can supply it after start-up. exec: - enabled: false - allowedCommands: [] - # e.g. - # - /usr/bin/mbpoll + enabled: true + allowedCommands: + - ping + - curl + - mbpoll + - snmpget + - snmpset + - snmpwalk + - date + - hostname + - uname + - uptime + - df + - free + - ls + - cat + - grep + - jq + - echo + - "true" + # Add the commands your plant has, by name or absolute path, e.g. # - /opt/plant/bin/reset-line # ── The file nodes ─────────────────────────────────────────────────────────── @@ -203,11 +230,11 @@ secrets: allowedPaths: [] # ── Plugins ────────────────────────────────────────────────────────────────── -# Signed WebAssembly plugins, see docs/plugins.md. Off renders nothing, and the -# binary loads nothing. On with no trusted keys, every plugin is refused: a key -# is what you are saying yes to. +# Signed WebAssembly plugins, see docs/plugins.md. On: the plugin directory is +# read and a plugin signed by a key listed under trustedKeys loads. With no +# trusted keys every plugin is refused: a key is what you are saying yes to. plugins: - enabled: false + enabled: true # Where plugin directories are read from. Empty means plugins/ inside the data # directory, or mountPath when a volume is set below. dir: "" @@ -401,10 +428,11 @@ audit: # ── Flow tests ─────────────────────────────────────────────────────────────── tests: - # true refuses a deploy whose flows fail /data/flows.test.yaml. Off by - # default: a gate nobody asked for fails a deploy at 3 AM for a reason - # nobody on shift has heard of. - gate: false + # true refuses a deploy whose flows fail /data/flows.test.yaml. On: with no + # suite there is nothing to fail and the deploy goes through, saying it was not + # checked; with one, a deploy that fails it is refused, and a rollback is never + # gated. Set false to deploy without checking. + gate: true timeout: 2m # wall clock for one run of the suite # ── Authentication ─────────────────────────────────────────────────────────── diff --git a/docs/deploying.md b/docs/deploying.md index c656ed8..151df73 100644 --- a/docs/deploying.md +++ b/docs/deploying.md @@ -174,12 +174,12 @@ On a pod you run yourself, mount the PEM and set `HOTLOOP_FLOW_ASSERTION_PUBLIC_ | `stations.dashboardUrl`, `stations.tenant`, `stations.dashboardTokenSecret.name`, `.key`, `stations.deployTokenSecret.name`, `.key` | empty, empty, empty, `token`, empty, `token` | Push one flow file to every Flow install the tenant runs in EmberNet, with a check after each ([stations.md](stations.md)). All four of the dashboard, the tenant and the two Secret names are set or none is; a render with some of them is refused. Each Secret holds one token and is mounted as a file, never put in the ConfigMap. The deploy token is the one the stations accept and needs `flows.read`, `flows.write` and `status.read`. | | `failover.urlSecret.name`, `.key`, `failover.name`, `failover.ttl`, `failover.renewEvery`, `failover.writeMargin` | empty, `url`, `flow`, `15s`, a third of the ttl, `5s` | A failover pair: two installs share a lease in a PostgreSQL, one writes to equipment and the other holds its writes until it takes over ([failover.md](failover.md)). Off until the Secret is named. The Secret's key holds the PostgreSQL URL and is mounted as a file, never put in the ConfigMap. | | `audit.maxBytes`, `audit.keep` | 16 MiB, `4` | When `/data/audit.log` rotates, and how many rotated files stay beside it. | -| `tests.gate`, `tests.timeout` | off, `2m` | `true` refuses a deploy whose flows fail `/data/flows.test.yaml`. Off by default, because a gate nobody asked for fails a deploy at 3 AM for a reason nobody on shift has heard of. | -| `discovery.enabled`, `discovery.allowedCIDRs` | off, empty | The scan nodes. Enabled with an empty list refuses to start. | -| `exec.enabled`, `exec.allowedCommands` | off, empty | The exec node. Same rule. | +| `tests.gate`, `tests.timeout` | on, `2m` | `true` refuses a deploy whose flows fail `/data/flows.test.yaml`. With no suite there is nothing to fail and the deploy goes through. `false` deploys without checking. | +| `discovery.enabled`, `discovery.allowedCIDRs` | on, the private ranges | The scan nodes, bounded by the list. Name your own networks to replace it. Enabled with an empty list refuses to start. | +| `exec.enabled`, `exec.allowedCommands` | on, a short list of field tools | The exec node. Name your own commands to replace the list. Same rule. | | `files.allowedPaths` | empty | Extra trees the file nodes may reach beyond `/data`. | | `secrets.mounts` | empty | Secrets to mount read-only, each `{secretName, mountPath}`, for a tls-config's files and `ew_credentialFiles`. Each path joins the secret scope and never the file nodes'. | -| `plugins.enabled` | off | [Plugins](plugins.md). Off renders nothing. On, with `plugins.trustedKeys` empty, every plugin is refused. | +| `plugins.enabled` | on | [Plugins](plugins.md). On, with `plugins.trustedKeys` empty, every plugin is refused. | | `plugins.trustedKeys`, `plugins.grants` | empty | The publisher keys to believe, and what each plugin may use by name (`clock`, `random`, `context.flow`, `context.global`). A flow using a plugin that asks for more fails the deploy. | | `plugins.maxMemoryMiB`, `plugins.maxTimeout` | `64`, `5s` | The most memory and the longest time any one plugin node can be given. | | `plugins.volume`, `plugins.mountPath`, `plugins.dir` | empty, `/etc/hotloop-flow/plugins`, empty | How the plugin files arrive. No volume: copy them into `plugins/` on the data volume. A volume is any Kubernetes volume source (an existing claim, a ConfigMap, a Secret), mounted read-only at `mountPath`, and `dir` follows it. | diff --git a/internal/config/config.go b/internal/config/config.go index 5648ac1..41b4519 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -436,6 +436,30 @@ type StoreDurable struct { AckFlush time.Duration `yaml:"ackFlush"` } +// DefaultDiscoveryCIDRs are the networks the scan nodes may probe when nobody +// has named any: the private ranges a plant floor lives on (RFC 1918, the shared +// 100.64.0.0/10 range overlay networks use, and IPv6 unique local) and this +// machine itself. Nothing public is on it, so a flow cannot aim a scan at the +// internet, and an operator who names their own networks replaces it. +func DefaultDiscoveryCIDRs() []string { + return []string{ + "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "100.64.0.0/10", + "fc00::/7", "127.0.0.0/8", "::1/128", + } +} + +// DefaultExecCommands are the commands the exec node may run when nobody has +// named any: the field tools a plant flow reaches for, each matched on the +// resolved path of the one on the PATH. There is no shell in the list, so none +// of them can be chained into an arbitrary command, and an operator who names +// their own commands replaces it. +func DefaultExecCommands() []string { + return []string{ + "ping", "curl", "mbpoll", "snmpget", "snmpset", "snmpwalk", "date", "hostname", + "uname", "uptime", "df", "free", "ls", "cat", "grep", "jq", "echo", "true", + } +} + // Discovery gates the network discovery nodes. type Discovery struct { Enabled bool `yaml:"enabled"` @@ -448,8 +472,9 @@ type Discovery struct { // Exec gates the exec node. // -// Off by default, and an enabled node with no allowed commands is a -// configuration error rather than "anything goes". In Node-RED nothing sits +// On by default with a short list of field tools (DefaultExecCommands), and an +// enabled node with no allowed commands is a configuration error rather than +// "anything goes". In Node-RED nothing sits // between "can edit a flow" and "can run any command": the exec node runs // whatever it is given, through a shell. Put that behind a default with no // authentication and you get CVE-2025-41656, Pilz shipping Node-RED on a @@ -571,13 +596,15 @@ func Default() Config { Context: StoreContext{Persist: true, FlushInterval: 30 * time.Second}, Durable: StoreDurable{MaxBytes: 256 << 20, AckFlush: 100 * time.Millisecond}, }, - Logging: Logging{Level: "info", Format: "text"}, - Metrics: Metrics{Enabled: true, Path: "/metrics"}, - History: History{Retain: 100}, - Audit: Audit{MaxBytes: 16 << 20, Keep: 4}, - Tests: Tests{Timeout: 2 * time.Minute}, - Plugins: Plugins{MaxMemoryMiB: 64, MaxTimeout: 5 * time.Second}, - Failover: Failover{Name: "flow", TTL: 15 * time.Second, WriteMargin: 5 * time.Second}, + Logging: Logging{Level: "info", Format: "text"}, + Metrics: Metrics{Enabled: true, Path: "/metrics"}, + History: History{Retain: 100}, + Audit: Audit{MaxBytes: 16 << 20, Keep: 4}, + Tests: Tests{Gate: true, Timeout: 2 * time.Minute}, + Discovery: Discovery{Enabled: true, AllowedCIDRs: DefaultDiscoveryCIDRs()}, + Exec: Exec{Enabled: true, AllowedCommands: DefaultExecCommands()}, + Plugins: Plugins{MaxMemoryMiB: 64, MaxTimeout: 5 * time.Second}, + Failover: Failover{Name: "flow", TTL: 15 * time.Second, WriteMargin: 5 * time.Second}, Trace: Trace{ Enabled: true, Traces: 256, MaxHops: 512, MaxMessageBytes: 16 << 10, MaxBytes: 16 << 20, PerSecond: 1000, OTLP: OTLP{ServiceName: "hotloop-flow", Interval: 2 * time.Second}, @@ -702,8 +729,8 @@ func applyEnv(cfg *Config) { }) } - if envBool("HOTLOOP_FLOW_TESTS_GATE") { - cfg.Tests.Gate = true + if os.Getenv("HOTLOOP_FLOW_TESTS_GATE") != "" { + cfg.Tests.Gate = envBool("HOTLOOP_FLOW_TESTS_GATE") } if envBool("HOTLOOP_FLOW_INSECURE") { cfg.Auth.Enabled = false @@ -712,8 +739,8 @@ func applyEnv(cfg *Config) { if envBool("HOTLOOP_FLOW_ALLOW_PLAINTEXT_CREDENTIALS") { cfg.Data.AllowPlaintextCredentials = true } - if envBool("HOTLOOP_FLOW_DISCOVERY_ENABLED") { - cfg.Discovery.Enabled = true + if os.Getenv("HOTLOOP_FLOW_DISCOVERY_ENABLED") != "" { + cfg.Discovery.Enabled = envBool("HOTLOOP_FLOW_DISCOVERY_ENABLED") } if v := os.Getenv("HOTLOOP_FLOW_DISCOVERY_CIDRS"); v != "" { cfg.Discovery.AllowedCIDRs = splitList(v) @@ -747,8 +774,8 @@ func applyEnv(cfg *Config) { cfg.Plugins.MaxTimeout = d } } - if envBool("HOTLOOP_FLOW_EXEC_ENABLED") { - cfg.Exec.Enabled = true + if os.Getenv("HOTLOOP_FLOW_EXEC_ENABLED") != "" { + cfg.Exec.Enabled = envBool("HOTLOOP_FLOW_EXEC_ENABLED") } if v := os.Getenv("HOTLOOP_FLOW_EXEC_ALLOWED_COMMANDS"); v != "" { cfg.Exec.AllowedCommands = splitList(v) diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 722e74b..991e154 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -2,6 +2,7 @@ package config import ( "errors" + "net" "os" "path/filepath" "strings" @@ -196,14 +197,50 @@ func TestPlaintextCredentialsNeedTheirOwnOptIn(t *testing.T) { } } +// The scan nodes and the exec node are on out of the box, each with a working +// allowlist: the private ranges a plant lives on, and a short list of field +// tools. An operator names their own and replaces it, or turns the node off. +func TestDiscoveryAndExecAreOnWithWorkingAllowlists(t *testing.T) { + clearEnv(t) + withAdmin(t) + cfg, err := Load("") + if err != nil { + t.Fatal(err) + } + if !cfg.Discovery.Enabled || len(cfg.Discovery.AllowedCIDRs) == 0 { + t.Errorf("discovery by default: %+v", cfg.Discovery) + } + for _, c := range cfg.Discovery.AllowedCIDRs { + if _, _, err := net.ParseCIDR(c); err != nil { + t.Errorf("the default network %q is not a CIDR: %v", c, err) + } + if c == "0.0.0.0/0" || c == "::/0" { + t.Errorf("the default allows the whole internet: %s", c) + } + } + if !cfg.Exec.Enabled || len(cfg.Exec.AllowedCommands) == 0 { + t.Errorf("exec by default: %+v", cfg.Exec) + } + for _, c := range cfg.Exec.AllowedCommands { + if c == "sh" || c == "bash" || c == "env" { + t.Errorf("the default exec list has %q, which runs any command", c) + } + } + t.Setenv("HOTLOOP_FLOW_DISCOVERY_ENABLED", "false") + t.Setenv("HOTLOOP_FLOW_EXEC_ENABLED", "false") + if cfg, err = Load(""); err != nil || cfg.Discovery.Enabled || cfg.Exec.Enabled { + t.Errorf("turned off from the environment: %v %+v %+v", err, cfg.Discovery, cfg.Exec) + } +} + func TestRefusesDiscoveryWithNoAllowlist(t *testing.T) { clearEnv(t) withAdmin(t) - t.Setenv("HOTLOOP_FLOW_DISCOVERY_ENABLED", "true") - _, err := Load("") + _, err := Load(writeConfig(t, "discovery:\n enabled: true\n allowedCIDRs: []\n")) if err == nil || !strings.Contains(err.Error(), "discovery.allowedCIDRs is empty") { t.Fatalf("err = %v, want discovery with an empty allowlist refused", err) } + t.Setenv("HOTLOOP_FLOW_DISCOVERY_ENABLED", "true") t.Setenv("HOTLOOP_FLOW_DISCOVERY_CIDRS", "10.20.0.0/24, 10.21.0.0/24") cfg, err := Load("") if err != nil { @@ -217,7 +254,7 @@ func TestRefusesDiscoveryWithNoAllowlist(t *testing.T) { func TestRefusesExecWithNoAllowlist(t *testing.T) { clearEnv(t) withAdmin(t) - _, err := Load(writeConfig(t, "exec:\n enabled: true\n")) + _, err := Load(writeConfig(t, "exec:\n enabled: true\n allowedCommands: []\n")) if err == nil || !strings.Contains(err.Error(), "exec.allowedCommands is empty") { t.Fatalf("err = %v, want exec with an empty allowlist refused", err) } @@ -399,7 +436,7 @@ func TestSecretAllowedPathsFromFileAndEnv(t *testing.T) { } } -// The deploy gate is off unless somebody turns it on, from the file or the +// The deploy gate is on unless somebody turns it off, from the file or the // environment, and its suite sits beside the flow file under the flow file's // name. func TestTheTestsGate(t *testing.T) { @@ -409,16 +446,16 @@ func TestTheTestsGate(t *testing.T) { if err != nil { t.Fatal(err) } - if cfg.Tests.Gate || cfg.Tests.Timeout <= 0 { - t.Fatalf("defaults: %+v, want the gate off and a timeout", cfg.Tests) + if !cfg.Tests.Gate || cfg.Tests.Timeout <= 0 { + t.Fatalf("defaults: %+v, want the gate on and a timeout", cfg.Tests) } if got := filepath.Base(cfg.TestsPath()); got != "flows.test.yaml" { t.Errorf("TestsPath = %s, want flows.test.yaml beside flows.json", got) } - t.Setenv("HOTLOOP_FLOW_TESTS_GATE", "true") - if cfg, err = Load(""); err != nil || !cfg.Tests.Gate { - t.Fatalf("HOTLOOP_FLOW_TESTS_GATE=true: %v %+v", err, cfg.Tests) + t.Setenv("HOTLOOP_FLOW_TESTS_GATE", "false") + if cfg, err = Load(""); err != nil || cfg.Tests.Gate { + t.Fatalf("HOTLOOP_FLOW_TESTS_GATE=false: %v %+v", err, cfg.Tests) } t.Setenv("HOTLOOP_FLOW_TESTS_GATE", "") From 970ba9e08ed00e21e5c053fde0a7261a91681325 Mon Sep 17 00:00:00 2001 From: patrickryan01 Date: Sun, 29 Nov 2026 21:35:29 -0500 Subject: [PATCH 2/3] test: i turned the deploy gate off for the editor's shared test server and rewrote the chart plugins test for plugins on, because the gate now defaults on and the specs share one data directory --- internal/config/chart_test.go | 18 +++++++++++++----- web/e2e/server.mjs | 4 ++++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/internal/config/chart_test.go b/internal/config/chart_test.go index 35eb39c..feb4ba5 100644 --- a/internal/config/chart_test.go +++ b/internal/config/chart_test.go @@ -182,12 +182,20 @@ func TestChartHistoryAuditAndTestsValuesReachTheConfig(t *testing.T) { } } -// A default render has no plugin settings and no plugin volume, so an instance -// that doesn't use plugins gets exactly the objects it got before they existed. -func TestChartPluginsAreOffByDefault(t *testing.T) { +// A default render has plugins on, with no trusted key (so every plugin is +// refused until a person names one) and no plugin volume: the directory is the +// one inside the data volume. +func TestChartPluginsAreOnByDefaultWithNoKeyAndNoVolume(t *testing.T) { render := helmRender(t) - if bytes.Contains(render, []byte("plugins:")) || bytes.Contains(render, []byte("name: plugins")) { - t.Errorf("a default render carries plugin settings:\n%s", render) + got := loadRendered(t, configFromRender(t, render)).Plugins + if !bytes.Contains(render, []byte("plugins:")) { + t.Errorf("a default render leaves plugins off:\n%s", render) + } + if len(got.TrustedKeys) != 0 { + t.Errorf("a default render trusts keys %v", got.TrustedKeys) + } + if bytes.Contains(render, []byte("name: plugins")) { + t.Errorf("a default render mounts a plugin volume:\n%s", render) } } diff --git a/web/e2e/server.mjs b/web/e2e/server.mjs index 300fdbb..37155c2 100644 --- a/web/e2e/server.mjs +++ b/web/e2e/server.mjs @@ -43,6 +43,10 @@ auth: permissions: ["*"] logging: level: warn +# The specs share one server and one data directory, and tests.spec.ts leaves a suite in it; with the deploy gate on +# (its default) every later spec would deploy against that suite. The gate has its own tests in internal/. +tests: + gate: false `); const child = spawn(bin, ['-config', config], { stdio: 'inherit' }); From 8f84fc1ea917866292b16eed403934798fd18571 Mon Sep 17 00:00:00 2001 From: patrickryan01 Date: Sun, 29 Nov 2026 21:42:10 -0500 Subject: [PATCH 3/3] ci: i renamed the plugins chart test in the workflow's list, because plugins are on by default now and the old name said off --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c7b469..960033d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -651,7 +651,7 @@ jobs: echo "::error::a chart config test skipped"; exit 1 fi for t in TestChartDefaultsAreTheConfigDefaults TestChartTraceAndStoreValuesReachTheConfig \ - TestChartPluginsAreOffByDefault TestChartPluginsValuesReachTheConfig \ + TestChartPluginsAreOnByDefaultWithNoKeyAndNoVolume TestChartPluginsValuesReachTheConfig \ TestChartFailoverIsOffByDefaultAndItsValuesReachTheConfig; do echo "$OUT" | grep -q -- "--- PASS: $t" || { echo "::error::$t did not pass"; exit 1; } done