Skip to content

Commit

Permalink
Merge branch 'dev' into isolate-metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
binbin-li authored Jun 5, 2024
2 parents 4cf6b6c + d3f77fe commit ec20d28
Show file tree
Hide file tree
Showing 13 changed files with 210 additions and 58 deletions.
7 changes: 6 additions & 1 deletion .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
ignore:
- "./api" # ignore folders and all its contents
- "./api" # ignore folders and all its contents
coverage:
status:
patch:
default:
target: 80%
28 changes: 28 additions & 0 deletions .github/workflows/clean-dev-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: clean-dev-package

on:
workflow_dispatch:

permissions:
contents: read

jobs:
cleanup-packages:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Clean up ratify-crds-dev
uses: actions/delete-package-versions@e5bc658cc4c965c472efe991f8beea3981499c55 # v5.0.0
with:
package-name: 'ratify-crds-dev'
package-type: 'container'
min-versions-to-keep: 7
delete-only-pre-release-versions: "true"
- name: Clean up ratify-dev
uses: actions/delete-package-versions@e5bc658cc4c965c472efe991f8beea3981499c55 # v5.0.0
with:
package-name: 'ratify-dev'
package-type: 'container'
min-versions-to-keep: 7
delete-only-pre-release-versions: "true"
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ jobs:
with:
go-version: "1.21"
- name: Initialize CodeQL
uses: github/codeql-action/init@9fdb3e49720b44c48891d036bb502feb25684276 # tag=v3.25.6
uses: github/codeql-action/init@f079b8493333aace61c81488f8bd40919487bd9f # tag=v3.25.7
with:
languages: go
- name: Run tidy
run: go mod tidy
- name: Build CLI
run: make build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@9fdb3e49720b44c48891d036bb502feb25684276 # tag=v3.25.6
uses: github/codeql-action/analyze@f079b8493333aace61c81488f8bd40919487bd9f # tag=v3.25.7
73 changes: 73 additions & 0 deletions .github/workflows/scan-vulns.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: scan_vulns
on:
push:
paths-ignore:
- "docs/**"
- "library/**"
- "**.md"
pull_request:
paths-ignore:
- "docs/**"
- "library/**"
- "**.md"
workflow_dispatch:

permissions: read-all

jobs:
govulncheck:
name: "Run govulncheck"
runs-on: ubuntu-22.04
timeout-minutes: 15
steps:
- name: Harden Runner
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
with:
egress-policy: audit

- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version: "1.22"
check-latest: true
- uses: golang/govulncheck-action@dd0578b371c987f96d1185abb54344b44352bd58 # v1.0.3

scan_vulnerabilities:
name: "[Trivy] Scan for vulnerabilities"
runs-on: ubuntu-22.04
timeout-minutes: 15
steps:
- name: Harden Runner
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
with:
egress-policy: audit

- name: Check out code into the Go module directory
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29

- name: Download trivy
run: |
pushd $(mktemp -d)
wget https://github.com/aquasecurity/trivy/releases/download/v${{ env.TRIVY_VERSION }}/trivy_${{ env.TRIVY_VERSION }}_Linux-64bit.tar.gz
tar zxvf trivy_${{ env.TRIVY_VERSION }}_Linux-64bit.tar.gz
echo "$(pwd)" >> $GITHUB_PATH
env:
TRIVY_VERSION: "0.46.0"

- name: Run trivy on git repository
run: |
trivy fs --format table --ignore-unfixed --scanners vuln .
- name: Build docker images
run: |
make e2e-build-local-ratify-image
make e2e-build-crd-image
- name: Run trivy on images for all severity
run: |
for img in "localbuild:test" "localbuildcrd:test"; do
trivy image --ignore-unfixed --vuln-type="os,library" "${img}"
done
- name: Run trivy on images and exit on HIGH severity
run: |
for img in "localbuild:test" "localbuildcrd:test"; do
trivy image --ignore-unfixed --exit-code 1 --severity HIGH --vuln-type="os,library" "${img}"
done
6 changes: 5 additions & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
branches:
- main
- dev
pull_request:
branches:
- dev
- main
workflow_dispatch:

permissions: read-all
Expand Down Expand Up @@ -44,6 +48,6 @@ jobs:
retention-days: 5

- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@9fdb3e49720b44c48891d036bb502feb25684276 # tag=v3.25.6
uses: github/codeql-action/upload-sarif@f079b8493333aace61c81488f8bd40919487bd9f # tag=v3.25.7
with:
sarif_file: results.sarif
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,12 @@ e2e-deploy-gatekeeper: e2e-helm-install
./.staging/helm/linux-amd64/helm install gatekeeper/gatekeeper --version ${GATEKEEPER_VERSION} --name-template=gatekeeper --namespace ${GATEKEEPER_NAMESPACE} --create-namespace --set enableExternalData=true --set validatingWebhookTimeoutSeconds=5 --set mutatingWebhookTimeoutSeconds=2 --set auditInterval=0 --set externaldataProviderResponseCacheTTL=1s

e2e-build-crd-image:
docker build --progress=plain --no-cache --build-arg KUBE_VERSION=${KUBERNETES_VERSION} --build-arg TARGETOS="linux" --build-arg TARGETARCH="amd64" -f crd.Dockerfile -t localbuildcrd:test ./charts/ratify/crds
docker build --progress=plain --no-cache --build-arg KUBE_VERSION=${KUBERNETES_VERSION} --build-arg TARGETOS="linux" --build-arg TARGETARCH="amd64" -f crd.Dockerfile -t localbuildcrd:test ./charts/ratify/crds

load-build-crd-image:
kind load docker-image --name kind localbuildcrd:test

e2e-deploy-base-ratify: e2e-notation-setup e2e-notation-leaf-cert-setup e2e-cosign-setup e2e-inlinecert-setup e2e-build-crd-image e2e-build-local-ratify-base-image
e2e-deploy-base-ratify: e2e-notation-setup e2e-notation-leaf-cert-setup e2e-cosign-setup e2e-inlinecert-setup e2e-build-crd-image load-build-crd-image e2e-build-local-ratify-base-image
printf "{\n\t\"auths\": {\n\t\t\"registry:5000\": {\n\t\t\t\"auth\": \"`echo "${TEST_REGISTRY_USERNAME}:${TEST_REGISTRY_PASSWORD}" | tr -d '\n' | base64 -i -w 0`\"\n\t\t}\n\t}\n}" > mount_config.json

./.staging/helm/linux-amd64/helm install ${RATIFY_NAME} \
Expand All @@ -549,7 +551,7 @@ e2e-deploy-base-ratify: e2e-notation-setup e2e-notation-leaf-cert-setup e2e-cosi

rm mount_config.json

e2e-deploy-ratify: e2e-notation-setup e2e-notation-leaf-cert-setup e2e-cosign-setup e2e-cosign-setup e2e-licensechecker-setup e2e-sbom-setup e2e-schemavalidator-setup e2e-vulnerabilityreport-setup e2e-inlinecert-setup e2e-build-crd-image e2e-build-local-ratify-image e2e-helm-deploy-ratify
e2e-deploy-ratify: e2e-notation-setup e2e-notation-leaf-cert-setup e2e-cosign-setup e2e-cosign-setup e2e-licensechecker-setup e2e-sbom-setup e2e-schemavalidator-setup e2e-vulnerabilityreport-setup e2e-inlinecert-setup e2e-build-crd-image load-build-crd-image e2e-build-local-ratify-image load-local-ratify-image e2e-helm-deploy-ratify

e2e-build-local-ratify-base-image:
docker build --progress=plain --no-cache \
Expand All @@ -565,6 +567,8 @@ e2e-build-local-ratify-image:
--build-arg build_vulnerabilityreport=true \
-f ./httpserver/Dockerfile \
-t localbuild:test .

load-local-ratify-image:
kind load docker-image --name kind localbuild:test

e2e-helmfile-deploy-released-ratify:
Expand Down Expand Up @@ -630,7 +634,7 @@ e2e-helm-deploy-redis: e2e-helm-deploy-dapr
kubectl apply -f test/testdata/dapr/dapr-redis-secret.yaml -n ${GATEKEEPER_NAMESPACE}
kubectl apply -f test/testdata/dapr/dapr-redis.yaml -n ${GATEKEEPER_NAMESPACE}

e2e-helm-deploy-ratify-replica: e2e-helm-deploy-redis e2e-notation-setup e2e-build-crd-image e2e-build-local-ratify-image
e2e-helm-deploy-ratify-replica: e2e-helm-deploy-redis e2e-notation-setup e2e-build-crd-image load-build-crd-image e2e-build-local-ratify-image load-local-ratify-image
printf "{\n\t\"auths\": {\n\t\t\"registry:5000\": {\n\t\t\t\"auth\": \"`echo "${TEST_REGISTRY_USERNAME}:${TEST_REGISTRY_PASSWORD}" | tr -d '\n' | base64 -i -w 0`\"\n\t\t}\n\t}\n}" > mount_config.json

