Skip to content

Commit 3a0245b

Browse files
authored
Upgrade sailor 3 3 1 (#56)
* Upgrade component wit Sailor 3.3.1 and dependency check fix * Annual audit of the component code to check if it exposes sensitive data in the logs * Annual npm vulnerabilities audit
1 parent b2e8b14 commit 3a0245b

34 files changed

+254
-232
lines changed

.circleci/config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ jobs:
1414
paths:
1515
- ~/.gradle/caches
1616
- ~/.gradle/wrapper
17-
17+
- run:
18+
name: Audit Dependencies
19+
command: ./gradlew dependencyCheckAnalyze
1820
- run:
1921
name: Run Unit Tests
2022
command: ./gradlew test --daemon

CHANGELOG.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
# JDBC Component
2-
## 2.4.1 (September 25, 2020)
1+
## 2.4.2 (November 20, 2020)
32

4-
* Remove sensitive data from component logs
3+
* Upgrade sailor to 3.3.1
4+
* Annual audit of the component code to check if it exposes a sensitive data in the logs
5+
* Annual dependencies vulnerabilities audit
56

6-
## 2.3.2 (October 21, 2019)
7+
## 2.4.1 (October 21, 2019)
78

89
* Add rebound mechanism in case of deadlocks for actions: Insert, UpsertByPK, DeleteByPK
910

build.gradle

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
group = 'io.elastic'
2-
version = '2.4.1'
2+
version = '2.4.2'
33
apply plugin: 'java'
44
apply plugin: 'idea'
55
apply plugin: 'eclipse'
66
apply plugin: 'groovy'
7+
apply plugin: org.owasp.dependencycheck.gradle.DependencyCheckPlugin
78

89
sourceSets {
910
integrationTest {
@@ -55,22 +56,38 @@ repositories {
5556
}
5657

5758
dependencies {
58-
compile "io.elastic:sailor-jvm:2.1.0"
59-
compile "mysql:mysql-connector-java:8.0.11"
60-
compile group: 'org.postgresql', name: 'postgresql', version: '42.2.4'
6159
compile files("./lib/ojdbc6.jar")
6260
compile files("./lib/sqljdbc4.jar")
63-
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
64-
compile group: 'com.microsoft.sqlserver', name: 'mssql-jdbc', version: '6.4.0.jre8'
65-
compile 'com.fasterxml.jackson.core:jackson-core:2.7.3'
66-
compile 'com.fasterxml.jackson.core:jackson-annotations:2.7.3'
67-
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.3'
61+
// The following 3 dependencies are to workaround this: https://github.com/elasticio/sailor-jvm/issues/59
62+
compile 'com.fasterxml.jackson.core:jackson-core:2.10.1'
63+
compile 'com.fasterxml.jackson.core:jackson-annotations:2.10.1'
64+
compile 'com.fasterxml.jackson.core:jackson-databind:2.10.1'
65+
compile 'com.google.code.gson:gson:2.8.6'
66+
compile 'com.microsoft.sqlserver:mssql-jdbc:6.4.0.jre8'
67+
compile 'io.elastic:sailor-jvm:3.3.1'
68+
compile 'mysql:mysql-connector-java:8.0.20'
69+
compile 'org.postgresql:postgresql:42.2.18'
6870

69-
testCompile group: 'io.github.cdimascio', name: 'java-dotenv', version: '5.1.0'
70-
testCompile "org.spockframework:spock-core:1.1-groovy-2.4"
71+
testCompile 'io.github.cdimascio:java-dotenv:5.1.0'
7172
testCompile 'org.hsqldb:hsqldb:2.0.0'
73+
testCompile 'org.spockframework:spock-core:1.1-groovy-2.4'
7274
}
7375

76+
check.dependsOn dependencyCheckAnalyze
77+
78+
dependencyCheck {
79+
format = 'ALL'
80+
failBuildOnCVSS = 7
81+
}
82+
83+
buildscript {
84+
repositories {
85+
mavenCentral()
86+
}
87+
dependencies {
88+
classpath 'org.owasp:dependency-check-gradle:6.0.3'
89+
}
90+
}
7491

7592
wrapper {
7693
gradleVersion = '5.4.1'

component.json

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"oracle": "Oracle",
1616
"mssql": "MSSQL"
1717
},
18-
"prompt": "Please Select Database Type"
18+
"note": "Please Select Database Type"
1919
},
2020
"host": {
2121
"viewClass": "TextFieldView",
@@ -64,14 +64,14 @@
6464
"fields": {
6565
"tableName": {
6666
"viewClass": "SelectView",
67-
"prompt": "Select a Table",
67+
"note": "Select a Table",
6868
"label": "Tables List",
6969
"required": true,
7070
"model": "io.elastic.jdbc.providers.TableNameProvider"
7171
},
7272
"pollingField": {
7373
"viewClass": "SelectView",
74-
"prompt": "Select a Timestamp (or similar) Column",
74+
"note": "Select a Timestamp (or similar) Column",
7575
"label": "Timestamp (or similar) Column",
7676
"model": "io.elastic.jdbc.providers.TimeStampColumnNamesProvider",
7777
"required": true,
@@ -81,7 +81,8 @@
8181
},
8282
"pollingValue": {
8383
"viewClass": "TextFieldView",
84-
"label": "Start Polling From (optional)",
84+
"label": "Start Polling From",
85+
"note": "Current date is used if no value is specified",
8586
"required": false,
8687
"placeholder": "1970-01-01 00:00:00.000"
8788
}
@@ -119,14 +120,14 @@
119120
"fields": {
120121
"tableName": {
121122
"viewClass": "SelectView",
122-
"prompt": "Select a Table",
123+
"note": "Select a Table",
123124
"label": "Tables List",
124125
"required": true,
125126
"model": "io.elastic.jdbc.providers.TableNameProviderOld"
126127
},
127128
"orderField": {
128129
"viewClass": "SelectView",
129-
"prompt": "Select a field to order rows",
130+
"note": "Select a field to order rows",
130131
"label": "Order Column",
131132
"model": "io.elastic.jdbc.providers.ColumnNamesProviderOld",
132133
"required": true,
@@ -177,7 +178,7 @@
177178
"fields": {
178179
"tableName": {
179180
"viewClass": "SelectView",
180-
"prompt": "Select a Table",
181+
"note": "Select a Table",
181182
"label": "Table",
182183
"required": true,
183184
"model": "io.elastic.jdbc.providers.TableNameProvider"
@@ -196,14 +197,14 @@
196197
"fields": {
197198
"tableName": {
198199
"viewClass": "SelectView",
199-
"prompt": "Select a Table",
200+
"note": "Select a Table",
200201
"label": "Table",
201202
"required": true,
202203
"model": "io.elastic.jdbc.providers.TableNameProvider"
203204
},
204205
"reboundEnabled" : {
205206
"viewClass": "SelectView",
206-
"prompt": "Default is No",
207+
"note": "Default is No",
207208
"label": "Enable Rebound",
208209
"required": false,
209210
"model" : {
@@ -221,14 +222,14 @@
221222
"fields": {
222223
"tableName": {
223224
"viewClass": "SelectView",
224-
"prompt": "Select a Table",
225+
"note": "Select a Table",
225226
"label": "Table",
226227
"required": true,
227228
"model": "io.elastic.jdbc.providers.TableNameProvider"
228229
},
229230
"reboundEnabled" : {
230231
"viewClass": "SelectView",
231-
"prompt": "Default is No",
232+
"note": "Default is No",
232233
"label": "Enable Rebound",
233234
"required": false,
234235
"model" : {
@@ -246,7 +247,7 @@
246247
"fields": {
247248
"tableName": {
248249
"viewClass": "SelectView",
249-
"prompt": "Select a Table",
250+
"note": "Select a Table",
250251
"label": "Tables",
251252
"required": true,
252253
"model": "io.elastic.jdbc.providers.TableNameProvider"
@@ -257,7 +258,7 @@
257258
},
258259
"reboundEnabled" : {
259260
"viewClass": "SelectView",
260-
"prompt": "Default is No",
261+
"note": "Default is No",
261262
"label": "Enable Rebound",
262263
"required": false,
263264
"model" : {
@@ -295,14 +296,14 @@
295296
"fields": {
296297
"tableName": {
297298
"viewClass": "SelectView",
298-
"prompt": "Select a Table",
299+
"note": "Select a Table",
299300
"label": "Tables",
300301
"required": true,
301302
"model": "io.elastic.jdbc.providers.TableNameProviderOld"
302303
},
303304
"idColumn": {
304305
"viewClass": "SelectView",
305-
"prompt": "Select an ID column",
306+
"note": "Select an ID column",
306307
"label": "ID Column",
307308
"model": "io.elastic.jdbc.providers.ColumnNamesProviderOld",
308309
"required": true,
@@ -320,14 +321,14 @@
320321
"fields": {
321322
"schemaName": {
322323
"viewClass": "SelectView",
323-
"prompt": "Select a Schema",
324+
"note": "Select a Schema",
324325
"label": "DB Schema",
325326
"required": true,
326327
"model": "io.elastic.jdbc.providers.SchemasProvider"
327328
},
328329
"procedureName": {
329330
"viewClass": "SelectView",
330-
"prompt": "Select a stored procedure name",
331+
"note": "Select a stored procedure name",
331332
"label": "Stored procedure",
332333
"model": "io.elastic.jdbc.providers.ProcedureFieldsNameProvider",
333334
"required": true,

gradle/wrapper/gradle-wrapper.jar

4.49 KB
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Tue Aug 13 13:58:37 EEST 2019
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

0 commit comments

Comments
 (0)