Repository navigation
security: read a Db2 CONNECT wrapped over lines (Part of #8625) - #8653
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
1 similar comment
Contributor
|
No description provided. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.pynow 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.
(old,new), continuation line): handled, tested.USER id pw/PASS pw: handled, tested.USER/PASSkeyword) is not detectable without a high false-positive rate; needs a positional parse of the FTP script, a different mechanism. Not done here.JCL PASSWORD=andJCL PARM= password). The Sentinel verdict is unchanged; only the site count is duplicated.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 becauseexample-health-apisis 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