Skip to content

high_risk_execution contract (#2878): state the row, audit 46 rules, re-bless - #2880

Merged
squid-protocol merged 1 commit into
mainfrom
fix/2878-high-risk-execution-contract
Sep 8, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
fix/2878-high-risk-execution-contract

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Phase 3 of #2812: the high_risk_execution sheet row goes draft -> stated (12/68). Contract, corollaries and the 46-language audit: docs/high_risk_execution_rule_contract.md.

Closes #2878

The contract

One hit is a site that hands control out of the program's own semantics -- it ends or halts the process, runs text or another program as code, loads or rewrites executable code at run time, destroys a whole store the program does not own, or steps outside the runtime's protections -- in the primitive's own invocation or statement form.

Six corollaries: C1 five families, one owner each (a form invisible to one language but counted by its siblings joins: python sys.exit, go panic(, php eval(/exit/die, fortran STOP, c exit(/abort(); C2 the site is the invocation -- a bound alias, a type/property reference, a landing point (setjmp) or a bare identifier is not one, and where an ordinary identifier can carry the name the rule anchors on the form (cpp/c/perl/php call parens, css expression(/behavior:, js .innerHTML = and statement debugger, zig panic( not .panic, cobol/tcl hyphen guards, groovy's literal receiver); C3 a jump is nobody's signal (goto leaves csharp and fortran; reverses #2822 C3's hand-off); C4 deletion below the store is cleanup's question (#2843) -- the four shell-carrying languages now agree on root-only rm -rf; C5 not danger (trace, alert, answer, memcpy, clear all, exitCode, a pragma, a hard-coded ID, undelete); C6 one verified owner (apex Database.query -> safety_bypasses alone, emptyRecycleBin -> this signal alone; eval in matlab/ruby/shell/tcl stays safety_bypasses' by ledger, #2879).

The open cell

agc_assembly 2 vs 3 was inherency mis-marked as extraction: the corpus's string decoy asserts +1 everywhere (strings count, #2535) and agc cannot carry one (string-decoy-unplantable-no-literal-surface), but batch4-dual-keyword-overlaps still cross-producted high_risk_execution x agc_assembly. C6 retires apex's dual, the signal leaves batch4's union on the corpus side, and the cell reads what its own entry says. No rule moves it.

What the crucible measured with no red cell (raw hits, rule_probe.py --compare)

cpp 18 -> 1 (Godot's bool exit = false; exit = true;, prose), c 1 -> 32 (the one hit was "Load system defaults"; exit(/abort( join), csharp 20 -> 0 (all goto/@goto), groovy 22 -> 2 (retrofit's .execute().body()), zig 203 -> 82 (.panic tags, pub fn panic), perl 28 -> 9 (config prose), shell 147 -> 77 (70 non-root rm -rf "${...}", kill -0, --sudo-service-user), tcl 118 -> 82, cobol 310 -> 257 (ALTER-TEST-INIT. names), css 5 -> 0 (scroll-behavior:), php 16 -> 43 (backticks in SQL strings out; exit;/die(/eval( in), go 4 -> 175 (panic(), rust 69 -> 101 (unreachable!), livecode 109 -> 122 (shell( in, answer out), powershell 213 -> 228 (Start-Process), typescript 9 -> 7, fortran 3 -> 4, haskell 0 -> 2, matlab 3 -> 2, abap 1 -> 0, solidity 0 -> 1, lua 239 -> 241, python 11 -> 12, ruby 4 -> 3. 36 rules edited (+ apex's cleanup rule releasing emptyRecycleBin), each with a # #2878 contract comment naming its corollary.

Tests

  • New tests/extraction/languages/test_high_risk_execution_contract_2878.py: 33 languages' positives/negatives, one-site-one-hit counts, other-owner duals, markdown absence, ReDoS detonation over 31 shared payloads.
  • Seven strict pins rewritten to the contract (apex x2, fortran, livecode, shell, matlab's dual sweep, sqlite's pragma). Full suite green locally (languages 7105 + 88 contract, rest 1184).
  • Sheet row stated, how_to_add_a_language.md comment carries the sentence, signal_contract_audit baseline 58 -> 57, --ci clean. audit_check.py all clear.

Differential Scan (bless scope, bless_scope.py)

644 differences, 0 topological, all in the high_risk_execution family: leaf keys High-Risk Execution Commands 158, Error & Exception Exposure 188 (the safety score reads danger at 4x), safety_score 58, Testing Exposure 37 (_calc_verification adds file-level danger), Mitigated Danger 21 / Amplified Rce 9 (proximity tallies follow the sites), the two weighted views, verification 3, summary aggregates. By language: shell 53, cobol 42, livecode 34, tcl 30, rust 29, groovy 22, zig 21, lua 20, powershell 19, typescript 15, php 14, perl 13, go 13, fortran 11, c 10, cpp 8, css 5 -- the direction of each is the audit table's. Newly parsed / newly excluded: none. Both fixtures blessed from the clean v1.2.0 crucible worktree.

Cross-repo

Label rosetta:rebless-owed. Companion: keyword-rosetta#103 (rebless/gitgalaxy-2878-high-risk-execution) -- no manifest cell moves (2 planted + 1 decoy everywhere; agc 2 by inherency); 21 plants/decoys re-planted to the contract (decoys carry the anchored form where the rule now needs one), 9 comment decoys re-authored to keep their 2-rule floor, ledger: high-risk-execution-contract-2878 added, batch4 loses high_risk_execution and apex, fortran-goto and string-decoy entries annotated. Engine merges first; the corpus PR goes green against engine main; bias-history regen republishes the report (expected open-defect share 17 -> 16 of 2639). Deferred menu: #2879.

🤖 Generated with Claude Code

…re-bless

One hit is a site that hands control out of the program's own semantics --
ends/halts the process, runs text or another program as code, loads or
rewrites code at run time, destroys a whole store, or escapes the runtime's
protections -- in the primitive's own invocation or statement form. Six
corollaries in docs/high_risk_execution_rule_contract.md; 36 rules edited
(identifier/prose collisions anchored, goto out of csharp/fortran, deletion
below the store handed to cleanup's question #2843, the family's own forms
added where a sibling already counted them); apex's cleanup rule releases
emptyRecycleBin. Sheet row stated (12/68). Golden masters re-blessed: 644
diffs, 0 topological, all high_risk_execution-family, no aperture change.

Closes #2878

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@squid-protocol squid-protocol added the rosetta:rebless-owed Intentionally moves keyword-rosetta counts; audit warns, corpus re-blesses after merge label Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol

Copy link
Copy Markdown
Owner Author

CI note: every check is green except one of the two rosetta-audit runs. The opened run (34195220776) fired before gh pr create --label attached rosetta:rebless-owed (the trap documented at the top of rosetta-audit.yml) and read the 13 declared corpus movers as errors; the labeled run (34195221296) that fired the same second passed with them as warnings: 46 language(s) checked -- 13 regression(s), 0 pre-existing, 0 broken, all high_risk_execution in exactly the files keyword-rosetta#103 re-plants. The red X is the stale opened check in the rollup, not a finding; the audit is advisory (no required checks) and re-running that run would replay the label-less payload.

@squid-protocol
squid-protocol merged commit 5ff1f99 into main Sep 8, 2026
44 of 45 checks passed
@squid-protocol
squid-protocol deleted the fix/2878-high-risk-execution-contract branch September 8, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rosetta:rebless-owed Intentionally moves keyword-rosetta counts; audit warns, corpus re-blesses after merge

Projects

None yet

1 participant