kingfisher/data/rules/vmware.yml
Mick Grove c0e4910d1f pattern_requirements for rules — Post-regex character-class gating to cut false positives without lookarounds. Authors can now require minimum counts of digits, uppercase, lowercase, and special characters, with an optional custom special-char set.
Why: Hyperscan doesn’t support lookaheads/behinds, so many “must contain X and Y” checks had to be baked into the regex (hurting readability) or were impossible. pattern_requirements applies lightweight, in-memory checks after a match is found, keeping patterns fast and clean.
2025-11-04 13:55:31 -05:00

20 lines
No EOL
849 B
YAML

rules:
- name: Credentials in Connect-VIServer Invocation
id: kingfisher.vmware.1
pattern: |
(?xi)
Connect-VIServer
.{0,50}
-User \s+ (\S{3,30}) \s+ (?# username )
.{0,50}
-Password \s+ (\S{3,30}) (?# password )
examples:
- 'Connect-VIServer -Server 192.168.1.51 -User administrator@vSphere.local -Password VMware1!'
- |
#Set-PowerCLIConfiguration -InvalidCertificateAction:Ignore
Connect-VIServer "$endpoint" -User "$username" -Password "$password" | Out-Null
- 'Connect-VIServer $ESXiHost.EsxiHost -user $ESXiUser -password $ESXipass'
- '$null = connect-viserver vc.lab.local -user administrator@vsphere.local -password VMware1!'
references:
- https://developer.broadcom.com/powercli/latest/vmware.vimautomation.core/commands/connect-viserver