Skip to content

Extraction hardening: jcl CICS utility execution and resources #2486

Closed as not planned

Description

@squid-protocol

Parent: #2516

GitGalaxy's JCL support currently has zero CICS-specific awareness. We need to add sensors for:

  1. CICS Utility Execution: Map CICS system utilities executed in batch jobs (e.g., PGM=DFHCSDUP for CSD updates, PGM=DFHSTUP for statistics, PGM=DFHRLUP) into high_risk_execution or a new domain sensor.
  2. CICS Resource Definitions: Extract dataset allocations critical to CICS infrastructure (e.g., DFHCSD, DFHRPL, DFHLIST) and map them to io or _dependency_capture.
  3. CICS EXCI (External CICS Interface): Track batch jobs kicking off CICS transactions via EXCI, mapping the utilities into ipc_rpc_bridges.

Implementation Guide

Target File: gitgalaxy/standards/language_standards.py (JCL section, ~line 13959)
Action:

  1. io & _dependency_capture: Expand the JCL dataset captures to explicitly recognize CICS system definitions: DFHCSD (System Definition dataset) and DFHRPL (Program load library).
  2. ipc_rpc_bridges (New key for JCL): Currently, JCL's high_risk_execution captures all PGM=... generically. Add ipc_rpc_bridges to explicitly capture EXCI batch calls and CICS utility programs (PGM=DFHCSDUP, PGM=DFHSTUP) so they stand out from standard batch programs.
    Testing: Add test cases in test_jcl_strict.py for CSD and EXCI executions.

Activity

  1. added
    enhancement
    core-engine
    legacy-modernization
    on Aug 30, 2026
  2. added
    priority: high
    and removed on Sep 2, 2026
  3. squid-protocol commented on Sep 6, 2026

    @squid-protocol
    OwnerAuthor

    Worked this against the crucible — all three parts come back "no change", and I think that's the right answer

    Measured 2026-09-06 on engine main a59ecf6b against language-crucible v1.2.0 (186 .jcl files, 6 repos). Taking the three parts in order.

    1. CICS utilities → high_risk_execution — rejected by this rule's own criterion

    The rule's comment states the criterion #2751 set, and it excludes exactly this class:

    Narrowed to the programs whose purpose is to execute CALLER-SUPPLIED commands: TSO/E batch (IKJEFT01 …), the z/OS UNIX shell and program launchers …, the REXX interpreter (IRXJCL) and batch SDSF … Compilers, copy/catalog utilities and IEFBR14 are steps, not arbitrary execution; IDCAMS/IEHPROGM/ADRDSSU are destructive-capable utilities but execute a fixed command language, so they are left out on the same reasoning that keeps rm (not rm -rf /) out of shell's rule.

    DFHCSDUP is precisely that shape — it reads DEFINE/ALTER/DELETE control statements from SYSIN and applies them to the CSD. Destructive-capable, fixed command language, no caller-supplied code. Adding it would re-widen what #2751 deliberately narrowed three weeks ago, and would do it without arguing against the IDCAMS precedent.

    DFHSTUP and DFHRLUP are weaker still: statistics and log-record formatters, read-only.

    What the corpus actually contains, for reference:

    PGM=DFH* across 186 crucible .jcl files
      DFHCSDUP  6    CSD update utility (SYSIN control statements)
      DFHSIP    2    CICS system initialization
      DFHDU730  2    dump formatter        (read-only)
      DFHTU730  2    trace formatter       (read-only)
      DFHNCMN   1    named-counter server
      DFHXQMN   1    shared-TS-queue server
      DFHSTUP   0
      DFHRLUP   0
    

    2. DFHCSD/DFHRPL → io / _dependency_capture — already covered generically

    I ran the live rules over every CICS resource DD in the corpus. All 12 already record io, and _dependency_capture already resolves the ones carrying a real dataset name:

    //DFHRPL   DD DSN=&INDEX2..SDFHLOAD,DISP=SHR      io=2  dep=['&INDEX2..SDFHLOAD']
    //DFHCSD   DD DSN=@[email protected],DISP=SHR    io=2  dep=['@[email protected]']
    //DFHCSD   DD DSN=<CSDNAME>,DISP=SHR              io=2  dep=-        <- placeholder, correctly rejected
    //DFHCSD   DD DISP=SHR,                           io=1  dep=-        <- DSN on the continuation line
    

    Adding DFHCSD/DFHRPL as named alternatives to io would double-count against the DSN/DISP= operands already matching. The two dep=- rows are real but neither is CICS-specific: <CSDNAME> is a template placeholder that should be rejected, and the last is the generic "DSN sits on a // continuation line" shape — worth its own issue for _dependency_capture across all of JCL, not a CICS sensor.

    3. EXCI → ipc_rpc_bridges — no corpus evidence to verify against

    Zero occurrences of DFHXC* or any EXCI stub in the 186 files. jcl's ipc_rpc_bridges is currently None, so this would mean creating a rule that nothing in the crucible exercises — the "rule lands with no plant to verify it" shape GATING warns about, and it would flip the keyword-rosetta cell from n/a to a scored 0 at the same time. I'd rather leave it None until there is a real EXCI job to measure.

    What I'd suggest instead

    The domain need in this issue is real — "this job updates the CICS system definition" is exactly what a modernization reader wants — but GitGalaxy's current signal vocabulary has no slot that fits it without misusing one that means something else. That's a new sensor design question (a system_config_mutation or CICS domain signal under #2516), not a regex widening, and it deserves its own issue rather than being smuggled into high_risk_execution.

    The cobol halves of this trio (#2484, #2485) are real and are implemented — PR to follow. Suggest closing this one as invalid/wontfix against the evidence above, or re-scoping it to the new-sensor question.


    Implemented in #2807 (the cobol halves, #2484 + #2485, land there).

  4. squid-protocol commented on Sep 16, 2026

    @squid-protocol
    OwnerAuthor

    Closing as not-planned, per the analysis above — re-verified 2026-09-16: the corpus pin is still language-crucible v1.2.0, so every measurement in the 2026-09-06 comment stands unchanged.

    Where the three parts ended up:

    1. CICS utilities → high_risk_execution: stays rejected (jcl: high_risk_execution counts every EXEC PGM=, so a compiler step and IEFBR14 score as arbitrary execution (design question) #2751's fixed-command-language criterion, the IDCAMS precedent).
    2. DFHCSD/DFHRPL → io/_dependency_capture: already covered generically; named alternatives would double-count.
    3. EXCI → ipc_rpc_bridges: still zero corpus occurrences to verify against.

    The cobol halves of this trio (#2484, #2485) landed in #2807. The real domain need this issue pointed at — "this job mutates the CICS system definition" — is now tracked properly as a new-sensor design question under #2516: see #3084, which also picks up the GRANT/REVOKE overlap with #3004.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    core-engineenhancementlegacy-modernizationpriority: high

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions