Skip to content

Commit e936778

Browse files
committed
Patch GHSA-3f2q-6294-fmq5 by switching to the forked repo.
I forked git-urls to patch the vulnerability. I submitted a patch upstream, but haven't heard back from the maintainer yet: whilp/git-urls#25 This switches go packages that use this to my fork. Signed-off-by: Dan Lorenc <[email protected]>
1 parent 9c19483 commit e936778

7 files changed

+41
-23
lines changed

argo-cd-2.7.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package:
22
name: argo-cd-2.7
33
version: 2.7.15
4-
epoch: 0
4+
epoch: 2
55
description: Declarative continuous deployment for Kubernetes.
66
copyright:
77
- license: Apache-2.0
@@ -41,6 +41,9 @@ pipeline:
4141
4242
unset GOFLAGS
4343
44+
# GHSA-3f2q-6294-fmq5 CVE-2023-46402
45+
go mod edit -replace=github.com/whilp/git-urls=github.com/dlorenc/[email protected]
46+
4447
# CVE-2023-2253
4548
go get github.com/docker/[email protected]
4649

argo-cd-2.8.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package:
22
name: argo-cd-2.8
33
version: 2.8.7
4-
epoch: 1
4+
epoch: 2
55
description: Declarative continuous deployment for Kubernetes.
66
copyright:
77
- license: Apache-2.0
@@ -41,6 +41,9 @@ pipeline:
4141
4242
unset GOFLAGS
4343
44+
# GHSA-3f2q-6294-fmq5 CVE-2023-46402
45+
go mod edit -replace=github.com/whilp/git-urls=github.com/dlorenc/[email protected]
46+
4447
# CVE-2023-3955/GHSA-q78c-gwqw-jcmc
4548
go get k8s.io/[email protected]
4649

argo-cd-2.9.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package:
22
name: argo-cd-2.9
33
version: 2.9.3
4-
epoch: 0
4+
epoch: 1
55
description: Declarative continuous deployment for Kubernetes.
66
copyright:
77
- license: Apache-2.0
@@ -41,6 +41,9 @@ pipeline:
4141
4242
unset GOFLAGS
4343
44+
# GHSA-3f2q-6294-fmq5 CVE-2023-46402
45+
go mod edit -replace=github.com/whilp/git-urls=github.com/dlorenc/[email protected]
46+
4447
# CVE-2023-3955/GHSA-q78c-gwqw-jcmc
4548
go get k8s.io/[email protected]
4649
go get google.golang.org/[email protected]

argo-workflows.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package:
22
name: argo-workflows
33
version: 3.5.2
4-
epoch: 0
4+
epoch: 1
55
description: Workflow engine for Kubernetes.
66
copyright:
77
- license: Apache-2.0
@@ -35,6 +35,10 @@ pipeline:
3535
3636
# Our global LDFLAGS conflict with a Makefile parameter
3737
unset LDFLAGS
38+
39+
# GHSA-3f2q-6294-fmq5 CVE-2023-46402
40+
go mod edit -replace=github.com/whilp/git-urls=github.com/dlorenc/[email protected]
41+
3842
make dist/workflow-controller
3943
make dist/argo
4044
make dist/argoexec

flux-notification-controller.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package:
22
name: flux-notification-controller
33
version: 1.1.0
4-
epoch: 5
4+
epoch: 6
55
description: The GitOps Toolkit event forwarded and notification dispatcher
66
copyright:
77
- license: Apache-2.0
@@ -21,6 +21,9 @@ pipeline:
2121
tag: v${{package.version}}
2222

2323
- runs: |
24+
# GHSA-3f2q-6294-fmq5 CVE-2023-46402
25+
go mod edit -replace=github.com/whilp/git-urls=github.com/dlorenc/[email protected]
26+
2427
# CVE-2023-39325 and CVE-2023-3978
2528
go get golang.org/x/[email protected]
2629

melange.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package:
22
name: melange
33
# When bumping the version check if the CVE/GHSA mitigations below can be removed.
44
version: 0.5.3
5-
epoch: 0
5+
epoch: 1
66
description: build APKs from source code
77
copyright:
88
- license: Apache-2.0
@@ -25,10 +25,12 @@ pipeline:
2525
repository: https://github.com/chainguard-dev/melange
2626
tag: v${{package.version}}
2727
expected-commit: 728624ec624ea06a461c8fbbc1feabe1fd8569b9
28-
destination: melange
2928

3029
- runs: |
31-
cd melange
30+
# GHSA-3f2q-6294-fmq5 CVE-2023-46402
31+
go mod edit -replace=github.com/whilp/git-urls=github.com/dlorenc/[email protected]
32+
go mod tidy
33+
3234
make melange
3335
install -m755 -D ./melange "${{targets.destdir}}"/usr/bin/melange
3436

pulumi-kubernetes-operator.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package:
22
name: pulumi-kubernetes-operator
33
version: 1.14.0
4-
epoch: 0
4+
epoch: 1
55
description: A Kubernetes Operator that automates the deployment of Pulumi Stacks
66
copyright:
77
- license: Apache-2.0
@@ -19,25 +19,25 @@ pipeline:
1919
with:
2020
repository: https://github.com/pulumi/pulumi-kubernetes-operator.git
2121
tag: v${{package.version}}
22-
destination: ${{package.name}}
2322
expected-commit: 7d9e693bc6e27f1e3881ce350cdf7fbde71b26be
2423

25-
- working-directory: ${{package.name}}
26-
pipeline:
27-
- runs: |
28-
# Mitigate CVE-2023-39325 and CVE-2023-3978
29-
go get golang.org/x/[email protected]
24+
- runs: |
25+
# GHSA-3f2q-6294-fmq5 CVE-2023-46402
26+
go mod edit -replace=github.com/whilp/git-urls=github.com/dlorenc/[email protected]
3027
31-
# Remediate GHSA-m425-mq94-257g
32-
go get google.golang.org/[email protected]
28+
# Mitigate CVE-2023-39325 and CVE-2023-3978
29+
go get golang.org/x/[email protected]
3330
34-
go mod tidy
31+
# Remediate GHSA-m425-mq94-257g
32+
go get google.golang.org/[email protected]
3533
36-
# Original Go build args found in ./scripts/build.sh
37-
CGO_ENABLED=0 go build -o "${{targets.destdir}}/usr/bin/${{package.name}}" \
38-
-ldflags "-s -w -X github.com/pulumi/pulumi-kubernetes-operator/version.Version=v${{package.version}} -extldflags \"-static\"" \
39-
-tags netgo ./cmd/manager/main.go
40-
- uses: strip
34+
go mod tidy
35+
36+
# Original Go build args found in ./scripts/build.sh
37+
CGO_ENABLED=0 go build -o "${{targets.destdir}}/usr/bin/${{package.name}}" \
38+
-ldflags "-s -w -X github.com/pulumi/pulumi-kubernetes-operator/version.Version=v${{package.version}} -extldflags \"-static\"" \
39+
-tags netgo ./cmd/manager/main.go
40+
- uses: strip
4141

4242
update:
4343
enabled: true

0 commit comments

Comments
 (0)