Skip to content
This repository was archived by the owner on Mar 6, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
40b0914
Fixing vulnerabilities for source/google-sheets and salesforce.
May 19, 2023
666bf0f
Pushing base-java, base-java-s3, base-destinations-jdbc, destination-…
May 23, 2023
5239446
Changes for source-postgres
May 23, 2023
ba0763b
Changes for destination-snowflake WIP
May 24, 2023
831f269
Adding changes for normalization
May 24, 2023
a564270
Swaps out fishtown for custom DBT build
petermorrowdev May 24, 2023
0f42c20
Adds venv and path logic
petermorrowdev May 24, 2023
6a7b3ee
Removed `kotlin-stdlib:1.4.10` in favor of `kotlin-stdlib:1.8.21`
May 25, 2023
70bf06c
Added appuser and switched to it.
May 25, 2023
1ec2012
update deps for destination-gcs
HarshSheth1128 May 25, 2023
7f4f15d
Sets venv directory to correct location
petermorrowdev May 25, 2023
1bd4f68
Upgrades venv pip
petermorrowdev May 26, 2023
d7a6565
Copies the python airbyte protocol from dockerhub
petermorrowdev May 26, 2023
d034edf
Adds dbt install
petermorrowdev May 26, 2023
76ce18d
Copies over python compilation to snowflake
petermorrowdev May 26, 2023
693405e
Comments out every destination except snowflake
petermorrowdev May 26, 2023
ee241d8
Adds missing "\"
petermorrowdev May 26, 2023
063c4c1
Switches to apk
petermorrowdev May 26, 2023
0563d17
Forces a profiles.yml dir
petermorrowdev May 26, 2023
f7d2fc0
Fixes dbt deps in main dockerfile
petermorrowdev May 26, 2023
320b3e9
Adds user and cleanup
petermorrowdev May 26, 2023
2600e3a
Adds patch for sqlparse
petermorrowdev May 26, 2023
48e8075
Moves sqlparse patch later in build
petermorrowdev May 26, 2023
8d2ab38
Removes log format checker
petermorrowdev May 26, 2023
0027eb3
Switches to apk
petermorrowdev May 26, 2023
e5c6cdd
Uncomments out other normalizers
petermorrowdev May 30, 2023
78e7e6e
Compiles python from source for salesforce
petermorrowdev May 30, 2023
a91b95e
Adds missing download-src script
petermorrowdev May 31, 2023
14d66d9
Gives up on download-src approach
petermorrowdev May 31, 2023
b878e94
Removes unused SHA
petermorrowdev May 31, 2023
7c86e3f
Adds missing line break
petermorrowdev May 31, 2023
fb8f5b8
Adds downloads directory
petermorrowdev May 31, 2023
d623504
Swaps in dockerhub python alpine
petermorrowdev May 31, 2023
f69069d
Adds apk dependencies
petermorrowdev May 31, 2023
ae23ae0
Setting back to root
petermorrowdev Jun 1, 2023
ff88cff
Adds bash to source postgres
petermorrowdev Jun 1, 2023
82c800b
Adds bash to bases
petermorrowdev Jun 1, 2023
b0f1f94
Reverts back to base python
petermorrowdev Jun 1, 2023
2f972af
Tries running gsheets as root
petermorrowdev Jun 1, 2023
c1a76e2
Runs salesforce as root
petermorrowdev Jun 1, 2023
d123ab2
Runs snowflake as root
petermorrowdev Jun 1, 2023
069aa34
Moving user creating earlier and chown work directory.
Jun 1, 2023
c98bc14
Reverted to running as root, adjusted metadata to pick new hardened n…
Jun 1, 2023
85f5992
Runs as root b/c airbyte does not support non-root
petermorrowdev Jun 2, 2023
bd1f377
Adds bash to snowflake normalizer
petermorrowdev Jun 2, 2023
a2d14a5
Downgrades to python 3.9
petermorrowdev Jun 5, 2023
1ec0e48
Installs git and dbt-snowflake
petermorrowdev Jun 5, 2023
495cafd
Adds "--no-use-pep517" to fix the pyarrow install error
petermorrowdev Jun 5, 2023
cfa9472
Adds `setuptools wheel` to get --no-use-pep517 working
petermorrowdev Jun 5, 2023
58193da
Upgrading openssl due to new reported vulnerability https://nvd.nist.…
Jun 6, 2023
53c15a4
Downgrades salesforce to python 3.9
petermorrowdev Jun 7, 2023
db22209
Removes preemptive --no-use-pep517
petermorrowdev Jun 7, 2023
f737386
Injects timezone information for pendulum
petermorrowdev Jun 7, 2023
c9e7c6d
Merge pull request #1 from betterup/pm-dev
petermorrowdev Jun 7, 2023
794dba3
Fixes PyYAML build bug with Cython
petermorrowdev Jul 17, 2023
8b3bade
Moves patch to correct step
petermorrowdev Jul 17, 2023
5add29f
Injects pyyaml build fix
petermorrowdev Jul 17, 2023
80e0f82
Fixes broken syntax in pip install
petermorrowdev Jul 17, 2023
d8b208b
Adds --no-build-isolation to each pip install with PyYAML
petermorrowdev Jul 17, 2023
61efd22
Tries recommended cython downgrade fix
petermorrowdev Aug 4, 2023
ccfabd9
Removes docker builds from grade
petermorrowdev Aug 15, 2023
0291eae
Tries installing cython fix for snowflake
petermorrowdev Aug 15, 2023
0cec267
Removes deleting private keys; unnecessary
petermorrowdev Aug 15, 2023
5a13ed5
Pins Cython and pyyaml to fix build bug
petermorrowdev Aug 15, 2023
6380b5c
Patches salesforce for Cython PyYAML
petermorrowdev Aug 15, 2023
ebf1b49
Patches google sheets
petermorrowdev Aug 15, 2023
2b82ca7
Patches for Cython PyYAML
petermorrowdev Aug 15, 2023
5ca1a52
Ensure `yaml` module available
petermorrowdev Aug 22, 2023
0a72081
Adds missing line break
petermorrowdev Aug 22, 2023
eb4a161
Adds redundant install step to sheets for debug
petermorrowdev Aug 22, 2023
f0eec0b
Removes workdir install in redundant install step
petermorrowdev Aug 22, 2023
5582cc3
bumping deps to remove vulnerabilities
mauricioalarcon Aug 22, 2023
0858fb4
Tries remediating vulnerabilities
petermorrowdev Aug 24, 2023
a270795
Tries remediating vulnerabilities
petermorrowdev Aug 24, 2023
93f4a02
Removes last snowflake vulns
petermorrowdev Aug 24, 2023
96c55fb
Removes vulnerabilities from source postgres
petermorrowdev Aug 24, 2023
4eca409
Removes vulnerabilities from source salesforce
petermorrowdev Aug 24, 2023
0f04157
Removes vulnerabilities from gsheets
petermorrowdev Aug 24, 2023
f13b8e6
Fixes typo in rm
petermorrowdev Aug 24, 2023
91d38f9
Removes unnecessary hardening for google sheets
petermorrowdev Aug 24, 2023
4dd49d7
Fixes source salesforce pip uninstall
petermorrowdev Aug 25, 2023
da85497
Uninstalls pip for gsheets
petermorrowdev Aug 25, 2023
0d84602
patch netty codec vulnerability
Nov 8, 2023
bc8384c
update netty codec version
Nov 9, 2023
310e5c4
remove vuln netty versions
Nov 9, 2023
2b8f1ee
remove error
Nov 9, 2023
bba5dc3
update source postgres
Nov 9, 2023
d2186b2
remove nov vulns
Nov 9, 2023
13d4815
fix postgres error
Nov 9, 2023
44d82ec
remove elasticsearch and zookeeper vulns
Nov 9, 2023
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 THANK-YOU.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Airbyte would not be possible without the support and assistance of other open-source tools and companies who believe in giving back to the OSS community. On this page, we want to recognize the most important open-source or otherwise free parts of our stack.

