Skip to content
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
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,18 @@ jobs:
https://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html
"

- name: "security vulnerabilities"
install: skip
script: ${MVN} dependency-check:check
after_failure: |-
echo "FAILURE EXPLANATION:

The OWASP dependency check has found security vulnerabilities. Please use a newer version
of the dependency that does not have vulenerabilities. If the analysis has false positives,
they can be suppressed by adding entries to owasp-dependency-check-suppressions.xml (for more
information, see https://jeremylong.github.io/DependencyCheck/general/suppression.html).
"

- &package
name: "(openjdk8) packaging check"
install: skip
Expand Down
7 changes: 7 additions & 0 deletions benchmarks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,13 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class JsonIterator<T> implements Iterator<T>, Closeable
{
private JsonParser jp;
private ObjectCodec objectCodec;
private final TypeReference typeRef;
private final TypeReference<T> typeRef;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are these changes required for something or just opportunistic?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

They are required after upgrading Jackson to 2.10

private final InputStream inputStream;
private final Closeable resourceCloser;
private final ObjectMapper objectMapper;
Expand All @@ -55,7 +55,7 @@ public class JsonIterator<T> implements Iterator<T>, Closeable
* @param objectMapper object mapper, used for deserialization
*/
public JsonIterator(
TypeReference typeRef,
TypeReference<T> typeRef,
InputStream inputStream,
Closeable resourceCloser,
ObjectMapper objectMapper
Expand Down
5 changes: 5 additions & 0 deletions distribution/bin/check-licenses.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ def build_compatible_license_names():
compatible_licenses['The BSD 3-Clause License'] = 'BSD-3-Clause License'
compatible_licenses['Revised BSD'] = 'BSD-3-Clause License'
compatible_licenses['New BSD License'] = 'BSD-3-Clause License'
compatible_licenses['3-Clause BSD License'] = 'BSD-3-Clause License'

compatible_licenses['ICU License'] = 'ICU License'

Expand All @@ -254,6 +255,10 @@ def build_compatible_license_names():
compatible_licenses['Eclipse Public License - Version 1.0'] = 'Eclipse Public License 1.0'
compatible_licenses['Eclipse Public License, Version 1.0'] = 'Eclipse Public License 1.0'

compatible_licenses['Eclipse Distribution License 1.0'] = 'Eclipse Distribution License 1.0'
compatible_licenses['Eclipse Distribution License - v 1.0'] = 'Eclipse Distribution License 1.0'
compatible_licenses['EDL 1.0'] = 'Eclipse Distribution License 1.0'

compatible_licenses['Mozilla Public License Version 2.0'] = 'Mozilla Public License Version 2.0'
compatible_licenses['Mozilla Public License, Version 2.0'] = 'Mozilla Public License Version 2.0'

Expand Down
9 changes: 8 additions & 1 deletion distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

Expand Down Expand Up @@ -421,4 +428,4 @@
</build>
</profile>
</profiles>
</project>
</project>
22 changes: 22 additions & 0 deletions extensions-contrib/ambari-metrics-emitter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<!-- transitive dependency of org.apache.amabri:ambari-metrics-common; override version to fix security vulnerabilities -->
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-annotations</artifactId>
<version>${hadoop.compile.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
Expand Down Expand Up @@ -126,6 +132,22 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<ignoredUnusedDeclaredDependencies>
<!-- Transitive dependency but explicitly added to fix security vulnerability -->
<ignoredUnusedDeclaredDependency>org.apache.hadoop:hadoop-annotations</ignoredUnusedDeclaredDependency>
</ignoredUnusedDeclaredDependencies>
</configuration>
</plugin>
</plugins>
</build>

<repositories>
<repository>
<id>hortonworks</id>
Expand Down
10 changes: 10 additions & 0 deletions extensions-contrib/cassandra-storage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
<scope>provided</scope>
</dependency>
<dependency>
<!--
~ This library is no longer actively developed and should be migrated to DataStax Java Driver for Apache
~ Cassandra. Even the latest version of astyanax (3.10.2) has transitive dependencies with security
~ vulenerabilites with CVSS scores greater than 7 (e.g., libthrift 0.9.1).
-->
<groupId>com.netflix.astyanax</groupId>
<artifactId>astyanax</artifactId>
<version>1.0.1</version>
Expand Down Expand Up @@ -113,6 +118,11 @@
<groupId>com.github.stephenc.high-scale-lib</groupId>
<artifactId>high-scale-lib</artifactId>
</exclusion>
<exclusion>
<!-- Excluded to remove security vulnerability -->
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import org.apache.druid.client.cache.MapCache;
import org.apache.druid.client.selector.ServerSelector;
import org.apache.druid.data.input.MapBasedRow;
import org.apache.druid.data.input.Row;
import org.apache.druid.guice.DruidProcessingModule;
import org.apache.druid.guice.GuiceInjectors;
import org.apache.druid.guice.QueryRunnerFactoryModule;
Expand Down Expand Up @@ -99,7 +98,7 @@ public class MovingAverageQueryTest extends InitializedNullHandlingTest
private final RetryQueryRunnerConfig retryConfig;
private final ServerConfig serverConfig;

private final List<Row> groupByResults = new ArrayList<>();
private final List<ResultRow> groupByResults = new ArrayList<>();
private final List<Result<TimeseriesResultValue>> timeseriesResults = new ArrayList<>();

private final TestConfig config;
Expand Down Expand Up @@ -222,9 +221,9 @@ private Class<?> getExpectedQueryType()
return MovingAverageQuery.class;
}

private TypeReference<?> getExpectedResultType()
private TypeReference<List<MapBasedRow>> getExpectedResultType()
{
return new TypeReference<List<Row>>()
return new TypeReference<List<MapBasedRow>>()
{
};
}
Expand Down
2 changes: 1 addition & 1 deletion extensions-contrib/thrift-extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<modelVersion>4.0.0</modelVersion>

<properties>
<thrift.version>0.10.0</thrift.version>
<thrift.version>0.13.0</thrift.version>
<elephantbird.version>4.17</elephantbird.version>
<scrooge.version>19.10.0</scrooge.version>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,32 +67,32 @@ public class BasicAuthUtils
public static final int KEY_LENGTH = 512;
public static final String ALGORITHM = "PBKDF2WithHmacSHA512";

public static final TypeReference AUTHENTICATOR_USER_MAP_TYPE_REFERENCE =
public static final TypeReference<Map<String, BasicAuthenticatorUser>> AUTHENTICATOR_USER_MAP_TYPE_REFERENCE =
new TypeReference<Map<String, BasicAuthenticatorUser>>()
{
};

public static final TypeReference AUTHORIZER_USER_MAP_TYPE_REFERENCE =
public static final TypeReference<Map<String, BasicAuthorizerUser>> AUTHORIZER_USER_MAP_TYPE_REFERENCE =
new TypeReference<Map<String, BasicAuthorizerUser>>()
{
};

public static final TypeReference AUTHORIZER_GROUP_MAPPING_MAP_TYPE_REFERENCE =
public static final TypeReference<Map<String, BasicAuthorizerGroupMapping>> AUTHORIZER_GROUP_MAPPING_MAP_TYPE_REFERENCE =
new TypeReference<Map<String, BasicAuthorizerGroupMapping>>()
{
};

public static final TypeReference AUTHORIZER_ROLE_MAP_TYPE_REFERENCE =
public static final TypeReference<Map<String, BasicAuthorizerRole>> AUTHORIZER_ROLE_MAP_TYPE_REFERENCE =
new TypeReference<Map<String, BasicAuthorizerRole>>()
{
};

public static final TypeReference AUTHORIZER_USER_AND_ROLE_MAP_TYPE_REFERENCE =
public static final TypeReference<UserAndRoleMap> AUTHORIZER_USER_AND_ROLE_MAP_TYPE_REFERENCE =
new TypeReference<UserAndRoleMap>()
{
};

public static final TypeReference AUTHORIZER_GROUP_MAPPING_AND_ROLE_MAP_TYPE_REFERENCE =
public static final TypeReference<GroupMappingAndRoleMap> AUTHORIZER_GROUP_MAPPING_AND_ROLE_MAP_TYPE_REFERENCE =
new TypeReference<GroupMappingAndRoleMap>()
{
};
Expand Down
4 changes: 0 additions & 4 deletions extensions-core/kafka-extraction-namespace/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@
<relativePath>../../pom.xml</relativePath>
</parent>

<properties>
<apache.kafka.version>2.1.0</apache.kafka.version>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.druid</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ public void testSerDe() throws Exception
namespaceLookupExtractorFactory.getExtractionNamespace().getClass()
);
Assert.assertFalse(namespaceLookupExtractorFactory.replaces(mapper.readValue(str, LookupExtractorFactory.class)));
final Map<String, Object> map = new HashMap<>(mapper.<Map<String, Object>>readValue(
final Map<String, Object> map = new HashMap<>(mapper.readValue(
str,
JacksonUtils.TYPE_REFERENCE_MAP_STRING_OBJECT
));
Expand Down
6 changes: 1 addition & 5 deletions extensions-core/protobuf-extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@
<relativePath>../../pom.xml</relativePath>
</parent>

<properties>
<protobuf.version>3.2.0</protobuf.version>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.druid</groupId>
Expand Down Expand Up @@ -111,7 +107,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.0.0</version>
<version>3.2.1</version>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<relocations>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ private boolean restoreSequences() throws IOException
final File sequencesPersistFile = getSequencesPersistFile(toolbox);
if (sequencesPersistFile.exists()) {
sequences = new CopyOnWriteArrayList<>(
toolbox.getJsonMapper().<List<SequenceMetadata<PartitionIdType, SequenceOffsetType>>>readValue(
toolbox.getJsonMapper().readValue(
sequencesPersistFile,
getSequenceMetadataTypeReference()
)
Expand Down
11 changes: 7 additions & 4 deletions integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
<version>0.17.0-incubating-SNAPSHOT</version>
</parent>

<properties>
<apache.kafka.version>2.1.0</apache.kafka.version>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.druid</groupId>
Expand Down Expand Up @@ -252,6 +248,13 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import org.joda.time.Interval;

import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -96,7 +95,7 @@ private String getLoadStatusURL()
// return a list of the segment dates for the specified datasource
public List<String> getMetadataSegments(final String dataSource)
{
ArrayList<String> segments;
List<String> segments;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was required after upgrading Jackson to 2.10 (since TypeReference<List<String>> is used below)

try {
StatusResponseHolder response = makeRequest(HttpMethod.GET, getMetadataSegmentsURL(dataSource));

Expand All @@ -115,7 +114,7 @@ public List<String> getMetadataSegments(final String dataSource)
// return a list of the segment dates for the specified datasource
public List<String> getSegmentIntervals(final String dataSource)
{
ArrayList<String> segments;
List<String> segments;
try {
StatusResponseHolder response = makeRequest(HttpMethod.GET, getIntervalsURL(dataSource));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ public class ITBasicAuthConfigurationTest
{
private static final Logger LOG = new Logger(ITBasicAuthConfigurationTest.class);

private static final TypeReference LOAD_STATUS_TYPE_REFERENCE =
private static final TypeReference<Map<String, Boolean>> LOAD_STATUS_TYPE_REFERENCE =
new TypeReference<Map<String, Boolean>>()
{
};

private static final TypeReference SYS_SCHEMA_RESULTS_TYPE_REFERENCE =
private static final TypeReference<List<Map<String, Object>>> SYS_SCHEMA_RESULTS_TYPE_REFERENCE =
new TypeReference<List<Map<String, Object>>>()
{
};
Expand Down
Loading