Skip to content

Commit 4d8ccf9

Browse files
authored
Merge branch 'master' into malvarez/rasp-ssrf-with-url
2 parents 9dc7948 + 63ccd4c commit 4d8ccf9

20 files changed

Lines changed: 41 additions & 41 deletions

File tree

.circleci/config.continue.yml.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ build_test_jobs: &build_test_jobs
10571057
name: z_test_<< matrix.testJvm >>_base
10581058
triggeredBy: *core_modules
10591059
gradleTarget: ":baseTest"
1060-
gradleParameters: "-PskipFlakyTests -PskipInstTests -PskipSmokeTests -PskipProfilingTests -PskipDebuggerTests"
1060+
gradleParameters: "-PskipFlakyTests"
10611061
stage: core
10621062
cacheType: base
10631063
parallelism: 4
@@ -1070,8 +1070,8 @@ build_test_jobs: &build_test_jobs
10701070
- ok_to_test
10711071
name: z_test_8_base
10721072
triggeredBy: *core_modules
1073-
gradleTarget: :baseTest jacocoTestReport jacocoTestCoverageVerification
1074-
gradleParameters: "-PskipFlakyTests -PskipInstTests -PskipSmokeTests -PskipProfilingTests -PskipDebuggerTests"
1073+
gradleTarget: :baseTest
1074+
gradleParameters: "-PskipFlakyTests -PcheckCoverage"
10751075
stage: core
10761076
cacheType: base
10771077
parallelism: 4

