semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

[Feature] Official HOL Guard FunctionInvocationFilter security sample

Open kantorcodes opened this issue 3 months ago • 3 comments

Proposal

Add a small official Semantic Kernel sample/docs example that integrates HOL Guard at the existing IFunctionInvocationFilter boundary. This is not a request for a new generic filter API.

Semantic Kernel already demonstrates that an invocation filter can prevent execution by not calling next(context) in the FunctionInvocationApproval sample. HOL Guard can use that same boundary to evaluate a function invocation locally before execution.

Suggested sample behavior

  • install/configure HOL Guard explicitly in the sample
  • register a HolGuardFunctionInvocationFilter : IFunctionInvocationFilter
  • send the function name + arguments to the local HOL Guard decision path before next(context)
  • allow -> call next(context) exactly once
  • deny -> return a blocked result and never execute the underlying function
  • review -> require an explicit host approval callback; otherwise fail closed
  • timeout/unavailable/malformed/ambiguous Guard response -> fail closed
  • keep HOL Guard Cloud optional; local-only use should work without a Cloud login

Existing implementation evidence

We already maintain a small Semantic Kernel adapter and real invocation-contract tests here: https://github.com/hashgraph-online/hol-guard-plugin/pull/52

That proof is pinned against Semantic Kernel and tests allow/deny/review/unavailable paths, including zero downstream execution on deny. I’m proposing only an official Semantic Kernel sample/docs placement so users can discover and apply HOL Guard through the framework’s existing supported filter seam.

If this placement makes sense, I can follow the project’s fork-first workflow and keep the PR limited to the agreed sample/docs scope.

kantorcodes avatar Aug 23 '26 18:08 kantorcodes

I'll work on this. Could you assign it to me?

I'll pin a regression test (or stabilize the flake) and keep the change small.

modelpath-dev avatar Sep 04 '26 08:09 modelpath-dev

I’m still planning to work on this. Let me know if there are any updates or specific guidelines I should follow for the sample.

modelpath-dev avatar Sep 06 '26 09:09 modelpath-dev

I’m still on track to work on this. If there are any new guidelines or updates for the sample, please let me know.

modelpath-dev avatar Sep 08 '26 10:09 modelpath-dev