GP-6719 Improved Ghidra Server RMI deserialization filter and added client-side module-based RMI deserialization filter.

This commit is contained in:
ghidra1
2026-05-04 10:22:51 -04:00
parent 3366060868
commit e04d9ec716
45 changed files with 1981 additions and 692 deletions
+27
View File
@@ -319,6 +319,33 @@ def getCurrentDateTimeLong() {
return formattedDate
}
/*********************************************************************************
* Returns true if 'project' has a direct or transitive API project dependency
* on the project with path 'targetPath'. The 'targetPath' should be specified
* in the form ":<project-name>"
*********************************************************************************/
boolean hasApiProjectDependency(Project project, String targetPath) {
def visited = [] as Set
def walk
walk = { Project p ->
if (!visited.add(p)) return false
def apiDeps = p.configurations.api
.allDependencies
.withType(org.gradle.api.artifacts.ProjectDependency)
if (apiDeps.any { it.dependencyProject.path == targetPath }) {
return true
}
return apiDeps.any { dep -> walk(dep.dependencyProject) }
}
walk(project)
}
/*********************************************************************************
* Returns a list of all the external library paths declared as dependencies for the
* given project