Discover and propose COMMAREA length guards

Proprietary

Discover incoming LINKAGE copies, writes, DISPLAY operations, CICS forwarding and native calls under reusable entry and interface contracts. Derive source paths, program identities, statement locations and COPY snapshots. Find native providers through explicitly approved unique PROGRAM-ID binding. Require a concrete short arrival, a preserved actual received count and a proven existing exit before inserting a length guard. Reuse the existing access-specific proofs and reprove accepted arrivals after insertion. Preserve original operations and failure paths. Unknown arrivals, ambiguous providers and conflicting policies remain barriers. No source files or statement lines are selected. Application team review remains required.

io.moderne.mainframe.security.ProposeCommareaLengthGuards

Optional

Strict version 1 JSON with a rules array. Each rule supplies id, operation, commarea, receivedLength, minimumEntryLength, maximumEntryLength, operationPolicy, approvedExit, contractSource, targetRoutine and provider. Operations are COPY, WRITE, DISPLAY, FORWARD and CALL. CALL requires a provider record and explicit PROGRAM-ID binding and shared DISPLAY encoding. Other operations use a null provider. CALL and FORWARD name a literal targetRoutine. Other operations use an empty target. Approve every matching access and its existing failure path. Omit policies to inventory resolved LINKAGE accesses without edits.

mod run . --recipe=io.moderne.mainframe.security.ProposeCommareaLengthGuards

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.