./.staging/helm/linux-amd64/helm install ${RATIFY_NAME} \
Expand Down
15 changes: 9 additions & 6 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,29 @@ The Ratify roadmap is divided into milestones, each with a set of features (high

### v1.2

**Status**: In progress
**Status**: Completed

**Target date**: May 31, 2024

**Target date**: Apr 30, 2024
**Release link**: [v1.2.0 Release Notes](https://github.com/deislabs/ratify/releases/tag/v1.2.0)

**major features**

- Kubernetes multi-tenancy support (Namespace-specific policies)
- OCI v1.1 compliance
- Cosign signatures verification using keys in AKV
- Error logs improvements

See details in [GitHub milestone v1.2.0](https://github.com/deislabs/ratify/issues?q=is%3Aopen+is%3Aissue+milestone%3Av1.2.0).

### v1.3

**Status**: Not started
**Status**: In progress

**Target date**: Jun 30, 2024
**Target date**: Aug 30, 2024

**Major features**

- Error logs improvements
- Kubernetes multi-tenancy support (Verifying Common images across namespaces)
- Cosign keyless verification using OIDC settings
- Notary Project signature verification with Time-stamping support
Expand All @@ -76,11 +78,12 @@ See details in [GitHub milestone v1.3.0](https://github.com/deislabs/ratify/issu

**Status**: Tentative

**Target date**: Sep 30, 2024
**Target date**: Nov 30, 2024

**Major features**

- Attestations support
- Ratify supports Azure Trusted Signing as a new KeyManagementProvider
- Use Ratify at container runtime (Preview)

### v2.0
Expand Down
4 changes: 2 additions & 2 deletions charts/ratify/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: ratify
description: A Helm chart for Ratify
version: 1.12.0
appVersion: v1.1.0
version: 1.13.0
appVersion: v1.2.0
home: https://github.com/deislabs/ratify
icon: https://raw.githubusercontent.com/deislabs/ratify/main/logo.svg
2 changes: 1 addition & 1 deletion charts/ratify/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
image:
repository: ghcr.io/deislabs/ratify
crdRepository: ghcr.io/deislabs/ratify-crds
tag: v1.1.0
tag: v1.2.0
pullPolicy: IfNotPresent

nameOverride: ""
Expand Down
21 changes: 10 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ require (
github.com/golang/protobuf v1.5.4
github.com/google/go-containerregistry v0.19.1
github.com/gorilla/mux v1.8.1
github.com/notaryproject/notation-core-go v1.0.2
github.com/notaryproject/notation-core-go v1.0.3
github.com/notaryproject/notation-go v1.0.1
github.com/open-policy-agent/cert-controller v0.8.0
github.com/open-policy-agent/frameworks/constraint v0.0.0-20230411224310-3f237e2710fa
Expand All @@ -38,7 +38,7 @@ require (
github.com/owenrumney/go-sarif/v2 v2.3.1
github.com/pkg/errors v0.9.1
github.com/sigstore/cosign/v2 v2.2.4
github.com/sigstore/sigstore v1.8.3
github.com/sigstore/sigstore v1.8.4
github.com/sirupsen/logrus v1.9.3
github.com/spdx/tools-golang v0.5.4
github.com/spf13/cobra v1.8.0
Expand All @@ -56,7 +56,7 @@ require (
)

require (
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/compute/metadata v0.3.0 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/AliyunContainerService/ack-ram-tool/pkg/credentials/alibabacloudsdkgo/helper v0.2.0 // indirect
github.com/Azure/go-autorest/autorest/azure/auth v0.5.12 // indirect
Expand Down Expand Up @@ -128,11 +128,10 @@ require (
)

require (
cloud.google.com/go/compute v1.25.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.29
github.com/Azure/go-autorest/autorest/adal v0.9.23
github.com/Azure/go-autorest/autorest/adal v0.9.24
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
Expand All @@ -156,7 +155,7 @@ require (
github.com/docker/docker v24.0.9+incompatible // indirect
github.com/docker/docker-credential-helpers v0.8.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/fxamacker/cbor/v2 v2.5.0 // indirect
github.com/fxamacker/cbor/v2 v2.6.0 // indirect
github.com/go-chi/chi v4.1.2+incompatible // indirect
github.com/go-logr/logr v1.4.2
github.com/go-logr/stdr v1.2.2 // indirect
Expand Down Expand Up @@ -234,14 +233,14 @@ require (
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/crypto v0.22.0
golang.org/x/crypto v0.23.0
golang.org/x/exp v0.0.0-20231108232855-2478ac86f678 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/oauth2 v0.19.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/term v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/oauth2 v0.20.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/time v0.5.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand Down
Loading

0 comments on commit ec20d28

Please sign in to comment.