You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TP4 drops warnings that explain unsafe code examples #668
TP4 extracts fenced code without keeping nearby text that identifies it as an unsafe example. The model then loses the context explaining that the code should not be run.
Reproduction
Passing this Markdown through code-fence extraction reproduces the context loss. The shell command was not executed.
## Before: unsafe example
Do not execute this.
```bash
rm -rf ./data
```## After: safe alternative
The extracted item contains the shell body and line coordinates, but drops the heading and prohibition. The context loss is reproducible; the resulting finding depends on the model.
Expected behavior
Keep enough surrounding text and source location for semantic analysis to interpret the example, within existing resource limits. Validation should compare this example with the same code presented as an instruction to execute, including an affirmative instruction that follows an earlier prohibition. Dangerous instructions and incomplete analysis must remain visible.
Markdown and code fences still need analysis. Validate the fix through the scanner with a small live-model comparison, while keeping regular CI offline.
Related: #419 concerned enabling analysis of embedded code. This report concerns the framing of that code.
Implementation is in the open PR #693. It carries bounded preceding Markdown context into TP4's fenced-code analysis while preserving source locations and resource accounting. The PR has not merged, so this issue remains open pending the paired benign/risky validation and acceptance.
Activity
rng1995 commentedon Oct 4, 2026
Implementation is in the open PR #693. It carries bounded preceding Markdown context into TP4's fenced-code analysis while preserving source locations and resource accounting. The PR has not merged, so this issue remains open pending the paired benign/risky validation and acceptance.
PR-state snapshot checked on 2026-10-04:
Keeping this issue open: the relevant implementation is not merged. Check/review status is a point-in-time snapshot, not a claim of merge readiness.