.circleci/upload_ciapp.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ java_prop () {
1515

1616
# based on tracer implementation: https://github.com/DataDog/dd-trace-java/blob/master/dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/decorator/TestDecorator.java#L55-L77
1717
datadog-ci junit upload --service $SERVICE_NAME \
18+
--logs \
1819
--tags "test.traits:{\"marker\":[\"$1\"]}" \
1920
--tags "runtime.name:$(java_prop java.runtime.name)" \
2021
--tags "runtime.vendor:$(java_prop java.vendor)" \

.github/workflows/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ _Action:_ Run GitHub CodeQL action, upload result to GitHub security tab and Dat
9898

9999
_Trigger:_ Every week or manually.
100100

101-
_Action:_ Update the Grade dependencies and their locking files.
101+
_Action:_ Create a PR updating the Grade dependencies and their locking files.
102102

103103
_Recovery:_ Manually trigger the action again.
104104

.github/workflows/add-milestone-to-pull-requests.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,14 @@ jobs:
5757
return a.version.patch - b.version.patch
5858
})
5959
.pop()?.number
60-
} else if (base.startsWith('release/v')) {
61-
// Pick the milestone with the same title as the base branch
62-
const version = base.substring(9)
60+
} else if (base.startsWith('release/v') && base.endsWith('.x')) {
61+
// Extract the minor version related to the base branch (e.g. "release/v1.2.x" -> "1.2.")
62+
const version = base.substring(9, base.length - 1)
63+
// Pick the milestone with title matching the extracted version
6364
const versionMilestone = response.data
64-
.find(milestone => milestone.title == version)
65+
.find(milestone => milestone.title.startsWith(version))
6566
if (!versionMilestone) {
66-
core.setFailed(`Version milestone not found: ${version}`)
67+
core.setFailed(`Milestone not found for minor version: ${version}`)
6768
} else {
6869
milestoneNumber = versionMilestone.number
6970
}

.github/workflows/add-release-to-cloudfoundry.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
MAX_TRIES=60 # Wait up to 30 minutes
2727
DELAY=30
2828
while [ $TRY -lt $MAX_TRIES ]; do
29-
if curl -s -I ${{ steps.get-release-url.outputs.URL }} | grep -q "200 OK"; then
29+
if curl -s -I ${{ steps.get-release-url.outputs.URL }} | grep -q "^HTTP/.* 200"; then
3030
break
3131
fi
3232
echo "Waiting for the release to be available..."

.github/workflows/update-gradle-dependencies.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
GH_TOKEN: ${{ github.token }}
7171
run: |
7272
gh pr create --title "Update Gradle dependencies" \
73-
--body "This PR updates the Gradle dependencies. \n:warning: Don't forget to squash commits before merging :warning:" \
73+
--body "This PR updates the Gradle dependencies. ⚠️ Don't forget to squash commits before merging. ⚠️" \
7474
--base master \
7575
--head $BRANCH_NAME \
7676
--label "tag: dependencies" \

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,9 @@ allprojects { project ->
165165
}
166166

167167

168-
def testAggregate(String baseTaskName, includePrefixes, excludePrefixes, boolean coverage = false) {
168+
def testAggregate(String baseTaskName, includePrefixes, excludePrefixes, boolean forceCoverage = false) {
169169
def createRootTask = { rootTaskName, subProjTaskName ->
170+
def coverage = forceCoverage || rootProject.hasProperty("checkCoverage")
170171
tasks.register(rootTaskName) { aggTest ->
171172
subprojects { subproject ->
172173
if (subproject.property("activePartition") && includePrefixes.any { subproject.path.startsWith(it) } && !excludePrefixes.any { subproject.path.startsWith(it) }) {

dd-java-agent/agent-debugger/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,6 @@ jar {
7373
from sourceSets.main.output
7474
}
7575

76-
tasks.withType(Test).configureEach {
77-
onlyIf { !project.rootProject.hasProperty("skipDebuggerTests") }
78-
}
79-
8076
// we want to test with no special reflective access (no --add-opens)
8177
ext.allowReflectiveAccessToJdk = false
8278

83-
subprojects { Project subProj ->
84-
subProj.tasks.withType(Test).configureEach { subTask ->
85-
onlyIf { !project.rootProject.hasProperty("skipDebuggerTests") }
86-
}
87-
}

dd-java-agent/agent-debugger/src/main/java/com/datadog/debugger/agent/ClassesToRetransformFinder.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ Trie getAllChangedClasses(ConfigurationComparer comparer) {
8989

9090
private void processAdditionalClasses(String sourceFile, Trie changedClasses) {
9191
sourceFile = stripPackagePath(sourceFile);
92-
List<String> additionalClasses = classNamesBySourceFile.get(sourceFile);
92+
// need to clone the list to avoid concurrent modification during iteration
93+
List<String> additionalClasses =
94+
classNamesBySourceFile.computeIfPresent(
95+
sourceFile, (k, classNames) -> new ArrayList<>(classNames));
9396
if (additionalClasses == null) {
9497
return;
9598
}

dd-java-agent/agent-debugger/src/main/java/com/datadog/debugger/symbol/SymDBEnablement.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import datadog.trace.util.Strings;
1414
import java.io.ByteArrayInputStream;
1515
import java.io.ByteArrayOutputStream;
16+
import java.io.File;
1617
import java.io.IOException;
1718
import java.io.InputStream;
1819
import java.lang.instrument.Instrumentation;
@@ -160,11 +161,16 @@ private void extractSymbolForLoadedClasses() {
160161
if (!Files.exists(jarPath)) {
161162
continue;
162163
}
164+
File jarPathFile = jarPath.toFile();
165+
if (jarPathFile.isDirectory()) {
166+
// we are not supporting class directories (classpath) but only jar files
167+
continue;
168+
}
163169
if (alreadyScannedJars.contains(jarPath.toString())) {
164170
continue;
165171
}
166172
try {
167-
try (JarFile jarFile = new JarFile(jarPath.toFile())) {
173+
try (JarFile jarFile = new JarFile(jarPathFile)) {
168174
jarFile.stream()
169175
.filter(jarEntry -> jarEntry.getName().endsWith(".class"))
170176
.filter(

0 commit comments

Comments
 (0)