@@ -55,10 +55,10 @@ class ReporterTest extends DDSpecification {
5555 span. getSpanId() >> spanId
5656
5757 final v = new Vulnerability (
58- VulnerabilityType . WEAK_HASH ,
59- Location . forSpanAndStack(span, new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
60- new Evidence (" MD5" )
61- )
58+ VulnerabilityType . WEAK_HASH ,
59+ Location . forSpanAndStack(span, new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
60+ new Evidence (" MD5" )
61+ )
6262
6363 when :
6464 reporter. report(span, v)
@@ -108,10 +108,10 @@ class ReporterTest extends DDSpecification {
108108 span. getSpanId() >> spanId
109109
110110 final v = new Vulnerability (
111- VulnerabilityType . WEAK_HASH ,
112- Location . forSpanAndStack(span, new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
113- new Evidence (" MD5" )
114- )
111+ VulnerabilityType . WEAK_HASH ,
112+ Location . forSpanAndStack(span, new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
113+ new Evidence (" MD5" )
114+ )
115115
116116 when :
117117 reporter. report(span, v)
@@ -154,15 +154,15 @@ class ReporterTest extends DDSpecification {
154154 span. getSpanId() >> spanId
155155
156156 final v1 = new Vulnerability (
157- VulnerabilityType . WEAK_HASH ,
158- Location . forSpanAndStack(span, new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
159- new Evidence (" MD5" )
160- )
157+ VulnerabilityType . WEAK_HASH ,
158+ Location . forSpanAndStack(span, new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
159+ new Evidence (" MD5" )
160+ )
161161 final v2 = new Vulnerability (
162- VulnerabilityType . WEAK_HASH ,
163- Location . forSpanAndStack(span, new StackTraceElement (" foo" , " foo" , " foo" , 2 )),
164- new Evidence (" MD4" )
165- )
162+ VulnerabilityType . WEAK_HASH ,
163+ Location . forSpanAndStack(span, new StackTraceElement (" foo" , " foo" , " foo" , 2 )),
164+ new Evidence (" MD4" )
165+ )
166166
167167 when :
168168 reporter. report(span, v1)
@@ -291,10 +291,10 @@ class ReporterTest extends DDSpecification {
291291 span. getRequestContext() >> null
292292 span. getSpanId() >> 12345L
293293 final v = new Vulnerability (
294- VulnerabilityType . WEAK_HASH ,
295- Location . forSpanAndStack(null , new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
296- new Evidence (" MD5" )
297- )
294+ VulnerabilityType . WEAK_HASH ,
295+ Location . forSpanAndStack(null , new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
296+ new Evidence (" MD5" )
297+ )
298298
299299 when :
300300 reporter. report(span, v)
@@ -315,10 +315,10 @@ class ReporterTest extends DDSpecification {
315315 span. getRequestContext() >> reqCtx
316316 span. getSpanId() >> spanId
317317 final v = new Vulnerability (
318- VulnerabilityType . WEAK_HASH ,
319- Location . forSpanAndStack(span, new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
320- new Evidence (" MD5" )
321- )
318+ VulnerabilityType . WEAK_HASH ,
319+ Location . forSpanAndStack(span, new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
320+ new Evidence (" MD5" )
321+ )
322322
323323 when :
324324 reporter. report(span, v)
@@ -342,17 +342,17 @@ class ReporterTest extends DDSpecification {
342342 final span1 = Mock (AgentSpan )
343343 span1. getSpanId() >> 123456
344344 final vulnerability1 = new Vulnerability (
345- VulnerabilityType . WEAK_HASH ,
346- Location . forSpanAndStack(span1, new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
347- new Evidence (" GOOD" )
348- )
345+ VulnerabilityType . WEAK_HASH ,
346+ Location . forSpanAndStack(span1, new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
347+ new Evidence (" GOOD" )
348+ )
349349 final span2 = Mock (AgentSpan )
350350 span1. getSpanId() >> 7890
351351 final vulnerability2 = new Vulnerability (
352- VulnerabilityType . WEAK_HASH ,
353- Location . forSpanAndStack(span2, new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
354- new Evidence (" BAD" )
355- )
352+ VulnerabilityType . WEAK_HASH ,
353+ Location . forSpanAndStack(span2, new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
354+ new Evidence (" BAD" )
355+ )
356356
357357 expect :
358358 vulnerability1 == vulnerability2
@@ -363,17 +363,17 @@ class ReporterTest extends DDSpecification {
363363 final span1 = Mock (AgentSpan )
364364 span1. getSpanId() >> 123456
365365 final vulnerability1 = new Vulnerability (
366- VulnerabilityType . WEAK_HASH ,
367- Location . forSpanAndStack(span1, new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
368- new Evidence (" GOOD" )
369- )
366+ VulnerabilityType . WEAK_HASH ,
367+ Location . forSpanAndStack(span1, new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
368+ new Evidence (" GOOD" )
369+ )
370370 final span2 = Mock (AgentSpan )
371371 span1. getSpanId() >> 7890
372372 final vulnerability2 = new Vulnerability (
373- VulnerabilityType . WEAK_HASH ,
374- Location . forSpanAndStack(span2, new StackTraceElement (" foo" , " foo" , " foo" , 2 )),
375- new Evidence (" BAD" )
376- )
373+ VulnerabilityType . WEAK_HASH ,
374+ Location . forSpanAndStack(span2, new StackTraceElement (" foo" , " foo" , " foo" , 2 )),
375+ new Evidence (" BAD" )
376+ )
377377
378378 expect :
379379 vulnerability1 != vulnerability2
@@ -386,10 +386,10 @@ class ReporterTest extends DDSpecification {
386386 final batch = new VulnerabilityBatch ()
387387 final span = spanWithBatch(batch)
388388 final vulnerability = new Vulnerability (
389- VulnerabilityType . WEAK_HASH ,
390- Location . forSpanAndStack(span, new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
391- new Evidence (" GOOD" )
392- )
389+ VulnerabilityType . WEAK_HASH ,
390+ Location . forSpanAndStack(span, new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
391+ new Evidence (" GOOD" )
392+ )
393393
394394 when : ' first time a vulnerability is reported'
395395 reporter. report(span, vulnerability)
@@ -411,10 +411,10 @@ class ReporterTest extends DDSpecification {
411411 final batch = new VulnerabilityBatch ()
412412 final span = spanWithBatch(batch)
413413 final vulnerability = new Vulnerability (
414- VulnerabilityType . WEAK_HASH ,
415- Location . forSpanAndStack(span, new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
416- new Evidence (" GOOD" )
417- )
414+ VulnerabilityType . WEAK_HASH ,
415+ Location . forSpanAndStack(span, new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
416+ new Evidence (" GOOD" )
417+ )
418418
419419 when : ' first time a vulnerability is reported'
420420 reporter. report(span, vulnerability)
@@ -438,10 +438,10 @@ class ReporterTest extends DDSpecification {
438438 final span = spanWithBatch(batch)
439439 final vulnerabilityBuilder = { int index ->
440440 new Vulnerability (
441- VulnerabilityType . WEAK_HASH ,
442- Location . forSpanAndStack(span, new StackTraceElement (index. toString(), index. toString(), index. toString(), index)),
443- new Evidence (" GOOD" )
444- )
441+ VulnerabilityType . WEAK_HASH ,
442+ Location . forSpanAndStack(span, new StackTraceElement (index. toString(), index. toString(), index. toString(), index)),
443+ new Evidence (" GOOD" )
444+ )
445445 }
446446
447447 when : ' the deduplication cache is filled for the first time'
@@ -478,10 +478,10 @@ class ReporterTest extends DDSpecification {
478478 final span = spanWithBatch(batch)
479479 final vulnerabilityBuilder = { int index ->
480480 new Vulnerability (
481- VulnerabilityType . WEAK_HASH ,
482- Location . forSpanAndStack(span, new StackTraceElement (index. toString(), index. toString(), index. toString(), index)),
483- new Evidence (" GOOD" )
484- )
481+ VulnerabilityType . WEAK_HASH ,
482+ Location . forSpanAndStack(span, new StackTraceElement (index. toString(), index. toString(), index. toString(), index)),
483+ new Evidence (" GOOD" )
484+ )
485485 }
486486
487487 when : ' a few duplicates are reported in a concurrent scenario'
@@ -514,10 +514,10 @@ class ReporterTest extends DDSpecification {
514514 final batch = new VulnerabilityBatch ()
515515 final span = spanWithBatch(batch)
516516 final vulnerability = new Vulnerability (
517- VulnerabilityType . SESSION_REWRITING ,
518- Location . forSpan(span),
519- new Evidence (" SESSION_REWRITING" )
520- )
517+ VulnerabilityType . SESSION_REWRITING ,
518+ Location . forSpan(span),
519+ new Evidence (" SESSION_REWRITING" )
520+ )
521521
522522 when : ' first time a vulnerability is reported'
523523 reporter. report(span, vulnerability)
@@ -549,15 +549,15 @@ class ReporterTest extends DDSpecification {
549549 final location = Location . forSpanAndStack(span, new StackTraceElement (" foo" , " foo" , " foo" , 1 ))
550550
551551 final v1 = new Vulnerability (
552- VulnerabilityType . INSECURE_COOKIE ,
553- location,
554- new Evidence (" JSESSIONID" )
555- )
552+ VulnerabilityType . INSECURE_COOKIE ,
553+ location,
554+ new Evidence (" JSESSIONID" )
555+ )
556556 final v2 = new Vulnerability (
557- VulnerabilityType . NO_SAMESITE_COOKIE ,
558- location,
559- new Evidence (" JSESSIONID" )
560- )
557+ VulnerabilityType . NO_SAMESITE_COOKIE ,
558+ location,
559+ new Evidence (" JSESSIONID" )
560+ )
561561
562562 when :
563563 reporter. report(span, v1)
@@ -627,23 +627,23 @@ class ReporterTest extends DDSpecification {
627627
628628 private Vulnerability defaultVulnerability (){
629629 return new Vulnerability (
630- VulnerabilityType . WEAK_HASH ,
631- Location . forSpanAndStack(null , new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
632- new Evidence (" MD5" )
633- )
630+ VulnerabilityType . WEAK_HASH ,
631+ Location . forSpanAndStack(null , new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
632+ new Evidence (" MD5" )
633+ )
634634 }
635635
636636 private Vulnerability cookieVulnerability (){
637637 return new Vulnerability (
638- VulnerabilityType . INSECURE_COOKIE ,
639- Location . forSpanAndStack(null , new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
640- new Evidence (" cookie-name" )
641- )
638+ VulnerabilityType . INSECURE_COOKIE ,
639+ Location . forSpanAndStack(null , new StackTraceElement (" foo" , " foo" , " foo" , 1 )),
640+ new Evidence (" cookie-name" )
641+ )
642642 }
643643
644644 private Vulnerability headerVulnerability (){
645645 return new Vulnerability (
646- VulnerabilityType . XCONTENTTYPE_HEADER_MISSING , Location . forSpan(null ), null )
646+ VulnerabilityType . XCONTENTTYPE_HEADER_MISSING , Location . forSpan(null ), null )
647647 }
648648
649649 private void assertStackTrace (Map batch , Vulnerability [] vulnerabilities ) {
0 commit comments