Skip to content

Commit

Permalink
update dependencies of sample apps to fix security vulnerability (#660)
Browse files Browse the repository at this point in the history
* update dependencies of sample apps to fix security vulnerability

Signed-off-by: Johnson Shih <[email protected]>

* use packages with specific version

Signed-off-by: Johnson Shih <[email protected]>

* remove duplicate installation

Signed-off-by: Johnson Shih <[email protected]>

* Update patch version

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Signed-off-by: Johnson Shih <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
johnsonshih and github-actions[bot] authored Sep 26, 2023
1 parent f01f161 commit 95adb80
Show file tree
Hide file tree
Showing 29 changed files with 86 additions and 300 deletions.
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion agent/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "agent"
version = "0.12.8"
version = "0.12.9"
license = "Apache-2.0"
authors = ["Kate Goldenring <[email protected]>", "<[email protected]>"]
edition = "2018"
Expand Down
11 changes: 5 additions & 6 deletions build/containers/Dockerfile.anomaly-detection-app
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ FROM ${PLATFORM}/debian:bullseye-slim
# Avoid tzdata prompt
ARG DEBIAN_FRONTEND=noninteractive

WORKDIR /app
COPY ./samples/apps/anomaly-detection-app .

RUN echo "Creating container based on ${PLATFORM}/debian:bullseye-slim" && \
apt-get update && \
apt-get install -y protobuf-compiler libprotoc-dev python3-pip \
python3-grpcio python3-sklearn && \
apt-get install -y protobuf-compiler libprotoc-dev python3-pip && \
apt-get clean && \
pip3 install numpy protobuf flask

WORKDIR /app
COPY ./samples/apps/anomaly-detection-app .
pip3 install -r ./requirements.txt

# Link the container to the Akri repository
LABEL org.opencontainers.image.source https://github.com/project-akri/akri
Expand Down
10 changes: 5 additions & 5 deletions build/containers/Dockerfile.video-streaming-app
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ FROM ${PLATFORM}/debian:bullseye-slim
# Avoid tzdata prompt
ARG DEBIAN_FRONTEND=noninteractive

WORKDIR /app
COPY ./samples/apps/video-streaming-app .

RUN echo "Creating container based on ${PLATFORM}/debian:bullseye-slim" && \
apt-get update && \
apt-get install -y protobuf-compiler libprotoc-dev python3-pip python3-grpcio python3-kubernetes && \
apt-get install -y protobuf-compiler libprotoc-dev python3-pip && \
apt-get clean && \
pip3 install protobuf flask

WORKDIR /app
COPY ./samples/apps/video-streaming-app .
pip3 install -r ./requirements.txt

# Link the container to the Akri repository
LABEL org.opencontainers.image.source https://github.com/project-akri/akri
Expand Down
2 changes: 1 addition & 1 deletion controller/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "controller"
version = "0.12.8"
version = "0.12.9"
license = "Apache-2.0"
authors = ["<[email protected]>", "<[email protected]>"]
edition = "2018"
Expand Down
4 changes: 2 additions & 2 deletions deployment/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.12.8
version: 0.12.9

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.12.8
appVersion: 0.12.9
1 change: 1 addition & 0 deletions deployment/samples/akri-anomaly-detection-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ spec:
image: ghcr.io/project-akri/akri/anomaly-detection-app:latest-dev
imagePullPolicy: Always
securityContext:
runAsUser: 1000
allowPrivilegeEscalation: false
runAsNonRoot: true
readOnlyRootFilesystem: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "debug-echo-discovery-handler"
version = "0.12.8"
version = "0.12.9"
license = "Apache-2.0"
authors = ["Kate Goldenring <[email protected]>"]
edition = "2018"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "onvif-discovery-handler"
version = "0.12.8"
version = "0.12.9"
license = "Apache-2.0"
authors = ["Kate Goldenring <[email protected]>"]
edition = "2018"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "opcua-discovery-handler"
version = "0.12.8"
version = "0.12.9"
license = "Apache-2.0"
authors = ["Kate Goldenring <[email protected]>"]
edition = "2018"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "udev-discovery-handler"
version = "0.12.8"
version = "0.12.9"
license = "Apache-2.0"
authors = ["Kate Goldenring <[email protected]>"]
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion discovery-handlers/debug-echo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-debug-echo"
version = "0.12.8"
version = "0.12.9"
license = "Apache-2.0"
authors = ["Kate Goldenring <[email protected]>"]
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion discovery-handlers/onvif/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-onvif"
version = "0.12.8"
version = "0.12.9"
license = "Apache-2.0"
authors = ["Kate Goldenring <[email protected]>"]
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion discovery-handlers/opcua/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-opcua"
version = "0.12.8"
version = "0.12.9"
license = "Apache-2.0"
authors = ["Kate Goldenring <[email protected]>"]
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion discovery-handlers/udev/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-udev"
version = "0.12.8"
version = "0.12.9"
license = "Apache-2.0"
authors = ["Kate Goldenring <[email protected]>"]
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion discovery-utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-discovery-utils"
version = "0.12.8"
version = "0.12.9"
license = "Apache-2.0"
authors = ["Kate Goldenring <[email protected]>"]
edition = "2018"
Expand Down
4 changes: 2 additions & 2 deletions samples/apps/anomaly-detection-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ To clean up, simply run `pip uninstall -r requirements.txt -y`.
## Generating Protobuf Code
Set the path of the `opcua_node.proto` file and generate using `grpc-tools.protoc`. `grpc-tools` should've been installed in the previous step. The following assumes the `akri` repository is in the `$HOME` directory.
```
export SRC_DIR=$HOME/akri/samples/brokers/opcua-monitoring-broker
python -m grpc_tools.protoc -I=$SRC_DIR --python_out=. --grpc_python_out=. $SRC_DIR/opcua_node.proto
export SRC_DIR=../../../samples/brokers/opcua-monitoring-broker
python3 -m grpc_tools.protoc -I=$SRC_DIR --python_out=. --grpc_python_out=. $SRC_DIR/opcua_node.proto
```

## Running
Expand Down
4 changes: 2 additions & 2 deletions samples/apps/anomaly-detection-app/generategrpc.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# based on https://grpc.io/docs/tutorials/basic/python/
ABS_PATH=$(dirname $(readlink -e ../../samples/brokers/opcua-monitoring-broker/opcua_node.proto))
ABS_PATH=$(dirname $(readlink -e ../../../samples/brokers/opcua-monitoring-broker/opcua_node.proto))
echo "absolute path to proto file is $ABS_PATH"
python -m grpc_tools.protoc -I./ --python_out=. --grpc_python_out=. opcua_node.proto --proto_path=$ABS_PATH
python3 -m grpc_tools.protoc -I./ --python_out=. --grpc_python_out=. opcua_node.proto --proto_path=$ABS_PATH
Loading

0 comments on commit 95adb80

Please sign in to comment.