File tree 10 files changed +43
-78
lines changed
10 files changed +43
-78
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -460,12 +460,12 @@ func TestCreatePullRequestMessage(t *testing.T) {
460
460
writerOutput .SetJasOutputFlags (true , true )
461
461
message := createPullRequestMessage (vulnerabilities , iac , writerOutput )
462
462
463
- expectedMessage := "<div align='center'>\n \n [](https://github.com/jfrog/frogbot#readme)\n \n </div>\n \n \n ## 📦 Vulnerable Dependencies \n \n ### ✍️ Summary\n \n <div align=\" center\" >\n \n | SEVERITY | CONTEXTUAL ANALYSIS | DIRECT DEPENDENCIES | IMPACTED DEPENDENCY | FIXED VERSIONS |\n | :---------------------: | :----------------------------------: | :----------------------------------: | :-----------------------------------: | :---------------------------------: | \n | <br> High | Undetermined | github.com/nats-io/nats-streaming-server:v0.21.0 | github.com/nats-io/nats-streaming-server:v0.21.0 | [0.24.1] |\n | <br> High | Undetermined | github.com/mholt/archiver/v3:v3.5.1 | github.com/mholt/archiver/v3:v3.5.1 | |\n | <br> Medium | Undetermined | github.com/nats-io/nats-streaming-server:v0.21.0 | github.com/nats-io/nats-streaming-server:v0.21.0 | [0.24.3] |\n \n </div>\n \n ## 👇 Details\n \n \n <details>\n <summary> <b>[ CVE-2022-24450 ] github.com/nats-io/nats-streaming-server v0.21.0</b> </summary>\n <br>\n \n - **Severity** 🔥 High\n - **Contextual Analysis:** Undetermined\n - **Package Name:** github.com/nats-io/nats-streaming-server\n - **Current Version:** v0.21.0\n - **CVE:** CVE-2022-24450\n - **Fixed Version:** [0.24.1]\n \n \n </details>\n \n \n <details>\n <summary> <b>github.com/mholt/archiver/v3 v3.5.1</b> </summary>\n <br>\n \n - **Severity** 🔥 High\n - **Contextual Analysis:** Undetermined\n - **Package Name:** github.com/mholt/archiver/v3\n - **Current Version:** v3.5.1\n \n \n </details>\n \n \n <details>\n <summary> <b>[ CVE-2022-26652 ] github.com/nats-io/nats-streaming-server v0.21.0</b> </summary>\n <br>\n \n - **Severity** 🎃 Medium\n - **Contextual Analysis:** Undetermined\n - **Package Name:** github.com/nats-io/nats-streaming-server\n - **Current Version:** v0.21.0\n - **CVE:** CVE-2022-26652\n - **Fixed Version:** [0.24.3]\n \n \n </details>\n \n \n ## 🛠️ Infrastructure as Code \n \n <div align=\" center\" >\n \n \n | SEVERITY | FILE | LINE:COLUMN | FINDING |\n | :---------------------: | :----------------------------------: | :-----------------------------------: | :---------------------------------: | \n | <br> Low | test.js | 1:20 | kms_key_id='' was detected |\n | <br> High | test2.js | 4:30 | Deprecated TLS version was detected |\n \n </div>\n \n \n <div align=\" center\" >\n \n [JFrog Frogbot](https://github.com/jfrog/frogbot#readme)\n \n </div>\n "
463
+ expectedMessage := "<div align='center'>\n \n [](https://github.com/jfrog/frogbot#readme)\n \n </div>\n \n \n ## 📦 Vulnerable Dependencies \n \n ### ✍️ Summary\n \n <div align=\" center\" >\n \n | SEVERITY | CONTEXTUAL ANALYSIS | DIRECT DEPENDENCIES | IMPACTED DEPENDENCY | FIXED VERSIONS |\n | :---------------------: | :----------------------------------: | :----------------------------------: | :-----------------------------------: | :---------------------------------: | \n | <br> High | Undetermined | github.com/nats-io/nats-streaming-server:v0.21.0 | github.com/nats-io/nats-streaming-server:v0.21.0 | [0.24.1] |\n | <br> High | Undetermined | github.com/mholt/archiver/v3:v3.5.1 | github.com/mholt/archiver/v3:v3.5.1 | |\n | <br> Medium | Undetermined | github.com/nats-io/nats-streaming-server:v0.21.0 | github.com/nats-io/nats-streaming-server:v0.21.0 | [0.24.3] |\n \n </div>\n \n ## 👇 Details\n \n \n <details>\n <summary> <b>github.com/nats-io/nats-streaming-server v0.21.0</b> </summary>\n <br>\n \n - **Severity** 🔥 High\n - **Contextual Analysis:** Undetermined\n - **Package Name:** github.com/nats-io/nats-streaming-server\n - **Current Version:** v0.21.0\n - **Fixed Version:** [0.24.1]\n - **CVE:** CVE-2022-24450\n \n \n </details>\n \n \n <details>\n <summary> <b>github.com/mholt/archiver/v3 v3.5.1</b> </summary>\n <br>\n \n - **Severity** 🔥 High\n - **Contextual Analysis:** Undetermined\n - **Package Name:** github.com/mholt/archiver/v3\n - **Current Version:** v3.5.1\n \n \n </details>\n \n \n <details>\n <summary> <b>github.com/nats-io/nats-streaming-server v0.21.0</b> </summary>\n <br>\n \n - **Severity** 🎃 Medium\n - **Contextual Analysis:** Undetermined\n - **Package Name:** github.com/nats-io/nats-streaming-server\n - **Current Version:** v0.21.0\n - **Fixed Version:** [0.24.3]\n - **CVE:** CVE-2022-26652\n \n \n </details>\n \n \n ## 🛠️ Infrastructure as Code \n \n <div align=\" center\" >\n \n \n | SEVERITY | FILE | LINE:COLUMN | FINDING |\n | :---------------------: | :----------------------------------: | :-----------------------------------: | :---------------------------------: | \n | <br> Low | test.js | 1:20 | kms_key_id='' was detected |\n | <br> High | test2.js | 4:30 | Deprecated TLS version was detected |\n \n </div>\n \n \n <div align=\" center\" >\n \n [JFrog Frogbot](https://github.com/jfrog/frogbot#readme)\n \n </div>\n "
464
464
assert .Equal (t , expectedMessage , message )
465
465
466
466
writerOutput .SetVcsProvider (vcsutils .GitLab )
467
467
message = createPullRequestMessage (vulnerabilities , iac , writerOutput )
468
- expectedMessage = "<div align='center'>\n \n [](https://github.com/jfrog/frogbot#readme)\n \n </div>\n \n \n ## 📦 Vulnerable Dependencies \n \n ### ✍️ Summary\n \n <div align=\" center\" >\n \n | SEVERITY | CONTEXTUAL ANALYSIS | DIRECT DEPENDENCIES | IMPACTED DEPENDENCY | FIXED VERSIONS |\n | :---------------------: | :----------------------------------: | :----------------------------------: | :-----------------------------------: | :---------------------------------: | \n | <br> High | Undetermined | github.com/nats-io/nats-streaming-server:v0.21.0 | github.com/nats-io/nats-streaming-server:v0.21.0 | [0.24.1] |\n | <br> High | Undetermined | github.com/mholt/archiver/v3:v3.5.1 | github.com/mholt/archiver/v3:v3.5.1 | |\n | <br> Medium | Undetermined | github.com/nats-io/nats-streaming-server:v0.21.0 | github.com/nats-io/nats-streaming-server:v0.21.0 | [0.24.3] |\n \n </div>\n \n ## 👇 Details\n \n \n <details>\n <summary> <b>[ CVE-2022-24450 ] github.com/nats-io/nats-streaming-server v0.21.0</b> </summary>\n <br>\n \n - **Severity** 🔥 High\n - **Contextual Analysis:** Undetermined\n - **Package Name:** github.com/nats-io/nats-streaming-server\n - **Current Version:** v0.21.0\n - **CVE:** CVE-2022-24450\n - **Fixed Version:** [0.24.1]\n \n \n </details>\n \n \n <details>\n <summary> <b>github.com/mholt/archiver/v3 v3.5.1</b> </summary>\n <br>\n \n - **Severity** 🔥 High\n - **Contextual Analysis:** Undetermined\n - **Package Name:** github.com/mholt/archiver/v3\n - **Current Version:** v3.5.1\n \n \n </details>\n \n \n <details>\n <summary> <b>[ CVE-2022-26652 ] github.com/nats-io/nats-streaming-server v0.21.0</b> </summary>\n <br>\n \n - **Severity** 🎃 Medium\n - **Contextual Analysis:** Undetermined\n - **Package Name:** github.com/nats-io/nats-streaming-server\n - **Current Version:** v0.21.0\n - **CVE:** CVE-2022-26652\n - **Fixed Version:** [0.24.3]\n \n \n </details>\n \n \n ## 🛠️ Infrastructure as Code \n \n <div align=\" center\" >\n \n \n | SEVERITY | FILE | LINE:COLUMN | FINDING |\n | :---------------------: | :----------------------------------: | :-----------------------------------: | :---------------------------------: | \n | <br> Low | test.js | 1:20 | kms_key_id='' was detected |\n | <br> High | test2.js | 4:30 | Deprecated TLS version was detected |\n \n </div>\n \n \n <div align=\" center\" >\n \n [JFrog Frogbot](https://github.com/jfrog/frogbot#readme)\n \n </div>\n "
468
+ expectedMessage = "<div align='center'>\n \n [](https://github.com/jfrog/frogbot#readme)\n \n </div>\n \n \n ## 📦 Vulnerable Dependencies \n \n ### ✍️ Summary\n \n <div align=\" center\" >\n \n | SEVERITY | CONTEXTUAL ANALYSIS | DIRECT DEPENDENCIES | IMPACTED DEPENDENCY | FIXED VERSIONS |\n | :---------------------: | :----------------------------------: | :----------------------------------: | :-----------------------------------: | :---------------------------------: | \n | <br> High | Undetermined | github.com/nats-io/nats-streaming-server:v0.21.0 | github.com/nats-io/nats-streaming-server:v0.21.0 | [0.24.1] |\n | <br> High | Undetermined | github.com/mholt/archiver/v3:v3.5.1 | github.com/mholt/archiver/v3:v3.5.1 | |\n | <br> Medium | Undetermined | github.com/nats-io/nats-streaming-server:v0.21.0 | github.com/nats-io/nats-streaming-server:v0.21.0 | [0.24.3] |\n \n </div>\n \n ## 👇 Details\n \n \n <details>\n <summary> <b>github.com/nats-io/nats-streaming-server v0.21.0</b> </summary>\n <br>\n \n - **Severity** 🔥 High\n - **Contextual Analysis:** Undetermined\n - **Package Name:** github.com/nats-io/nats-streaming-server\n - **Current Version:** v0.21.0\n - **Fixed Version:** [0.24.1]\n - **CVE:** CVE-2022-24450\n \n \n </details>\n \n \n <details>\n <summary> <b>github.com/mholt/archiver/v3 v3.5.1</b> </summary>\n <br>\n \n - **Severity** 🔥 High\n - **Contextual Analysis:** Undetermined\n - **Package Name:** github.com/mholt/archiver/v3\n - **Current Version:** v3.5.1\n \n \n </details>\n \n \n <details>\n <summary> <b>github.com/nats-io/nats-streaming-server v0.21.0</b> </summary>\n <br>\n \n - **Severity** 🎃 Medium\n - **Contextual Analysis:** Undetermined\n - **Package Name:** github.com/nats-io/nats-streaming-server\n - **Current Version:** v0.21.0\n - **Fixed Version:** [0.24.3]\n - **CVE:** CVE-2022-26652\n \n \n </details>\n \n \n ## 🛠️ Infrastructure as Code \n \n <div align=\" center\" >\n \n \n | SEVERITY | FILE | LINE:COLUMN | FINDING |\n | :---------------------: | :----------------------------------: | :-----------------------------------: | :---------------------------------: | \n | <br> Low | test.js | 1:20 | kms_key_id='' was detected |\n | <br> High | test2.js | 4:30 | Deprecated TLS version was detected |\n \n </div>\n \n \n <div align=\" center\" >\n \n [JFrog Frogbot](https://github.com/jfrog/frogbot#readme)\n \n </div>\n "
469
469
assert .Equal (t , expectedMessage , message )
470
470
}
471
471
You can’t perform that action at this time.
0 commit comments