From 80bcbbf022880c5177f8130118778ab22914b0bf Mon Sep 17 00:00:00 2001 From: Praneet Tenkila <67573804+praneet390@users.noreply.github.com> Date: Fri, 6 Feb 2026 23:18:43 +0530 Subject: [PATCH] Hardening note: avoid shell-based popen in InspectFile operator --- src/operators/inspect_file.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/operators/inspect_file.cc b/src/operators/inspect_file.cc index 28c9c072a..063e6bd14 100644 --- a/src/operators/inspect_file.cc +++ b/src/operators/inspect_file.cc @@ -63,6 +63,12 @@ bool InspectFile::evaluate(Transaction *transaction, const std::string &str) { std::string res; std::string openstr; + // SECURITY HARDENING NOTE: + // popen() executes via shell with concatenated arguments. + // Current inputs are engine-controlled, but replacing this + // with argv-based exec/spawn would remove shell parsing risk. + + openstr.append(m_param); openstr.append(" "); openstr.append(str);