Skip to content

Commit

Permalink
Merge pull request #1028 from andyzhangx/vulnerability-fix
Browse files Browse the repository at this point in the history
fix: upgrade to debian 11.0 to fix vulnerability
  • Loading branch information
k8s-ci-robot authored Sep 23, 2021
2 parents 3bb9e05 + 9a3146c commit 0bfa1a5
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 27 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/trivy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Trivy vulnerability scanner
on:
push:
branches:
- master
pull_request:
jobs:
build:
name: Build
runs-on: ubuntu-18.04
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build an image from Dockerfile
run: |
export PUBLISH=true
export REGISTRY=test
export IMAGE_VERSION=latest
export DOCKER_CLI_EXPERIMENTAL=enabled
make container
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'test/azuredisk-csi:latest'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ azuredisk-darwin:

.PHONY: container
container: azuredisk
docker build --no-cache -t $(IMAGE_TAG) --output=type=docker -f ./pkg/azurediskplugin/dev.Dockerfile .
docker build --no-cache -t $(IMAGE_TAG) --output=type=docker -f ./pkg/azurediskplugin/Dockerfile .

.PHONY: container-linux
container-linux:
Expand Down
9 changes: 5 additions & 4 deletions pkg/azurediskplugin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG ARCH
FROM k8s.gcr.io/build-image/debian-base:buster-v1.6.0
RUN clean-install util-linux e2fsprogs mount ca-certificates udev xfsprogs
FROM k8s.gcr.io/build-image/debian-base:bullseye-v1.0.0

RUN apt update && apt-mark unhold libcap2
RUN clean-install util-linux e2fsprogs mount ca-certificates udev xfsprogs libssl1.1

LABEL maintainers="andyzhangx"
LABEL description="Azure Disk CSI Driver"

ARG ARCH
ARG ARCH=amd64
ARG PLUGIN_NAME=azurediskplugin
COPY ./_output/${ARCH}/${PLUGIN_NAME} /azurediskplugin
ENTRYPOINT ["/azurediskplugin"]
22 changes: 0 additions & 22 deletions pkg/azurediskplugin/dev.Dockerfile

This file was deleted.

0 comments on commit 0bfa1a5

Please sign in to comment.