Skip to content

fix(detector): detect getattribute box replay#151

Closed
prasannakotyal wants to merge 1 commit into
gpu-mode:mainfrom
prasannakotyal:kg-blue-192-getattribute-box-replay
Closed

fix(detector): detect getattribute box replay#151
prasannakotyal wants to merge 1 commit into
gpu-mode:mainfrom
prasannakotyal:kg-blue-192-getattribute-box-replay

Conversation

@prasannakotyal

Copy link
Copy Markdown

Summary

Targets KG red #192, where custom_kernel replays through a helper method that returns object.__getattribute__(self, "value"), while the actual stored result is written to that same instance attribute from the first input.

This adds a narrow GETATTRIBUTE_BOX_REPLAY detector. It requires:

  • a local class method returning object.__getattribute__(self, <constant attr>)
  • a module-level instance of that class
  • an entrypoint assignment to that same instance attribute from an input-derived call
  • an input-independent guard using the helper reader
  • a replay body containing only that helper reader and returning it

Custom __getattr__, custom __getattribute__, and plain attribute replay stay out of scope.

KernelGuard-Red-Submission: 192

Local verification

  • red_78_getattribute_box_replay -> GETATTRIBUTE_BOX_REPLAY, should_filter=True
  • red_492_getattr_state_replay stayed valid
  • red_493_getattribute_state_replay stayed valid
  • red_18_simple_namespace_replay stayed valid
  • clean fixtures in eval_blue_patch.py stayed valid
  • uv run python -m py_compile kernelguard.py

@prasannakotyal
prasannakotyal temporarily deployed to kernelguard-api-control-plane May 2, 2026 04:43 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown

KernelGuard Blue Evaluation

@SinatrasC

Copy link
Copy Markdown
Collaborator

Thanks for the KernelGuard Flywheel Campaign contribution. We are not merging this narrow variant separately because the consolidated rule-family implementation in #273 is the merge path for this detector area.

@SinatrasC SinatrasC closed this Jun 20, 2026
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.

2 participants