Skip to content

Commit 9f02550

Browse files
committed
upgrade vulnerable dependency
1 parent 8ec76f7 commit 9f02550

File tree

4 files changed

+87
-87
lines changed

4 files changed

+87
-87
lines changed

.github/workflows/test.yml

Lines changed: 82 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -3,88 +3,88 @@ name: run tests
33
on: [push]
44

55
jobs:
6-
test:
7-
runs-on: ubuntu-latest
8-
permissions:
9-
contents: 'read'
10-
id-token: 'write'
6+
test:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: "read"
10+
id-token: "write"
1111

12-
steps:
13-
- uses: actions/checkout@v4
14-
- name: Authenticate to Google Cloud
15-
id: auth
16-
uses: google-github-actions/auth@v1
17-
with:
18-
token_format: access_token
19-
workload_identity_provider: projects/949875736540/locations/global/workloadIdentityPools/external-pool/providers/github-provider
20-
service_account: [email protected]
21-
- name: Login to GAR
22-
uses: docker/login-action@v3
23-
with:
24-
registry: europe-west3-docker.pkg.dev
25-
username: oauth2accesstoken
26-
password: ${{ steps.auth.outputs.access_token }}
27-
- uses: hoverkraft-tech/[email protected]
28-
- name: Set up Java
29-
uses: actions/setup-java@v4
30-
with:
31-
distribution: 'temurin'
32-
java-version: '21'
33-
cache: 'gradle'
34-
- name: Install dependencies
35-
run: |
36-
sudo apt-get install jq curl
37-
- name: Set Release version env variable
38-
run: |
39-
echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
40-
- name: Run example
41-
run: |
42-
echo "running example";
43-
sleep 5;
44-
docker compose logs;
45-
curl --location "http://localhost:9000/v1/users"
46-
47-
ACCOUNT_RESPONSE=$(curl -s --location "http://localhost:9000/v1/accounts" \
48-
--header "Content-Type: application/json" \
49-
--data-raw '{
50-
"companyName": "demo",
51-
"email": "[email protected]",
52-
"password": "Password1234!"
53-
}');
54-
export TALON_USER_ID=$(echo $ACCOUNT_RESPONSE | jq ".userId");
55-
export TALON_USER_TOKEN=$(echo $ACCOUNT_RESPONSE | jq ".token" | tr -d '"');
56-
USER_RESPONSE=$(curl -s --location "http://localhost:9000/v1/users/$TALON_USER_ID" \
57-
--header "Authorization: Bearer $TALON_USER_TOKEN");
58-
export TALON_ACCOUNT_ID=$(echo $USER_RESPONSE | jq ".accountId");
59-
echo "User with ID $TALON_USER_ID and Token $TALON_USER_TOKEN was created for application $TALON_ACCOUNT_ID";
60-
APPLICATION_RESPONSE=$(curl -s --location "http://localhost:9000/v1/applications" \
61-
--header "Content-Type: application/json" \
62-
--header "Authorization: Bearer $TALON_USER_TOKEN" \
63-
--data-raw '{
64-
"name": "demo",
65-
"currency": "EUR",
66-
"timezone": "Europe/Berlin",
67-
"enableFlattenedCartItems": false
68-
}');
69-
export TALON_APPLICATION_ID=$(echo $USER_RESPONSE | jq ".id");
70-
echo "Application with ID $TALON_APPLICATION_ID was created"
71-
API_KEY_RESPONSE=$(curl -s -v --location "http://localhost:9000/v1/applications/$TALON_APPLICATION_ID/apikeys" \
72-
--header "Content-Type: application/json" \
73-
--header "Authorization: Bearer $TALON_USER_TOKEN" \
74-
--data-raw '{
75-
"title": "Application HIT KEY",
76-
"expires": "2099-01-01T0:00:00Z"
77-
}');
78-
echo "Api-Key-Response: $API_KEY_RESPONSE";
79-
export TALON_API_KEY=$(echo $API_KEY_RESPONSE | jq ".key" | tr -d '"');
80-
echo "Api-Key $TALON_API_KEY created";
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Authenticate to Google Cloud
15+
id: auth
16+
uses: google-github-actions/auth@v1
17+
with:
18+
token_format: access_token
19+
workload_identity_provider: projects/949875736540/locations/global/workloadIdentityPools/external-pool/providers/github-provider
20+
service_account: [email protected]
21+
- name: Login to GAR
22+
uses: docker/login-action@v3
23+
with:
24+
registry: europe-west3-docker.pkg.dev
25+
username: oauth2accesstoken
26+
password: ${{ steps.auth.outputs.access_token }}
27+
- uses: hoverkraft-tech/[email protected]
28+
- name: Set up Java
29+
uses: actions/setup-java@v4
30+
with:
31+
distribution: "temurin"
32+
java-version: "21"
33+
cache: "gradle"
34+
- name: Install dependencies
35+
run: |
36+
sudo apt-get install jq curl
37+
- name: Set Release version env variable
38+
run: |
39+
echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
40+
- name: Run example
41+
run: |
42+
echo "running example";
43+
sleep 5;
44+
docker compose logs;
45+
curl --location "http://localhost:9000/v1/users"
8146
82-
echo "maven install";
83-
mvn clean install;
84-
export CLASSPATH=.:./src/main/java:./target/lib/gson-2.8.9.jar:./target/talon-one-client-${{ env.RELEASE_VERSION }}.jar:./target/lib/okio-1.17.2.jar:./target/lib/okhttp-3.14.7.jar:./target/lib/threetenbp-1.4.3.jar:./target/lib/gson-fire-1.8.4.jar;
85-
86-
echo "java compile";
87-
javac -d . Example.java;
47+
ACCOUNT_RESPONSE=$(curl -s --location "http://localhost:9000/v1/accounts" \
48+
--header "Content-Type: application/json" \
49+
--data-raw '{
50+
"companyName": "demo",
51+
"email": "[email protected]",
52+
"password": "Password1234!"
53+
}');
54+
export TALON_USER_ID=$(echo $ACCOUNT_RESPONSE | jq ".userId");
55+
export TALON_USER_TOKEN=$(echo $ACCOUNT_RESPONSE | jq ".token" | tr -d '"');
56+
USER_RESPONSE=$(curl -s --location "http://localhost:9000/v1/users/$TALON_USER_ID" \
57+
--header "Authorization: Bearer $TALON_USER_TOKEN");
58+
export TALON_ACCOUNT_ID=$(echo $USER_RESPONSE | jq ".accountId");
59+
echo "User with ID $TALON_USER_ID and Token $TALON_USER_TOKEN was created for application $TALON_ACCOUNT_ID";
60+
APPLICATION_RESPONSE=$(curl -s --location "http://localhost:9000/v1/applications" \
61+
--header "Content-Type: application/json" \
62+
--header "Authorization: Bearer $TALON_USER_TOKEN" \
63+
--data-raw '{
64+
"name": "demo",
65+
"currency": "EUR",
66+
"timezone": "Europe/Berlin",
67+
"enableFlattenedCartItems": false
68+
}');
69+
export TALON_APPLICATION_ID=$(echo $USER_RESPONSE | jq ".id");
70+
echo "Application with ID $TALON_APPLICATION_ID was created"
71+
API_KEY_RESPONSE=$(curl -s -v --location "http://localhost:9000/v1/applications/$TALON_APPLICATION_ID/apikeys" \
72+
--header "Content-Type: application/json" \
73+
--header "Authorization: Bearer $TALON_USER_TOKEN" \
74+
--data-raw '{
75+
"title": "Application HIT KEY",
76+
"expires": "2099-01-01T0:00:00Z"
77+
}');
78+
echo "Api-Key-Response: $API_KEY_RESPONSE";
79+
export TALON_API_KEY=$(echo $API_KEY_RESPONSE | jq ".key" | tr -d '"');
80+
echo "Api-Key $TALON_API_KEY created";
8881
89-
echo "java execute";
90-
java com.example.consumer.Example;
82+
echo "maven install";
83+
mvn clean install;
84+
export CLASSPATH=.:./src/main/java:./target/lib/gson-2.8.9.jar:./target/talon-one-client-${{ env.RELEASE_VERSION }}.jar:./target/lib/okio-1.17.2.jar:./target/lib/okhttp-4.9.2.jar:./target/lib/threetenbp-1.4.3.jar:./target/lib/gson-fire-1.8.4.jar;
85+
86+
echo "java compile";
87+
javac -d . Example.java;
88+
89+
echo "java execute";
90+
java com.example.consumer.Example;

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ if(hasProperty('target') && target == 'android') {
100100
dependencies {
101101
compile 'io.swagger:swagger-annotations:1.5.24'
102102
compile "com.google.code.findbugs:jsr305:3.0.2"
103-
compile 'com.squareup.okhttp3:okhttp:3.14.7'
104-
compile 'com.squareup.okhttp3:logging-interceptor:3.14.7'
103+
compile 'com.squareup.okhttp3:okhttp:4.9.2'
104+
compile 'com.squareup.okhttp3:logging-interceptor:4.9.2'
105105
compile 'com.google.code.gson:gson:2.8.6'
106106
compile 'io.gsonfire:gson-fire:1.8.4'
107107
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.18.0'

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ lazy val root = (project in file(".")).
1010
resolvers += Resolver.mavenLocal,
1111
libraryDependencies ++= Seq(
1212
"io.swagger" % "swagger-annotations" % "1.5.24",
13-
"com.squareup.okhttp3" % "okhttp" % "3.14.7",
14-
"com.squareup.okhttp3" % "logging-interceptor" % "3.14.7",
13+
"com.squareup.okhttp3" % "okhttp" % "4.9.2",
14+
"com.squareup.okhttp3" % "logging-interceptor" % "4.9.2",
1515
"com.google.code.gson" % "gson" % "2.8.6",
1616
"org.apache.commons" % "commons-lang3" % "3.18.0",
1717
"org.threeten" % "threetenbp" % "1.4.3" % "compile",

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@
285285
<maven.compiler.target>${java.version}</maven.compiler.target>
286286
<gson-fire-version>1.8.4</gson-fire-version>
287287
<swagger-core-version>1.5.24</swagger-core-version>
288-
<okhttp-version>3.14.7</okhttp-version>
288+
<okhttp-version>4.9.2</okhttp-version>
289289
<gson-version>2.8.9</gson-version>
290290
<commons-lang3-version>3.18.0</commons-lang3-version>
291291
<threetenbp-version>1.4.3</threetenbp-version>

0 commit comments

Comments
 (0)