@@ -62,9 +62,9 @@ func TestGenerateMarkdownReport(t *testing.T) {
6262## XSS PoCs
6363| # | Type | Severity | Method | Param | Inject-Type | CWE |
6464|---|---|---|---|---|---|---|
65- | #0 | XSS | High | GET | param1 | inHTML | CWE-79 |
65+ | [PoC1](#PoC1) | XSS | High | GET | param1 | inHTML | CWE-79 |
6666
67- ### PoC #0
67+ ### PoC1
6868` + "```\n <script>alert(1)</script>\n ```" + `
6969
7070` // Adding the code block directly as it contains backticks
@@ -153,9 +153,9 @@ func TestGenerateMarkdownReport_NoParams(t *testing.T) {
153153## XSS PoCs
154154| # | Type | Severity | Method | Param | Inject-Type | CWE |
155155|---|---|---|---|---|---|---|
156- | #0 | XSS | High | GET | param1 | inHTML | CWE-79 |
156+ | [PoC1](#PoC1) | XSS | High | GET | param1 | inHTML | CWE-79 |
157157
158- ### PoC #0
158+ ### PoC1
159159` + "```\n <script>alert(1)</script>\n ```" + `
160160
161161`
@@ -240,16 +240,16 @@ func TestGenerateMarkdownReport_MultiplePoCs(t *testing.T) {
240240
241241 report := GenerateMarkdownReport (scanResult , options )
242242
243- if ! strings .Contains (report , "### PoC #0 " ) {
244- t .Errorf ("Report does not contain PoC #0 " )
243+ if ! strings .Contains (report , "### PoC1 " ) {
244+ t .Errorf ("Report does not contain PoC1 " )
245245 }
246246 if ! strings .Contains (report , "<script>alert(1)</script>" ) {
247- t .Errorf ("Report does not contain data for PoC #0 " )
247+ t .Errorf ("Report does not contain data for PoC1 " )
248248 }
249- if ! strings .Contains (report , "### PoC #1 " ) {
250- t .Errorf ("Report does not contain PoC #1 " )
249+ if ! strings .Contains (report , "### PoC2 " ) {
250+ t .Errorf ("Report does not contain PoC2 " )
251251 }
252252 if ! strings .Contains (report , "';alert(2);'" ) {
253- t .Errorf ("Report does not contain data for PoC #1 " )
253+ t .Errorf ("Report does not contain data for PoC2 " )
254254 }
255255}
0 commit comments