-
Notifications
You must be signed in to change notification settings - Fork 1.8k
s360: Resolve library vulnerabilty #26161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
StormLiangMS
merged 1 commit into
sonic-net:master
from
auspham:austinpham/36979761-update-docker-registry
Mar 17, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -99,22 +99,28 @@ RUN apt-get update \ | |
| wireshark-common \ | ||
| freeradius \ | ||
| quilt \ | ||
| {% if CONFIGURED_ARCH == "armhf" %} | ||
| && GRPCURL_ARCH=linux_armv6 \ | ||
| {% elif CONFIGURED_ARCH == "arm64" %} | ||
| && GRPCURL_ARCH=linux_arm64 \ | ||
| {% else %} | ||
| && GRPCURL_ARCH=linux_x86_64 \ | ||
| {% endif %} | ||
| && GRPCURL_VERSION=1.9.3 && \ | ||
| curl -L "https://github.com/fullstorydev/grpcurl/releases/download/v${GRPCURL_VERSION}/grpcurl_${GRPCURL_VERSION}_${GRPCURL_ARCH}.tar.gz" \ | ||
| -o /tmp/grpcurl_${GRPCURL_VERSION}_${GRPCURL_ARCH}.tar.gz && \ | ||
| cd /tmp && \ | ||
| tar xvf grpcurl_${GRPCURL_VERSION}_${GRPCURL_ARCH}.tar.gz && \ | ||
| mv grpcurl /usr/local/bin/grpcurl && \ | ||
| chmod +x /usr/local/bin/grpcurl && \ | ||
| rm -f /tmp/grpcurl_${GRPCURL_VERSION}_${GRPCURL_ARCH}.tar.gz && \ | ||
| rm -rf /var/lib/apt/lists/* | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Install Go toolchain for building grpcurl and gnoic from source | ||
| # to ensure they use a patched Go stdlib (GO-2026-4337: crypto/tls) | ||
| {% if CONFIGURED_ARCH == "armhf" %} | ||
| RUN GO_ARCH=armv6l \ | ||
| {% elif CONFIGURED_ARCH == "arm64" %} | ||
| RUN GO_ARCH=arm64 \ | ||
| {% else %} | ||
| RUN GO_ARCH=amd64 \ | ||
| {% endif %} | ||
| && GO_VERSION=1.25.8 \ | ||
| && curl -L "https://go.dev/dl/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz" -o /tmp/go.tar.gz \ | ||
| && tar -C /usr/local -xzf /tmp/go.tar.gz \ | ||
| && rm /tmp/go.tar.gz | ||
|
Comment on lines
+104
to
+116
|
||
|
|
||
| ENV PATH="/usr/local/go/bin:$HOME/go/bin:$PATH" | ||
|
|
||
| # Build grpcurl from source with patched Go (GO-2026-4337) | ||
| RUN go install github.com/fullstorydev/grpcurl/cmd/[email protected] \ | ||
| && mv "$(go env GOPATH)/bin/grpcurl" /usr/local/bin/grpcurl \ | ||
| && chmod +x /usr/local/bin/grpcurl | ||
| # Security fixes: upgrade vulnerable system packages (S360 scan remediation) | ||
| RUN apt-get update && apt-get install -y --only-upgrade \ | ||
| telnet \ | ||
|
|
@@ -299,11 +305,11 @@ RUN pip3 install Flask \ | |
| && pip3 install jinja2 | ||
|
|
||
| # gnxi/gnmi_cli_py ships pre-generated _pb2.py stubs; they are | ||
| # Pin to 6.31.1 to match grpcio-tools keep a known-good version. | ||
| # Pin to 6.33.5 to match grpcio-tools keep a known-good version. | ||
| RUN set -e; \ | ||
| . /etc/os-release; \ | ||
| if [ "$VERSION_CODENAME" = "bookworm" ]; then \ | ||
| pip install protobuf==6.31.1; \ | ||
| pip install protobuf==6.33.5; \ | ||
|
Comment on lines
307
to
+312
|
||
| else \ | ||
| pip install protobuf; \ | ||
| fi | ||
|
|
@@ -348,7 +354,7 @@ RUN cd gnxi \ | |
| && quilt push -a \ | ||
| && cd gnmi_cli_py \ | ||
| && pip install -r requirements.txt \ | ||
| && pip3 install protobuf==6.31.1 --no-binary=protobuf | ||
| && pip3 install protobuf==6.33.5 --no-binary=protobuf | ||
| {% else %} | ||
|
|
||
| # Since gnxi were generated with proto 3.x we need to regenerate _pb2 with the new proto version | ||
|
|
@@ -365,23 +371,18 @@ RUN cd gnxi \ | |
| # Deactivating a virtualenv. | ||
| # ENV PATH="$BACKUP_OF_PATH" | ||
|
|
||
| # Install gnoic tool | ||
| # Without specifying the version there is a failure | ||
| # to determine the latest version automatically. | ||
| # | ||
| # root@a2014cb5bc54:~/gnoic# ./install.sh | ||
| # Warning: Failed to verify the package: https://api.github.com/repos/karimra/gnoic/releases/latest, the version is not specified | ||
| # Could not determine the latest release | ||
| # Failed to install gnoic | ||
| # For support, go to https://github.com/karimra/gnoic/issues | ||
| # Build gnoic from source with patched Go (GO-2026-4337) | ||
| RUN git clone https://github.com/karimra/gnoic.git \ | ||
| && cd gnoic \ | ||
| && git checkout 27bc5a6 \ | ||
| && chmod +x install.sh \ | ||
| && ./install.sh --version 0.2.1 \ | ||
| && go build -o /usr/local/bin/gnoic . \ | ||
| && cd .. \ | ||
| && rm -rf gnoic | ||
|
|
||
| # Remove Go toolchain to reduce image size | ||
| RUN rm -rf /usr/local/go "$(go env GOPATH 2>/dev/null || echo $HOME/go)" | ||
| ENV PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" | ||
|
|
||
|
|
||
| {% if PTF_ENV_PY_VER == "py3" %} | ||
| # Install the python-saithrift into the virtual environment | ||
| RUN echo "/usr/lib/python3/dist-packages/saithrift-0.9-py3.11.egg" >> /root/env-python3/lib/python3.11/site-packages/easy-install.pth | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,7 +41,7 @@ COPY \ | |
| {% macro install_offending_packages(packages) -%} | ||
| {%- for pkg in packages %} | ||
| RUN pip3 install {{ pkg }} | ||
| RUN pip3 install setuptools==65.5.1 | ||
| RUN pip3 install setuptools | ||
| {%- endfor %} | ||
|
Comment on lines
43
to
45
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. It's better put outside for loop. |
||
| {%- endmacro %} | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.