Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ allprojects {

// Cap JVM args per test
minHeapSize = "256m"
maxHeapSize = "2g"
maxHeapSize = "1g"
Comment thread
cursor[bot] marked this conversation as resolved.
Outdated
}
withType<JavaCompile>().configureEach {
options.compilerArgs.addAll(arrayOf("-Xlint:all", "-Werror", "-Xlint:-classfile", "-Xlint:-processing", "-Xlint:-try"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}
Expand Down
5 changes: 0 additions & 5 deletions sentry-samples/sentry-samples-console-otlp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}
Expand Down
5 changes: 0 additions & 5 deletions sentry-samples/sentry-samples-console/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System tests lose sequential execution guarantee

Medium Severity

maxParallelForks = 1 was removed from all system test task configurations across ~20 sample modules. System tests interact with real servers and shared resources like network ports. Without this constraint, Gradle may fork multiple test processes in parallel (default is based on CPU count), causing port conflicts and flaky test failures. This change is unrelated to the Develocity plugin and appears accidental.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0d72252. Configure here.

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}
Expand Down
5 changes: 0 additions & 5 deletions sentry-samples/sentry-samples-jul/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}
Expand Down
5 changes: 0 additions & 5 deletions sentry-samples/sentry-samples-log4j2/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,6 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}
Expand Down
5 changes: 0 additions & 5 deletions sentry-samples/sentry-samples-logback/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}
Expand Down
5 changes: 0 additions & 5 deletions sentry-samples/sentry-samples-spring-7/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,6 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,6 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,6 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,6 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,6 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,10 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}

tasks.named("test").configure {
tasks.named<Test>("test").configure {
require(this is Test)

filter { excludeTestsMatching("io.sentry.systemtest.*") }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,6 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,6 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,9 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}

tasks.named("test").configure {
require(this is Test)

tasks.named<Test>("test").configure {
filter { excludeTestsMatching("io.sentry.systemtest.*") }
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}

Expand Down
5 changes: 0 additions & 5 deletions sentry-samples/sentry-samples-spring-boot/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,6 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,10 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}

tasks.named("test").configure {
tasks.named<Test>("test").configure {
require(this is Test)

filter { excludeTestsMatching("io.sentry.systemtest.*") }
Expand Down
5 changes: 0 additions & 5 deletions sentry-samples/sentry-samples-spring/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ tasks.register<Test>("systemTest").configure {

outputs.upToDateWhen { false }

maxParallelForks = 1

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"

filter { includeTestsMatching("io.sentry.systemtest*") }
}
Expand Down
12 changes: 12 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ pluginManagement {
}
}

plugins {
id("com.gradle.develocity") version "4.4.1"
}

develocity {
buildScan {
termsOfUseUrl.set("https://gradle.com/help/legal-terms-of-use")
termsOfUseAgree.set("yes")
publishing.onlyIf { true }
}
Comment on lines +14 to +19
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The Develocity configuration unconditionally publishes build scans to a public server for all builds, including local ones, exposing potentially sensitive environment data.
Severity: HIGH

Suggested Fix

Modify the publishing.onlyIf condition to only be true for CI/CD environments, not local builds. For example, check for a specific environment variable like CI. This will prevent local developer build data from being publicly uploaded.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: settings.gradle.kts#L14-L19

Potential issue: The Develocity build scan configuration in `settings.gradle.kts` is set
to always publish scans by using `publishing.onlyIf { true }`. Since a private server is
not specified, these scans are uploaded to the public Gradle server
(`scans.gradle.com`). This applies to all builds, including those run on local developer
machines, and can expose sensitive information like local usernames, file paths, and
operating system details without explicit user consent for each build.

Did we get this right? 👍 / 👎 to inform future reviews.

}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build scans unconditionally published to external service

Medium Severity

The Develocity configuration uses publishing.onlyIf { true }, which unconditionally publishes build scan data to Gradle's cloud servers on every build. Build scans can include environment variables, system properties, and file paths. This also automatically accepts the terms of service via termsOfUseAgree.set("yes") without any user awareness, which affects all contributors.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 9b87d20. Configure here.


dependencyResolutionManagement {
repositories {
google()
Expand Down
Loading