Skip to content

Address cookie vulnerability cardinality issues #8210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ public interface VulnerabilityType {
type(VulnerabilityTypes.WEAK_HASH).excludedSources(Builder.DB_EXCLUDED).build();
VulnerabilityType INSECURE_COOKIE =
type(VulnerabilityTypes.INSECURE_COOKIE)
.hash(VulnerabilityType::evidenceHash)
.hash(VulnerabilityType::fileAndLineHash)
.excludedSources(Builder.DB_EXCLUDED)
.build();
VulnerabilityType NO_HTTPONLY_COOKIE =
type(VulnerabilityTypes.NO_HTTPONLY_COOKIE)
.hash(VulnerabilityType::evidenceHash)
.hash(VulnerabilityType::fileAndLineHash)
.excludedSources(Builder.DB_EXCLUDED)
.build();
VulnerabilityType HSTS_HEADER_MISSING =
Expand All @@ -51,7 +51,7 @@ public interface VulnerabilityType {
.build();
VulnerabilityType NO_SAMESITE_COOKIE =
type(VulnerabilityTypes.NO_SAMESITE_COOKIE)
.hash(VulnerabilityType::evidenceHash)
.hash(VulnerabilityType::fileAndLineHash)
.excludedSources(Builder.DB_EXCLUDED)
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ class VulnerabilityTypeTest extends DDSpecification {
WEAK_CIPHER | getSpanAndClassAndMethodLocation(123) | new Evidence("MD5") | 3265519776
WEAK_CIPHER | getSpanAndClassAndMethodLocation(456) | new Evidence("MD4") | 3265519776
WEAK_CIPHER | getSpanAndClassAndMethodLocation(789) | null | 3265519776
INSECURE_COOKIE | getSpanAndStackLocation(123) | null | 3471934557
INSECURE_COOKIE | getSpanAndStackLocation(123) | new Evidence("cookieName1") | 360083726
INSECURE_COOKIE | getSpanAndStackLocation(123) | new Evidence("cookieName2") | 2357141684
NO_HTTPONLY_COOKIE | getSpanAndStackLocation(123) | null | 2115643285
NO_HTTPONLY_COOKIE | getSpanAndStackLocation(123) | new Evidence("cookieName1") | 585548920
NO_HTTPONLY_COOKIE | getSpanAndStackLocation(123) | new Evidence("cookieName2") | 3153040834
NO_SAMESITE_COOKIE | getSpanAndStackLocation(123) | null | 3683185539
NO_SAMESITE_COOKIE | getSpanAndStackLocation(123) | new Evidence("cookieName1") | 881944211
NO_SAMESITE_COOKIE | getSpanAndStackLocation(123) | new Evidence("cookieName2") | 2912433961
INSECURE_COOKIE | getSpanAndStackLocation(123) | null | 1156210466
INSECURE_COOKIE | getSpanAndStackLocation(123) | new Evidence("cookieName1") | 1156210466
INSECURE_COOKIE | getSpanAndStackLocation(123) | new Evidence("cookieName2") | 1156210466
NO_HTTPONLY_COOKIE | getSpanAndStackLocation(123) | null | 1522983769
NO_HTTPONLY_COOKIE | getSpanAndStackLocation(123) | new Evidence("cookieName1") | 1522983769
NO_HTTPONLY_COOKIE | getSpanAndStackLocation(123) | new Evidence("cookieName2") | 1522983769
NO_SAMESITE_COOKIE | getSpanAndStackLocation(123) | null | 1090504969
NO_SAMESITE_COOKIE | getSpanAndStackLocation(123) | new Evidence("cookieName1") | 1090504969
NO_SAMESITE_COOKIE | getSpanAndStackLocation(123) | new Evidence("cookieName2") | 1090504969
XCONTENTTYPE_HEADER_MISSING | getSpanAndService(123, null) | null | 3429203725
XCONTENTTYPE_HEADER_MISSING | getSpanAndService(123, 'serviceName1') | null | 2718833340
XCONTENTTYPE_HEADER_MISSING | getSpanAndService(123, 'serviceName2') | null | 990333702
Expand Down
Loading