Skip to content

Fix WithHandler semgrep false positive#418

Draft
proboscis wants to merge 1 commit into
mainfrom
reactor/doeff-impl-pr-human-review-hyp-158
Draft

Fix WithHandler semgrep false positive#418
proboscis wants to merge 1 commit into
mainfrom
reactor/doeff-impl-pr-human-review-hyp-158

Conversation

@proboscis
Copy link
Copy Markdown
Owner

概要

HYP-158 の実装です。doeff-withhandler-no-return-clausedoeff/program.py の互換 shim 内部引き渡しを誤検出しないようにしつつ、外部の旧 WithHandler 呼び出し禁止は維持しました。

PR説明図

変更内容

  • .semgrep.yaml_WithHandlerNode(h, body, *args, **kwargs) の shim 転送 1 行だけを除外
  • tests/semgrep/fixtures/python/doeff/withhandler_return_clause_sample.py と semgrep pytest を追加し、return_clause 指定・3 番目位置引数・doeff_vm.WithHandler 旧形式が引き続き検出されることを固定

確認したこと

  • semgrep --config .semgrep.yaml --include 'doeff/program.py' doeff/
  • uv run pytest tests/semgrep/test_vm_failfast_semgrep_rules.py -q
  • uv run pytest tests/public_api/test_types_001_validation.py -q
  • git diff --check --cached / uv run ruff check tests/semgrep/test_vm_failfast_semgrep_rules.py tests/semgrep/fixtures/python/doeff/withhandler_return_clause_sample.py

UI 証跡確認

UI や表示文言の変更ではないため対象外です。

@proboscis
Copy link
Copy Markdown
Owner Author

config-effects 確認結果: 対象外です。

この PR は .semgrep.yamlWithHandlerreturn_clause 検出規則、semgrep fixture/test、PR 説明図だけを変更しています。実行時設定の注入、環境変数読み込み、interpreter/handler の設定境界、Ask / askdefp / defpp / defk、Program entrypoint の変更は見当たりませんでした。

そのため、この確認では修正要求はありません。current head: 0bf65903dfd45493adcd0f435d7a769b9d3ac7ae

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