Repository navigation
Description
Context
gitgalaxy#3002 reviewed the nine Db2 DSN command-processor / IDCAMS verbs
that appear inside JCL's //SYSIN DD * in-stream payload (invisible today to
both the engine and tests/tools/embedded_verb_coverage.py's census, since
neither reads inside a DD * payload span). Checked against
docs/high_risk_execution_rule_contract.md (#2878), eight of the nine verbs
were ruled out of scope: RUN PROGRAM/DSN SYSTEM are already counted at the
step level (the IKJEFT01 high_risk_execution hit already covers "runs
whatever SYSTSIN carries"), and GRANT/DROP/DELETE/DEFINE CLUSTER/
REPRO/FREE are IDCAMS's/DSN's own fixed command grammar, excluded on the
same reasoning that already keeps IDCAMS itself out of high_risk_execution
(the rm vs rm -rf / analogy), with DELETE/FREE additionally covered
conceptually by JCL's existing cleanup rule (DISP=(...,DELETE)).
BIND (Db2's package-bind command, 14 occurrences in language-crucible
v1.2.0) is the one exception: it installs an executable Db2 package, which
matches high_risk_execution's contract family (c) — "loading or rewriting
executable code at run time" (the same family as sqlite's load_extension()
— and nothing counts it today.
Why this wasn't fixed in #3002
Implementing a real BIND rule needs bounded payload-scanning plumbing that
does not exist anywhere in jcl.py today. JCL has no tree-sitter grammar
(this engine is fully regex/line-anchored for it), and every existing jcl.py
rule is anchored to a single ^//... statement line — none of them reads a
span of text bounded by an opener and a terminator. A BIND rule would need
to:
- Open on
//ddname DD \*orDD DATA(the in-stream payload marker). - Close on a bare
/*line, or the next^//control statement, whichever
comes first (payload data has no other terminator). - Only then look for
BINDinside that bounded span, so it can never fire on
aBINDappearing incidentally in unrelated payload text. - Stay ReDoS-safe under the same 15-second
SIGALRMfuse every other rule in
this engine respects (.claude/rules/golden-master-guidelines.md).
That's new engine plumbing (plus a golden-master re-bless via
crucible_check.py), not a one-line regex addition, so it's scoped to its own
issue rather than bundled into #3002's ownership review.
Ask
Design and implement a bounded DD */DD DATA payload scanner in
gitgalaxy/standards/language_standards/languages/jcl.py, and use it to add a
BIND alternative to high_risk_execution (or a new dedicated capture, if a
bounded-span scan turns out useful for more than one rule). Verify against
language-crucible with tests/tools/embedded_verb_coverage.py jcl --check
(update the BIND row from none_owned to owned(...)) and the normal
Differential Scan protocol (crucible_check.py) before merging.
Found by: gitgalaxy#3002 (JCL in-stream payload grammar review).
Activity
test(golden): re-bless both masters on the merge with main (#3010)
feat(jcl): bounded DD * payload scanner + high_risk_execution for Db2…