Skip to content
Merged
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
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ all: fmt vet test build
build: ## Build binary
@go build -o "bin/$(BINARY_NAME)" -ldflags $(LD_FLAGS) cmd/woodpecker/main.go

build-woodpecker-ai: ## Build woodpecker AI container
@docker build -f build/Dockerfile.woodpecker-ai .

.PHONY: fmt
fmt: ## Run go fmt
@go fmt ./...
Expand Down
4 changes: 2 additions & 2 deletions build/Dockerfile.woodpecker-ai
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH

# ensures that the python output is sent straight to terminal (e.g. your container log)
ENV PYTHONUNBUFFERED 1
ENV PYTHONUNBUFFERED=1

# https://docs.python.org/3/using/cmdline.html#envvar-PYTHONDONTWRITEBYTECODE
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONDONTWRITEBYTECODE=1

WORKDIR $HOME/app

Expand Down
3 changes: 1 addition & 2 deletions cmd/woodpecker-ai/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ readme = "README.md"
requires-python = ">=3.11"

dependencies = [
"asyncio==3.4.3",
"fastapi>=0.110",
"pydantic==1.10.14",
"pydantic>=2.0.0",
"openai==1.30.5",
# https://github.com/explosion/spaCy/issues/13528
"numpy==1.26.4",
Expand Down
7 changes: 5 additions & 2 deletions components/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Components

`woodpecker` can install optional Components which enhance and enable additional experiments.
`woodpecker` can install optional Components which enhance and enable additional experiments.

* `woodpecker-ai`: Enables running Chaos Experiments against AI providers such as OpenAI and Anthropic
These components can be install either in Kubernetes or Docker. To install in Docker set namespace to `local`.

**Components List:**
* `woodpecker-ai`: Enables running red teaming experiments against AI providers such as OpenAI and Anthropic
4 changes: 3 additions & 1 deletion components/woodpecker-ai.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
type: "woodpecker-ai"
namespace: "woodpecker"
namespace: "local" # Change to local to run in a docker container, otherwise deploy on current K8s context
image: "ghcr.io/operantai/woodpecker-ai:latest"
secretName: "woodpecker-ai"
secretEnvs:
- OPENAI_API_KEY
40 changes: 31 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ go 1.24.3

require (
github.com/charmbracelet/lipgloss v0.9.1
github.com/docker/docker v28.1.1+incompatible
github.com/gorilla/mux v1.8.0
github.com/mattn/go-runewidth v0.0.15
github.com/spf13/cobra v1.7.0
github.com/stretchr/testify v1.8.4
golang.org/x/term v0.30.0
github.com/stretchr/testify v1.10.0
golang.org/x/term v0.32.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.28.3
Expand All @@ -18,43 +19,64 @@ require (
)

require (
github.com/Microsoft/go-winio v0.4.14 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/go-connections v0.5.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-isatty v0.0.18 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/moby/sys/atomicwriter v0.1.0 // indirect
github.com/moby/term v0.5.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/muesli/reflow v0.3.0 // indirect
github.com/muesli/termenv v0.15.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/net v0.38.0 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
go.opentelemetry.io/otel v1.36.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.36.0 // indirect
go.opentelemetry.io/otel/metric v1.36.0 // indirect
go.opentelemetry.io/otel/trace v1.36.0 // indirect
golang.org/x/net v0.40.0 // indirect
golang.org/x/oauth2 v0.12.0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/text v0.23.0 // indirect
golang.org/x/sys v0.33.0 // indirect
golang.org/x/text v0.25.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.33.0 // indirect
google.golang.org/protobuf v1.36.6 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gotest.tools/v3 v3.5.2 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
Expand Down
Loading