-
Notifications
You must be signed in to change notification settings - Fork 290
/
Copy pathgatekeeper-3.12.yaml
68 lines (62 loc) · 2.23 KB
/
gatekeeper-3.12.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package:
name: gatekeeper-3.12
version: 3.12.0
epoch: 10
description: Gatekeeper - Policy Controller for Kubernetes
copyright:
- license: Apache-2.0
dependencies:
provides:
- gatekeeper=3.12.999
environment:
contents:
packages:
- build-base
- busybox
- ca-certificates-bundle
- go
- wolfi-baselayout
pipeline:
# We can't use go/install because this requires specific ldflags to set the version
- uses: git-checkout
with:
repository: https://github.com/open-policy-agent/gatekeeper
tag: v${{package.version}}
expected-commit: 770d9756db0487d1baa4079476c853236961a4eb
destination: gatekeeper
- runs: |
cd gatekeeper
# Mitigate CVE-2023-39325, CVE-2023-3978, CVE-2023-44487
go get golang.org/x/[email protected]
go get golang.org/x/[email protected]
# Mitigate GHSA-m425-mq94-257g
go mod edit -droprequire=google.golang.org/grpc
go get google.golang.org/[email protected]
# CVE-2023-45142
go get go.opentelemetry.io/contrib/instrumentation/net/http/[email protected]
go get go.opentelemetry.io/otel/exporters/otlp/otlptrace/[email protected]
go get go.opentelemetry.io/otel/exporters/otlp/otlptrace/[email protected]
go mod tidy
go mod vendor
FRAMEWORKS_VERSION=$(go list -f '{{ .Version }}' -m github.com/open-policy-agent/frameworks/constraint)
OPA_VERSION=$(go list -f '{{ .Version }}' -m github.com/open-policy-agent/opa)
CGO_ENABLED=0 GO111MODULE=on go build -mod vendor -a -ldflags "-w -X github.com/open-policy-agent/gatekeeper/pkg/version.Version=v${{package.version}} -X main.frameworksVersion=${FRAMEWORKS_VERSION} -X main.opaVersion=${OPA_VERSION}" -o manager
mkdir -p ${{targets.destdir}}/usr/bin
install -Dm755 ./manager ${{targets.destdir}}/usr/bin/manager
- uses: strip
subpackages:
- name: ${{package.name}}-compat
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}
ln -sf /usr/bin/manager ${{targets.subpkgdir}}/manager
dependencies:
provides:
- gatekeeper-compat=3.12.999
update:
enabled: true
github:
identifier: open-policy-agent/gatekeeper
strip-prefix: v
use-tag: true
tag-filter: v3.12.