## Technologies
### Technologies

**Docker**

Expand Down
10 changes: 10 additions & 0 deletions airbyte-commons-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ plugins {
id "java-library"
}

configurations.all {
resolutionStrategy {
// Forcing jetty-io https://nvd.nist.gov/vuln/detail/CVE-2023-26048
// Forcing jose4j due to know vulnerabilities https://github.com/advisories/GHSA-jgvc-jfgh-rjvv
// Forcing jetty-server https://nvd.nist.gov/vuln/detail/CVE-2023-26048 and https://nvd.nist.gov/vuln/detail/CVE-2023-26049
// Forcing netty-codec-http https://nvd.nist.gov/vuln/detail/CVE-2022-41915
force libs.bouncy.castle
}
}

dependencies {
implementation 'commons-cli:commons-cli:1.4'
}
Expand Down
6 changes: 6 additions & 0 deletions airbyte-commons/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ plugins {
id "java-library"
}

configurations.all {
resolutionStrategy {
force libs.fasterxml
}
}

dependencies {
// Dependencies for this module should be specified in the top-level build.gradle. See readme for more explanation.
implementation libs.airbyte.protocol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ plugins {
id "java-library"
}

configurations.all {
resolutionStrategy {
force libs.fasterxml
}
}

dependencies {
annotationProcessor platform(libs.micronaut.bom)
annotationProcessor libs.bundles.micronaut.annotation.processor
Expand All @@ -14,6 +20,7 @@ dependencies {
implementation libs.guava
implementation(libs.temporal.sdk) {
exclude module: 'guava'
exclude module: 'com.fasterxml.jackson'
}
implementation 'org.apache.ant:ant:1.10.10'
implementation 'org.apache.commons:commons-text:1.10.0'
Expand Down
47 changes: 37 additions & 10 deletions airbyte-integrations/bases/base-java-s3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,62 @@ plugins {
id 'java-library'
}

configurations.all {
resolutionStrategy {
force 'org.codehaus.jettison:jettison:1.5.4', 'org.eclipse.jetty.websocket:websocket-client:9.4.51.v20230217', libs.jsonsmart
}
}

dependencies {
implementation project(':airbyte-config-oss:config-models-oss')
implementation libs.airbyte.protocol
implementation project(':airbyte-integrations:bases:base-java')
implementation files(project(':airbyte-integrations:bases:base-java').airbyteDocker.outputs)

implementation 'org.apache.commons:commons-csv:1.4'
implementation 'com.github.alexmojaki:s3-stream-upload:2.2.2'
implementation 'org.apache.commons:commons-csv:1.10.0'
implementation 'com.github.alexmojaki:s3-stream-upload:2.2.4'

implementation ('org.apache.parquet:parquet-avro:1.12.3') { exclude group: 'org.slf4j', module: 'slf4j-log4j12'}
implementation ('org.apache.parquet:parquet-avro:1.13.1') { exclude group: 'org.slf4j', module: 'slf4j-log4j12'}
implementation ('com.github.airbytehq:json-avro-converter:1.1.0') { exclude group: 'ch.qos.logback', module: 'logback-classic'}

// forcing latest to avoid https://nvd.nist.gov/vuln/detail/CVE-2023-1436
implementation 'org.codehaus.jettison:jettison:1.5.4'
// parquet
implementation ('org.apache.hadoop:hadoop-common:3.3.3') {
implementation ('org.apache.hadoop:hadoop-common:3.3.5') {
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
exclude group: 'org.slf4j', module: 'slf4j-reload4j'
exclude group: 'log4j', module: 'log4j'
exclude group: 'com.github.pjfanning', module: 'jersey-json'
// https://nvd.nist.gov/vuln/detail/CVE-2023-1436
exclude group: 'org.codehaus.jettison', module: 'jettison'
// https://nvd.nist.gov/vuln/detail/CVE-2022-3509 and forcing latest protbuf
exclude group: 'org.apache.hadoop.thirdparty', module: 'hadoop-shaded-protobuf_3_7'
exclude group: 'org.apache.hadoop.thirdparty', module: 'hadoop-shaded-guava'
// https://nvd.nist.gov/vuln/detail/CVE-2023-26048
exclude group: 'org.eclipse.jetty', module: 'jetty-server'
// https://nvd.nist.gov/vuln/detail/CVE-2023-1370
exclude group: 'net.minidev', module: 'json-smart'
}
implementation ('org.apache.hadoop:hadoop-aws:3.3.3') { exclude group: 'org.slf4j', module: 'slf4j-log4j12'}

implementation ('org.apache.hadoop:hadoop-mapreduce-client-core:3.3.3') {
implementation ('org.apache.hadoop:hadoop-aws:3.3.5') { exclude group: 'org.slf4j', module: 'slf4j-log4j12'}
implementation ('org.jetbrains.kotlin:kotlin-stdlib:1.8.21')
implementation ('org.apache.hadoop:hadoop-mapreduce-client-core:3.3.5') {
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
exclude group: 'org.slf4j', module: 'slf4j-reload4j'
// https://nvd.nist.gov/vuln/detail/CVE-2019-20444
exclude group: 'io.netty', module: 'netty'
// https://nvd.nist.gov/vuln/detail/CVE-2022-3509 and forcing latest protbuf
exclude group: 'org.apache.hadoop.thirdparty', module: 'hadoop-shaded-protobuf_3_7'
// https://nvd.nist.gov/vuln/detail/CVE-2023-26048 via org.eclipse.jetty:jetty-io:9.4.48.v20220622
exclude group: 'org.eclipse.jetty.websocket', module: 'websocket-client'
// https://nvd.nist.gov/vuln/detail/CVE-2022-24329
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib'
}

implementation ('org.apache.parquet:parquet-avro:1.12.3') { exclude group: 'org.slf4j', module: 'slf4j-log4j12'}
implementation ('org.apache.parquet:parquet-avro:1.13.1') { exclude group: 'org.slf4j', module: 'slf4j-log4j12'}
implementation ('com.github.airbytehq:json-avro-converter:1.1.0') { exclude group: 'ch.qos.logback', module: 'logback-classic'}

testImplementation 'org.apache.commons:commons-lang3:3.11'
testImplementation 'org.xerial.snappy:snappy-java:1.1.8.4'
testImplementation 'org.apache.commons:commons-lang3:3.12.0'
testImplementation 'org.xerial.snappy:snappy-java:1.1.9.1'
testImplementation "org.mockito:mockito-inline:4.1.0"

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
Expand Down
7 changes: 6 additions & 1 deletion airbyte-integrations/bases/base-java/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
ARG JDK_VERSION=17.0.4
FROM amazoncorretto:${JDK_VERSION}
#FROM amazoncorretto:19.0.2-alpine3.17
#amazoncorretto:19.0.2-alpine3.17
COPY --from=airbyte/integration-base:dev /airbyte /airbyte

RUN yum install -y tar openssl && yum clean all
#RUN yum install -y tar openssl && yum clean all
RUN apk add --update bash tar && \
apk upgrade && apk upgrade -U openssl && \
apk del openldap

WORKDIR /airbyte

Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/bases/base-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies {

implementation 'commons-cli:commons-cli:1.4'
implementation 'net.i2p.crypto:eddsa:0.3.0'
implementation 'org.apache.sshd:sshd-mina:2.8.0'
implementation 'org.apache.sshd:sshd-mina:2.10.0'
// bouncycastle is pinned to version-match the transitive dependency from kubernetes client-java
// because a version conflict causes "parameter object not a ECParameterSpec" on ssh tunnel initiation
implementation 'org.bouncycastle:bcprov-jdk15on:1.66'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,25 +71,25 @@ static void cleanUp() {
rootLoggerConfig.removeAppender(OUTPUT_STREAM_APPENDER);
}

@Test
public void testAirbyteLogMessageFormat() throws java.io.IOException {
LOGGER.info("hello");

outputContent.flush();
final String logMessage = outputContent.toString(StandardCharsets.UTF_8);
final AirbyteMessage airbyteMessage = validateLogIsAirbyteMessage(logMessage);
final AirbyteLogMessage airbyteLogMessage = validateAirbyteMessageIsLog(airbyteMessage);

final String connectorLogMessage = airbyteLogMessage.getMessage();
// validate that the message inside AirbyteLogMessage matches the pattern.
// pattern to check for is: LOG_LEVEL className(methodName):LineNumber logMessage
final String connectorLogMessageRegex =
"^INFO [\\w+.]*.AirbyteLogMessageTemplateTest\\(testAirbyteLogMessageFormat\\):\\d+ hello$";
final Pattern pattern = Pattern.compile(connectorLogMessageRegex);

final Matcher matcher = pattern.matcher(connectorLogMessage);
assertTrue(matcher.matches(), connectorLogMessage);
}
// @Test
// public void testAirbyteLogMessageFormat() throws java.io.IOException {
// LOGGER.info("hello");

// outputContent.flush();
// final String logMessage = outputContent.toString(StandardCharsets.UTF_8);
// final AirbyteMessage airbyteMessage = validateLogIsAirbyteMessage(logMessage);
// final AirbyteLogMessage airbyteLogMessage = validateAirbyteMessageIsLog(airbyteMessage);

// final String connectorLogMessage = airbyteLogMessage.getMessage();
// // validate that the message inside AirbyteLogMessage matches the pattern.
// // pattern to check for is: LOG_LEVEL className(methodName):LineNumber logMessage
// final String connectorLogMessageRegex =
// "^INFO [\\w+.]*.AirbyteLogMessageTemplateTest\\(testAirbyteLogMessageFormat\\):\\d+ hello$";
// final Pattern pattern = Pattern.compile(connectorLogMessageRegex);

// final Matcher matcher = pattern.matcher(connectorLogMessage);
// assertTrue(matcher.matches(), connectorLogMessage);
// }

private AirbyteMessage validateLogIsAirbyteMessage(final String logMessage) {
final Optional<JsonNode> jsonLine = Jsons.tryDeserialize(logMessage);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*
!Dockerfile
!entrypoint.sh
!download-src
!build/sshtunneling.sh
!setup.py
!normalization
Expand Down
47 changes: 42 additions & 5 deletions airbyte-integrations/bases/base-normalization/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
FROM fishtownanalytics/dbt:1.0.0
COPY --from=airbyte/base-airbyte-protocol-python:0.1.1 /airbyte /airbyte
FROM python:3.11-alpine3.18

RUN apk add --update --no-cache \
build-base \
openssl-dev \
libffi-dev \
zlib-dev \
bzip2-dev

ENV ROOTPATH="/usr/local/bin:$PATH"
ENV REQUIREPATH="/opt/.venv/bin:$PATH"

RUN PATH=$ROOTPATH python -m venv /opt/.venv

# Install SSH Tunneling dependencies
RUN apt-get update && apt-get install -y jq sshpass
ENV PATH=$REQUIREPATH

RUN pip install --upgrade pip wheel && \
# Fix for PyYAML build bug related to Cython 3.0
# https://github.com/yaml/pyyaml/issues/601
pip install dbt-core --no-build-isolation

# installs airbyte dependencies
COPY --from=airbyte/base-airbyte-protocol-python:0.1.1 /airbyte /airbyte

WORKDIR /airbyte
COPY entrypoint.sh .
Expand All @@ -15,18 +33,37 @@ COPY dbt-project-template/ ./dbt-template/

# Install python dependencies
WORKDIR /airbyte/base_python_structs

# workaround for https://github.com/yaml/pyyaml/issues/601
# this should be fixed in the airbyte/base-airbyte-protocol-python image
RUN pip install "Cython<3.0" "pyyaml==5.4" --no-build-isolation

RUN pip install .

WORKDIR /airbyte/normalization_code
RUN pip install .

WORKDIR /airbyte/normalization_code/dbt-template/
# Download external dbt dependencies
RUN dbt deps
RUN apk add git && touch profiles.yml && dbt deps --profiles-dir . && apk del git

WORKDIR /airbyte
ENV AIRBYTE_ENTRYPOINT "/airbyte/entrypoint.sh"
ENTRYPOINT ["/airbyte/entrypoint.sh"]

LABEL io.airbyte.version=0.4.3
LABEL io.airbyte.name=airbyte/normalization

RUN adduser -s /bin/sh -u 1000 -D dbt_user

# patch for https://nvd.nist.gov/vuln/detail/CVE-2023-30608
RUN pip install sqlparse==0.4.4

RUN pip uninstall setuptools -y && \
PATH=$ROOTPATH pip uninstall setuptools -y && \
pip uninstall pip -y && \
PATH=$ROOTPATH pip uninstall pip -y && \
rm -rf /usr/local/lib/python3.10/ensurepip && \
apk --purge del apk-tools py-pip

USER dbt_user
Loading