Skip to content

fix security issue: "Arguments in long RUN instructions should be sor… - #4402

Merged
cheyang merged 1 commit into
fluid-cloudnative:masterfrom
Syspretor:fix/fix-some-security-issues
Nov 14, 2024
Merged

fix security issue: "Arguments in long RUN instructions should be sor…#4402
cheyang merged 1 commit into
fluid-cloudnative:masterfrom
Syspretor:fix/fix-some-security-issues

Conversation

@Syspretor

@Syspretor Syspretor commented Nov 14, 2024

Copy link
Copy Markdown
Collaborator

fix Arguments in long RUN instructions should be sorted


RUN apt-get update && apt-get install -y librados2 curl fuse procps iputils-ping strace iproute2 net-tools tcpdump lsof librados-dev libcephfs-dev librbd-dev && \
RUN apt-get update && \
apt-get install -y curl fuse iproute2 iputils-ping librados2 librados-dev librbd-dev libcephfs-dev lsof net-tools procps strace tcpdump && \

Check notice

Code scanning / SonarCloud

Arguments in long RUN instructions should be sorted

<!--SONAR_ISSUE_KEY:AZMogM8r7CLazVuLnu_v-->Sort these package names alphanumerically. <p>See more on <a href="https://sonarcloud.io/project/issues?id=fluid-cloudnative_fluid&issues=AZMogM8r7CLazVuLnu_v&open=AZMogM8r7CLazVuLnu_v&pullRequest=4402">SonarQube Cloud</a></p>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libcephfs-dev librados-dev librados2 librbd-dev

RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories
RUN apk --update add fuse alpine-sdk automake autoconf libxml2-dev fuse-dev curl-dev pkgconf
RUN apk update && \
apk add alpine-sdk automake autoconf curl-dev fuse fuse-dev libxml2-dev pkgconf

Check notice

Code scanning / SonarCloud

Arguments in long RUN instructions should be sorted

<!--SONAR_ISSUE_KEY:AZMogM837CLazVuLnu_z-->Sort these package names alphanumerically. <p>See more on <a href="https://sonarcloud.io/project/issues?id=fluid-cloudnative_fluid&issues=AZMogM837CLazVuLnu_z&open=AZMogM837CLazVuLnu_z&pullRequest=4402">SonarQube Cloud</a></p>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The correct order should be autoconf automake.

RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories
RUN apk --update add fuse curl libxml2 openssl libstdc++ libgcc python3 inotify-tools bash coreutils tini && rm -rf /var/cache/apk/*
RUN apk update && \
apk add bash curl coreutils fuse inotify-tools libgcc libstdc++ libxml2 openssl python3 tini && \

Check notice

Code scanning / SonarCloud

Arguments in long RUN instructions should be sorted

<!--SONAR_ISSUE_KEY:AZMogM837CLazVuLnu_1-->Sort these package names alphanumerically. <p>See more on <a href="https://sonarcloud.io/project/issues?id=fluid-cloudnative_fluid&issues=AZMogM837CLazVuLnu_1&open=AZMogM837CLazVuLnu_1&pullRequest=4402">SonarQube Cloud</a></p>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be coreutils curl

…ted"

Signed-off-by: jiuyu <guotongyu.gty@alibaba-inc.com>
@Syspretor
Syspretor force-pushed the fix/fix-some-security-issues branch from 87368d9 to 0cb472e Compare November 14, 2024 02:41
@sonarqubecloud

Copy link
Copy Markdown

@cheyang cheyang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@cheyang cheyang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@cheyang
cheyang merged commit fdc1508 into fluid-cloudnative:master Nov 14, 2024
@fluid-e2e-bot

fluid-e2e-bot Bot commented Nov 14, 2024

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheyang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants