From 8c02946c99797b2627d60b630b7e525ce12b9bdb Mon Sep 17 00:00:00 2001 From: Kirill Gontar Date: Thu, 2 Oct 2025 21:27:23 +0200 Subject: [PATCH 1/4] Trigger build --- osquery/main/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osquery/main/main.cpp b/osquery/main/main.cpp index 37200c53354..3bafd12a089 100644 --- a/osquery/main/main.cpp +++ b/osquery/main/main.cpp @@ -4,7 +4,7 @@ * This source code is licensed as defined by the LICENSE file found in the * root directory of this source tree. * - * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only) + * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only */ #ifdef WIN32 From e63f858dd59214438f043c5833a5c7fcf9f50d64 Mon Sep 17 00:00:00 2001 From: Kirill Gontar Date: Thu, 2 Oct 2025 21:43:14 +0200 Subject: [PATCH 2/4] Fixes --- osquery/filesystem/filesystem.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osquery/filesystem/filesystem.cpp b/osquery/filesystem/filesystem.cpp index 0751d5d0521..e6240303f11 100644 --- a/osquery/filesystem/filesystem.cpp +++ b/osquery/filesystem/filesystem.cpp @@ -612,7 +612,8 @@ bool safePermissions(const fs::path& dir, result = fd.isExecutable(); // Otherwise, require matching or root file ownership. - if (executable && (result.getCode() > 0 || !fd.hasSafePermissions().ok())) { + // TODO: Remove permissions check skip after openframe agent will support setting safe permissions. + if (executable && (result.getCode() > 0 || (!FLAGS_openframe_mode && !fd.hasSafePermissions().ok()))) { // Require executable, implies by the owner. return false; } From febbb1ee586691018dd3bcc5b1bc78971e363a1c Mon Sep 17 00:00:00 2001 From: Kirill Gontar Date: Thu, 2 Oct 2025 21:45:58 +0200 Subject: [PATCH 3/4] Fixes --- osquery/filesystem/filesystem.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osquery/filesystem/filesystem.cpp b/osquery/filesystem/filesystem.cpp index e6240303f11..882ba73fe31 100644 --- a/osquery/filesystem/filesystem.cpp +++ b/osquery/filesystem/filesystem.cpp @@ -46,6 +46,8 @@ FLAG(uint64, read_max, 50 * 1024 * 1024, "Maximum file read size"); /// See reference #1382 for reasons why someone would allow unsafe. HIDDEN_FLAG(bool, allow_unsafe, false, "Allow unsafe executable permissions"); +DECLARE_bool(openframe_mode); + namespace { const size_t kMaxRecursiveGlobs = 64; From 7640dd51f0cc43e8e983383f95fe268326139c83 Mon Sep 17 00:00:00 2001 From: Kirill Gontar Date: Thu, 2 Oct 2025 21:47:20 +0200 Subject: [PATCH 4/4] Roll --- osquery/main/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osquery/main/main.cpp b/osquery/main/main.cpp index 3bafd12a089..37200c53354 100644 --- a/osquery/main/main.cpp +++ b/osquery/main/main.cpp @@ -4,7 +4,7 @@ * This source code is licensed as defined by the LICENSE file found in the * root directory of this source tree. * - * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only + * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only) */ #ifdef WIN32