Skip to content

Commit 9d77220

Browse files
authored
Remove some debug logs related to CEL processing (#907)
1 parent 5b80a8d commit 9d77220

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

Source/santad/SNTPolicyProcessor.mm

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -199,16 +199,12 @@ - (BOOL)evaluateCELFallbackExpressions:(SNTCachedDecision*)cd
199199
return NO;
200200
}
201201

202-
LOGD(@"Evaluating %zu CEL fallback rule(s) for sha256=%@", rules.size(), cd.sha256);
203-
204202
auto activation = activationCallback(/*useV2=*/true);
205203

206204
// Use a stack-local arena for evaluation temporaries.
207205
google::protobuf::Arena evalArena;
208206

209207
for (size_t i = 0; i < rules.size(); ++i) {
210-
LOGD(@"Evaluating CEL fallback rule %zu", i);
211-
212208
CELEvaluationResult celResult = [self evaluateCompiledCELExpression:rules[i].expression.get()
213209
useV2:true
214210
cachedDecision:cd
@@ -231,7 +227,6 @@ - (BOOL)evaluateCELFallbackExpressions:(SNTCachedDecision*)cd
231227
return YES;
232228
}
233229

234-
LOGD(@"All CEL fallback rules exhausted without a decision for sha256=%@", cd.sha256);
235230
return NO;
236231
}
237232

@@ -283,14 +278,11 @@ - (BOOL)evaluateCELFallbackExpressions:(SNTCachedDecision*)cd
283278
// V1 doesn't support TouchID, so cooldown is always nullopt
284279
}
285280

286-
LOGD(@"Ran CEL program and received result: %d (cacheable %d)", returnValue, cacheable);
287-
288281
SNTRuleState resultState;
289282
if (useV2) {
290283
using ReturnValue = santa::cel::CELProtoTraits<true>::ReturnValue;
291284
switch (static_cast<ReturnValue>(returnValue)) {
292285
case ReturnValue::UNSPECIFIED:
293-
LOGD(@"CEL expression returned UNSPECIFIED, skipping");
294286
return {.succeeded = false, .decisionMade = false, .resultState = {}};
295287
case ReturnValue::ALLOWLIST: resultState = SNTRuleStateAllow; break;
296288
case ReturnValue::ALLOWLIST_COMPILER: resultState = SNTRuleStateAllowCompiler; break;
@@ -344,8 +336,6 @@ - (CELEvaluationResult)evaluateCELExpressionForRule:(SNTRule*)rule
344336
bool useV2 = (rule.state == SNTRuleStateCELv2);
345337
auto activation = activationCallback(useV2);
346338

347-
LOGD(@"Evaluating CEL expression: %@", rule.celExpr);
348-
349339
google::protobuf::Arena arena;
350340

351341
if ((useV2 && !celEvaluatorV2_) || (!useV2 && !celEvaluatorV1_)) {

0 commit comments

Comments
 (0)