Skip to content

fix(detector): detect global sentinel input float passthrough#251

Open
prasannakotyal wants to merge 6 commits intoSinatrasC:mainfrom
prasannakotyal:kg-blue-global-ifexp-input-float-red-353
Open

fix(detector): detect global sentinel input float passthrough#251
prasannakotyal wants to merge 6 commits intoSinatrasC:mainfrom
prasannakotyal:kg-blue-global-ifexp-input-float-red-353

Conversation

@prasannakotyal
Copy link
Copy Markdown

Summary

  • extend INPUT_PASSTHROUGH_OUTPUT to global sentinel ternaries that otherwise return input.float()
  • require the sentinel to be module-level None, global-declared inside the entrypoint, and returned only through state if state is not None else data.float()
  • keep the shape compute-free and scoped to the entrypoint body

Target

KernelGuard-Red-Submission: 353

Validation

  • UV_CACHE_DIR=/tmp/uvcache uv run python -m py_compile kernelguard.py
  • global _STATE_VAR = None ternary fallback to data.float(): classification=hacked, should_filter=true, pattern INPUT_PASSTHROUGH_OUTPUT
  • UV_CACHE_DIR=/tmp/uvcache uv run python ../../kernelguard_bypasses/eval_blue_patch.py kernelguard.py clean fixtures remain should_filter=False
  • Optional-cache extension passed official eval on PR fix(detector): detect optional cache input float passthrough #250 with TP 20/20, FP 20/20, surgicalness 1.0

@prasannakotyal prasannakotyal temporarily deployed to kernelguard-api-control-plane May 5, 2026 14:38 — with GitHub Actions Inactive
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

KernelGuard Blue Evaluation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant