在 Jenkins 文本查找器中,如何忽略正则表达式?

In Jenkins text finder, how do I ignore a regex?

我们正在使用测试 SSL 漏洞的 Text-finder Plugin in our installation. I created a job that runs the testssh.sh 脚本,它会产生类似于...

的输出
###########################################################
    testssl.sh       2.9dev from https://testssl.sh/dev/
    (653827c 2018-03-27 09:10:55 -- )

      This program is free software. Distribution and
             modification under GPLv2 permitted.
      USAGE w/o ANY WARRANTY. USE IT AT YOUR OWN RISK!

       Please file bugs @ https://testssl.sh/bugs/

###########################################################

 Using "OpenSSL 1.0.2-chacha (1.0.2i-dev)" [~183 ciphers]
 on rtp-scm-lnx27:./bin/openssl.Linux.x86_64
 (built: "Jun 22 19:32:29 2016", platform: "linux-x86_64")


 Start 2018-03-27 19:13:14        -->> 171.xx.xx.xx:443 (server) <<--

 rDNS (171.xx.xx.xx):   server.company.xom.
 Service detected:       HTTP


 Testing vulnerabilities 

 Heartbleed (CVE-2014-0160)                not vulnerable (OK), timed out
 CCS (CVE-2014-0224)                       not vulnerable (OK)
 Ticketbleed (CVE-2016-9244), experiment.  not vulnerable (OK), no session ticket extension
 ROBOT                                     Server does not support any cipher suites that use RSA key transport
 Secure Renegotiation (CVE-2009-3555)      not vulnerable (OK)
 Secure Client-Initiated Renegotiation     not vulnerable (OK)
 CRIME, TLS (CVE-2012-4929)                not vulnerable (OK)
 BREACH (CVE-2013-3587)                    no HTTP compression (OK)  - only supplied "/" tested
 POODLE, SSL (CVE-2014-3566)               not vulnerable (OK)
 TLS_FALLBACK_SCSV (RFC 7507)              No fallback possible, no protocol below TLS 1.2 offered (OK)
 SWEET32 (CVE-2016-2183, CVE-2016-6329)    not vulnerable (OK)
 FREAK (CVE-2015-0204)                     not vulnerable (OK)
 DROWN (CVE-2016-0800, CVE-2016-0703)      not vulnerable on this host and port (OK)
                                           make sure you don't use this certificate elsewhere with SSLv2 enabled services
                                           https://censys.io/ipv4?q=B61548F40207FBEE731E439051A01514103AA14EDA907CF9E38FE735C89491EA could help you to find out
 LOGJAM (CVE-2015-4000), experimental      Common prime with 2048 bits detected: RFC3526/Oakley Group 14,
                                           but no DH EXPORT ciphers
 BEAST (CVE-2011-3389)                     no SSL3 or TLS1 (OK)
 LUCKY13 (CVE-2013-0169), experimental     potentially VULNERABLE, uses cipher block chaining (CBC) ciphers with TLS. Check patches
 RC4 (CVE-2013-2566, CVE-2015-2808)        no RC4 ciphers detected (OK)


 Done 2018-03-27 19:13:59 [  46s] -->>

 171.xx.xx.xx:443 (server) <<--

当它看到 "VULNERABLE" 而不是 "potentially VULNERABLE" IOW 时,我如何让它失败,我希望上面的输出通过作业,但目前它失败了,因为我告诉它搜索 "VULNERABLE" 在控制台中,当然它在短语 "potentially VULNERABLE"

谢谢!

使用 negative lookbehind 指示正则表达式仅在前面没有 potentially 时匹配 VULNERABLE,即以下正则表达式应仅匹配 VULNERABLE 而不是 potentially VOLNERABLE

(?<!potentially )VULNERABLE