diff --git a/.vib/fluxcd-source-watcher/goss/fluxcd-source-watcher.yaml b/.vib/fluxcd-source-watcher/goss/fluxcd-source-watcher.yaml new file mode 100644 index 000000000000..4dece75f9bbe --- /dev/null +++ b/.vib/fluxcd-source-watcher/goss/fluxcd-source-watcher.yaml @@ -0,0 +1,9 @@ +# Copyright Broadcom, Inc. All Rights Reserved. +# SPDX-License-Identifier: APACHE-2.0 + +command: + check-source-watcher-help: + exec: source-watcher --help + exit-status: 0 + stderr: + - "Usage of source-watcher:" diff --git a/.vib/fluxcd-source-watcher/goss/goss.yaml b/.vib/fluxcd-source-watcher/goss/goss.yaml new file mode 100644 index 000000000000..f18b03c86c44 --- /dev/null +++ b/.vib/fluxcd-source-watcher/goss/goss.yaml @@ -0,0 +1,13 @@ +# Copyright Broadcom, Inc. All Rights Reserved. +# SPDX-License-Identifier: APACHE-2.0 + +gossfile: + # Goss tests exclusive to the current container + ../../fluxcd-source-watcher/goss/fluxcd-source-watcher.yaml: {} + # Load scripts from .vib/common/goss/templates + ../../common/goss/templates/check-binaries.yaml: {} + ../../common/goss/templates/check-broken-symlinks.yaml: {} + ../../common/goss/templates/check-ca-certs.yaml: {} + ../../common/goss/templates/check-linked-libraries.yaml: {} + ../../common/goss/templates/check-sed-in-place.yaml: {} + ../../common/goss/templates/check-spdx.yaml: {} diff --git a/.vib/fluxcd-source-watcher/goss/vars.yaml b/.vib/fluxcd-source-watcher/goss/vars.yaml new file mode 100644 index 000000000000..33bd839f6301 --- /dev/null +++ b/.vib/fluxcd-source-watcher/goss/vars.yaml @@ -0,0 +1,3 @@ +binaries: + - source-watcher +root_dir: /opt/bitnami diff --git a/.vib/fluxcd-source-watcher/vib-verify.json b/.vib/fluxcd-source-watcher/vib-verify.json new file mode 100644 index 000000000000..8d99ce427fbd --- /dev/null +++ b/.vib/fluxcd-source-watcher/vib-verify.json @@ -0,0 +1,73 @@ +{ + "context": { + "resources": { + "url": "{SHA_ARCHIVE}", + "path": "{VIB_ENV_PATH}" + }, + "runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd" + }, + "phases": { + "package": { + "actions": [ + { + "action_id": "container-image-package", + "params": { + "application": { + "details": { + "name": "{VIB_ENV_CONTAINER}", + "tag": "{VIB_ENV_TAG}" + } + }, + "architectures": [ + "linux/amd64", + "linux/arm64" + ] + }, + "size_thresholds": [ + { + "size": "105MB", + "kind": "COMPRESSED" + } + ] + } + ] + }, + "verify": { + "actions": [ + { + "action_id": "trivy", + "params": { + "threshold": "LOW", + "vuln_type": [ + "OS" + ] + } + }, + { + "action_id": "grype", + "params": { + "threshold": "CRITICAL", + "package_type": [ + "OS" + ] + } + }, + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "fluxcd-source-watcher/goss/goss.yaml", + "vars_file": "fluxcd-source-watcher/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-fluxcd-source-watcher" + } + } + } + } + ] + } + } +}