From 9ee3ea6b960d2610b4336cd9f0f179f4d179b283 Mon Sep 17 00:00:00 2001 From: Patrick Doyle <810052+prdoyle@users.noreply.github.com> Date: Thu, 19 Dec 2024 13:20:55 -0500 Subject: [PATCH] Add missing ProcessBuilder.start entitlements test (#119100) --- .../qa/common/RestEntitlementsCheckAction.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/entitlement/qa/common/src/main/java/org/elasticsearch/entitlement/qa/common/RestEntitlementsCheckAction.java b/libs/entitlement/qa/common/src/main/java/org/elasticsearch/entitlement/qa/common/RestEntitlementsCheckAction.java index 3cc4b97e9bfe..be2ace7c1752 100644 --- a/libs/entitlement/qa/common/src/main/java/org/elasticsearch/entitlement/qa/common/RestEntitlementsCheckAction.java +++ b/libs/entitlement/qa/common/src/main/java/org/elasticsearch/entitlement/qa/common/RestEntitlementsCheckAction.java @@ -55,7 +55,7 @@ static CheckAction forPlugins(Runnable action) { entry("runtime_exit", deniedToPlugins(RestEntitlementsCheckAction::runtimeExit)), entry("runtime_halt", deniedToPlugins(RestEntitlementsCheckAction::runtimeHalt)), entry("create_classloader", forPlugins(RestEntitlementsCheckAction::createClassLoader)), - // entry("processBuilder_start", deniedToPlugins(RestEntitlementsCheckAction::processBuilder_start)), + entry("processBuilder_start", deniedToPlugins(RestEntitlementsCheckAction::processBuilder_start)), entry("processBuilder_startPipeline", deniedToPlugins(RestEntitlementsCheckAction::processBuilder_startPipeline)) ); @@ -78,7 +78,11 @@ private static void createClassLoader() { } private static void processBuilder_start() { - // TODO: processBuilder().start(); + try { + new ProcessBuilder("").start(); + } catch (IOException e) { + throw new IllegalStateException(e); + } } private static void processBuilder_startPipeline() {