Skip to content
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

fix: security - CVE-2024-45337 #26

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
with:
endpoint: builders
driver-opts: image=moby/buildkit:v0.16.0
platforms: linux/amd64,linux/arm64,linux/arm,linux/ppc64le

- name: "[preparation] docker login"
uses: docker/[email protected]
Expand All @@ -45,7 +44,6 @@ jobs:
linux/arm64
linux/arm
linux/ppc64le
attests: |
type=sbom,generator=docker/scout-sbom-indexer:latest
type=provenance,mode=max
sbom: true
provenance: true
push: true
22 changes: 14 additions & 8 deletions .github/workflows/kubectl-shell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
uses: docker/[email protected]
with:
endpoint: builders
driver-opts: image=moby/buildkit:v0.16.0
driver-opts: image=moby/buildkit:v0.10.6

- name: "[preparation] docker login"
uses: docker/[email protected]
Expand All @@ -73,12 +73,16 @@ jobs:
HELM_VERSION=v3.15.4
KUBERNETES_RELEASE=v1.31.0
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
outputs: type=image,name=${{ env.DOCKER_HUB_REPO }},push-by-digest=true,name-canonical=true,push=true
cache-from: type=gha
cache-to: type=gha,mode=max
attests: |
type=sbom
type=provenance,mode=max
sbom: false
provenance: false
env:
DOCKER_BUILD_SUMMARY: false
DOCKER_BUILD_RECORD_UPLOAD: false
DOCKER_BUILD_CHECKS_ANNOTATIONS: false

- name: "[build] export digest"
run: |
Expand Down Expand Up @@ -140,7 +144,7 @@ jobs:
uses: docker/[email protected]
with:
endpoint: builders
driver-opts: image=moby/buildkit:v0.16.0
driver-opts: image=moby/buildkit:v0.10.6

- name: "[preparation] docker login"
uses: docker/[email protected]
Expand All @@ -151,9 +155,11 @@ jobs:
- name: "[build] create manifest list and push"
working-directory: /tmp/digests
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.DOCKER_HUB_REPO }}@sha256:%s ' *)

docker manifest create ${{ env.DOCKER_HUB_REPO }}:${{ steps.meta.outputs.version }} \
$(printf '${{ env.DOCKER_HUB_REPO }}@sha256:%s ' *)

docker manifest push ${{ env.DOCKER_HUB_REPO }}:${{ steps.meta.outputs.version }}

- name: "[validate] inspect image"
run: |
docker buildx imagetools inspect ${{ env.DOCKER_HUB_REPO }}:${{ steps.meta.outputs.version }}
2 changes: 1 addition & 1 deletion kubectl-shell/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG HELM_VERSION=v3.15.4
RUN apk add -U --no-cache bash bash-completion curl jq

# Kubectl CLI
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl && \
RUN curl -LO https://dl.k8s.io/${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin/kubectl && \
echo -e 'source /usr/share/bash-completion/bash_completion\nsource <(kubectl completion bash)' >>~/.bashrc
Expand Down
Loading