Skip to content

security: read a Db2 CONNECT wrapped over lines (Part of #8625) - #8653

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8625-20261119T0755Z
Nov 19, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8625-20261119T0755Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8625 (security epic #8427).

Vault Sentinel and SecurityLens read a Db2 CONNECT ... USER ... USING <literal> only when it sat on one line. Embedded SQL is normally wrapped (CONNECT TO db / USER u / USING 'pw' on successive lines), so the common layout leaked past the scan. mainframe_secrets.py now joins a CONNECT line with up to three continuation lines before matching. Same regex, so the same near-misses hold (host variable :PWD, symbolic, comment).

Files (2 hand-written): gitgalaxy/security/mainframe_secrets.py, tests/security_auditing/test_vault_sentinel_mainframe.py.

Class / Sibling gaps

Class: the mainframe credential shapes the issue lists (JCL PASSWORD=/PARM, in-stream FTP login, Db2 CONNECT, REXX/CLIST literal beside a user ID). I probed each against the real patterns, including layouts earlier slices did not test.

  • JCL JOB PASSWORD= (incl. (old,new), continuation line): handled, tested.
  • JCL EXEC PARM password: handled, tested.
  • In-stream FTP USER id pw / PASS pw: handled, tested.
  • Db2 CONNECT on one line (REXX, command line, embedded SQL): handled, tested.
  • Db2 CONNECT wrapped over lines: fixed here, with a planted case and near-misses (wrapped host variable, prose mentioning CONNECT/USER/USING).
  • REXX/CLIST literal password next to a user ID: handled, tested.
  • Sibling gap: an FTP in-stream login with user and password on separate bare lines (no USER/PASS keyword) is not detectable without a high false-positive rate; needs a positional parse of the FTP script, a different mechanism. Not done here.
  • Sibling gap: a JCL PARM password reports twice on one line (JCL PASSWORD= and JCL PARM= password). The Sentinel verdict is unchanged; only the site count is duplicated.
  • Sibling gap: a REXX password passed as a call argument (CALL X 'PW') has no variable name to key on; out of scope.

Gates

  • pr_gates --fast: 9/9 pass. Real Vault Sentinel scan tests plus lens tests: 117 pass.
  • crucible_check.py (golden-lock, both legs): PASS, no drift.
  • pr_gates --ratchets: cics-spec, ports, port-surface, estate, det-mutation, time PASS. fact-crosscheck, completeness and ground-truth FAIL locally only because example-health-apis is not fetched at its pinned ref on this box (mainframe_corpus.py fetch); this change does not touch those paths. Not verified locally, left to CI.

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 19, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

1 similar comment
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 19, 2026 08:48
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 19, 2026 08:53
@squid-shepherd
squid-shepherd Bot merged commit 9fcf8f2 into main Nov 19, 2026
95 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/8625-20261119T0755Z branch November 19, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant