174 Commits

Author SHA1 Message Date
Riccardo Schirone adf5530b41 feat(llm): add newer Anthropic + OpenAI models (opus 4.6/4.7, sonnet 4.6, haiku 4.5, gpt-5.4/5.4-mini/5.5) (#544)
* feat(llm): add newer Anthropic and OpenAI models to LiteLLM

Add 9 model entries across the LiteLLM proxy config, k8s values, and
ButtercupLLM enum so callers can opt into newer models without code
changes: openai-o4-mini, openai-gpt-5/-mini/-nano, claude-4-opus,
claude-4.1-opus, claude-4.5-haiku, claude-4.6-sonnet, claude-4.7-opus.

Verified end-to-end with docker compose: LiteLLM v1.57.8 boots cleanly,
/v1/models lists all 27 entries, and chat completions for the new
model IDs are dispatched to api.anthropic.com / api.openai.com.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* feat(llm): narrow new model set to opus 4.6/4.7, sonnet 4.6, haiku 4.5 + gpt-5.4/5.4-mini/5.5

Replace the previously added openai-o4-mini and gpt-5/-mini/-nano entries
with gpt-5.4, gpt-5.4-mini, gpt-5.5; drop claude opus 4 and 4.1 in favor
of opus 4.6. Final new entries (7): claude-4.5-haiku, claude-4.6-sonnet,
claude-4.6-opus, claude-4.7-opus, openai-gpt-5.4-mini, openai-gpt-5.4,
openai-gpt-5.5.

Re-verified with docker compose: LiteLLM v1.57.8 boots, /v1/models lists
all 25 entries, and chat completions for claude-4.6-opus and
openai-gpt-5.5 are dispatched to api.anthropic.com / api.openai.com.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-16 10:25:40 +02:00
Akshith G 1adc774d33 docs: add Colima and docker-buildx setup instructions for macOS (#474)
macOS users using Colima instead of Docker Desktop were hitting
missing buildx errors and had no documentation to guide them.
Add Colima as a supported Docker runtime, document buildx
installation, and ensure setup-local installs buildx automatically.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 09:15:34 -08:00
Ronald Eytchison 77a3e77936 Create minikube config for a large machine (16 CPU, 128 GB) (#469)
* Create minikube config for a large machine (16 CPU, 128 GB)

* Address PR feedback and scale services

- Increase redis memory
- Disable redis in-memory backups to conserve memory
- Increase build bot replicas
- Increase dind CPU/Memory given build bot scaling
- Set reasonable limits for merger-bot and pov-reproducer
- increase coverage bot memory

* Configure /dev/shm size for corpus tmpfs
2026-02-12 08:32:55 -05:00
Henrik Brodin 09f2980ff9 Add optional tmpfs storage for fuzzing corpus (#461)
* Add optional tmpfs storage for fuzzing corpus

Add support for storing the node-local fuzzing corpus in tmpfs (RAM-based
filesystem) for improved I/O performance during fuzzing operations.

Key changes:
- Add CORPUS_TMPFS_PATH environment variable to configure tmpfs location
- Add cross-filesystem safe operations (copy+delete fallback for EXDEV)
- Update Corpus class to use tmpfs path when enabled while maintaining
  correct remote path calculation for rsync synchronization
- Add Helm chart configuration using /dev/shm (requires no host setup)
- Update fuzzer-bot, coverage-bot, merger-bot, seed-gen deployments

The feature is disabled by default. Enable by setting
global.volumes.corpusTmpfs.enabled=true in values.yaml.

Uses hostPath to /dev/shm/buttercup-corpus which is available on
Linux systems without requiring any Kubernetes host configuration.
2026-02-06 20:10:45 +01:00
Ronald Eytchison 594748aec1 Use claude 4.5 (#437)
* Replace Claude 4 with Claude 4.5

Also remove Claude 3.5 and replace usage with Claude 4

* Use claude 4.5 as the Anthropic fallback model for patcher
2026-01-27 09:35:30 -05:00
Dan Guido 95875b4ec5 fix: apply shellcheck and shfmt fixes to all shell scripts
Apply automated fixes from shellcheck and shfmt to all shell scripts:
- Quote variables to prevent word splitting and globbing
- Use $(...) instead of backticks for command substitution
- Add proper shebang and set -euo pipefail where missing
- Fix array handling and iteration patterns
- Consistent indentation (4 spaces)
- Remove unnecessary curly braces and simplify expressions

Files fixed:
- deployment/*.sh
- scripts/*.sh
- orchestrator/scripts/*.sh
- fuzzer_runner/runner.sh
- protoc.sh

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 11:13:16 +01:00
Dan Guido a18c86a3e0 docs: add local minikube deployment guide
Add comprehensive documentation for local development deployment:
- Docker Desktop resource configuration (CPU, memory, disk)
- Common errors and solutions (resource insufficiency, pending pods, GHCR auth)
- Resource expectations table for different memory allocations
- macOS ARM64 (Apple Silicon) notes
- Verification steps and useful debugging commands

Also update env.template with inline comments explaining minikube resource
settings and their relationship to Docker Desktop resources.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 10:29:46 +01:00
Henrik Brodin 9575877a3e Use project specified in oss-fuzz (#415)
* Use project specified in oss-fuzz

This will use the contents of the oss-fuzz provided container as the
projects contents instead of a user supplied git url. This will allow to
run projects very similar to how oss-fuzz does it. It will enable
analysis of e.g. libmodbus who was previously not possible due to the
fuzzing harnesses being overwritten/shadowed by the mount of project
directory.
Use project_name for focusdir when in doubt
2026-01-23 14:55:19 +01:00
Kevin Valerio 9e33ffdc22 fix: fixing line 110: set: -g: invalid option for Fish shell (#408)
Co-authored-by: kevin-valerio <kevin-valerio@users.noreply.github.com>
2026-01-05 09:28:05 +01:00
Riccardo Schirone ab27eb2fab deployment: pin Docker version to be consistent
Without this, the various components would use a more up-to-date docker
version that is not compatible with the version of dind 24.0 that was
used.
2025-11-13 17:05:15 +01:00
Riccardo Schirone b514d459b4 deployment: use more build-bot (#380) 2025-11-03 20:39:18 +01:00
Riccardo Schirone 73ae1e8a6a Use :manifest-arm64v8 tag for aarch64 deployments (#375) 2025-10-24 15:45:13 +02:00
Arsalan c7c0e98d4b Add warnings about SigNoz re-deployment (#365) 2025-10-07 09:19:33 +02:00
Riccardo Schirone 3cb613281a deployment: remove a few warnings during deployment (#366) 2025-10-02 09:07:40 -04:00
Riccardo Schirone 2987140d69 deployment: fix bitnami deprecation errors (#363)
* deployment: use alpine/kubectl instead of bitnami
* Move away from bitnami/ images
* fix postgresql image
2025-09-29 16:32:38 +02:00
Riccardo Schirone 7690b5d173 Fix Gemini API Key configuration (#362) 2025-09-22 08:58:31 -04:00
Riccardo Schirone ba9f0e5571 Add Tailscale support to the custom scripts (#354) 2025-09-16 15:14:35 +02:00
Riccardo Schirone 143a59c236 fuzzer_runner: split fuzzer's dependencies (#320)
Before this commit, the fuzzer dependend on clusterfuzz, which uses
protobuf 3.20. Since fuzzer-bot depended on common subpackage as well
and also common (and the other packages) require protobuf, we had to use
protobuf 3.20 everywhere. This old dependency however means that a lot
of packages can't be used in their "newer" versions, because they depend
on newer protobuf versions.

This commit splits the fuzzer into a separate fuzzer-runner that is
executed in a separate process inside a separate venv. fuzzer-runner
executes the clusterfuzz-heavy operations (e.g. fuzzing) and isolates the
clusterfuzz dependency, so that the rest of the system can use newer
protobuf version.

* split `fuzzer-bot` in `fuzzer-runner` and `fuzzer-bot`
* have a "full" optional dependency group in `common`, including `openlit`
  and `protobuf`, so that `fuzzer-runner` can use the lite version of `common`
  without bringing those heavy deps
* move `FuzzConfiguration`/`BuildConfiguration` in a separate common file
  that doesn't require to load all protobuf files. Again, in this way
  other components can just depend on the `common` "lite" version and not
  require protobuf stuff
* add `fuzzer-runner` as a separate venv inside the `fuzzer-bot` container
* add `RunnerProxy` class in fuzzer package to provide an interface to
  interact with the fuzzer-runner binary.
2025-09-10 09:52:08 +02:00
Riccardo Schirone 3fd777063b Test and improve AKS deployment (#336)
* Test configuration for Azure deployment
* ci: re-enable docker build/push
* ci: docker push labeled PRs
* Use `make deploy` for both local and azure deployments
* doc: update AKS_DEPLOYMENT doc
* add confirmation in Makefile
* Make resource group location configurable
2025-09-08 16:57:08 +02:00
Riccardo Schirone 945298c039 litellm_config: remove spaces to fix litellm parsing the file (#328)
A few spaces in the litellm_config.yaml file were preventing litellm
from correctly parsing and loading the configuration.
2025-09-03 10:06:38 -04:00
Boyan MILANOV c25b3956d0 Support Gemini (#306)
* Add gemini api key option during setup and in deployment environments

* Add gemini pro as a fallback model in all components

* Lint

* Set rate limits for gemini models

* Add fallback models in more places

* Fix typo

* Fix kwargs expansion

* Fix instantiation of llm with callbacks

* Fixed formatting after merge

* Fix instantiation of default models

* Lint

* Fix llm creation

* Fix

* Lint

* Lint

---------

Co-authored-by: Michael D Brown <michael.brown@trailofbits.com>
2025-08-26 10:59:00 -04:00
Riccardo Schirone 4fa11220c3 deployment: fix SigNoz undeploy (#305) 2025-08-20 15:01:44 -04:00
Riccardo Schirone 465d05fa9c Revert "Standardize packaging and dev dependencies across components (#268)"
This reverts commit 1c574962b3.
2025-08-09 13:13:28 -05:00
Dan Guido 1c574962b3 Standardize packaging and dev dependencies across components (#268)
* fix: standardize packaging configuration across components

- Fix fuzzer package name from 'fuzzing-infra' to 'fuzzer' for consistency
- Add missing README field to common/pyproject.toml
- Standardize seed-gen script naming to follow buttercup-* convention
- Remove redundant flake8 dependency from orchestrator and patcher (ruff handles linting)
- Update lock files to reflect dependency changes
- Auto-format code in common and seed-gen components

* refactor: standardize dev dependencies across all components

- Add pytest-cov to all components for consistent test coverage reporting
- Standardize types-redis version to 4.6.0 across all components
- Standardize types-requests version to 2.32.0 where used
- Remove unused pytest-asyncio from orchestrator and patcher (no async tests found)
- Remove unused types-python-dateutil from patcher (only used in orchestrator)
- Keep component-specific dependencies where justified:
  - orchestrator: pytest-xdist for parallel testing, API testing tools
  - patcher: pytest-xdist for parallel testing
  - common: types-PyYAML, dirty-equals for testing
  - seed-gen: tqdm for progress bars

All components now have consistent base dev dependencies with optional extras
as needed. This improves maintainability and reduces confusion.

* fix: update deployment configs for renamed seed-gen command

- Update docker-compose to use buttercup-seed-gen command
- Update Kubernetes/Helm deployment to use buttercup-seed-gen command
- These are critical fixes to ensure deployments work with the renamed command
2025-08-09 01:09:36 -07:00
Ronald Eytchison 5d2df35efa Enable configuring minikube size (#249)
* Remove unused dind configuration

* Configure minikube cluster size
2025-08-06 10:55:18 -04:00
Riccardo Schirone ec89fe304d feat: implement SQLite database persistence for buttercup-ui (#236)
* feat: implement SQLite database persistence for buttercup-ui

- Add SQLite database support to replace in-memory storage
- Create comprehensive database schema with tasks, povs, patches, bundles tables
- Update all API endpoints to use database operations
- Maintain backwards compatibility with existing file storage
- Add configurable database URL with sensible SQLite default
- Ensure data persists across container restarts

Fixes: #235

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>

* rewrite manually

* fix a few bytes/str

* fix lint

* ui: pass task-id when creating bundle

* fix webui

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
Co-authored-by: Brad Swain <brad.swain@trailofbits.com>
Co-authored-by: Michael D Brown <michael.brown@trailofbits.com>
2025-08-06 09:49:51 -04:00
Riccardo Schirone 8fcf730d2c deployment: include Bearer/Basic in OTEL_TOKEN (#253)
Co-authored-by: Michael D Brown <michael.brown@trailofbits.com>
2025-08-06 09:39:14 -04:00
Riccardo Schirone a8ed0ccbbe feat: Add local SigNoz deployment support (#232)
* feat: Add simplified SigNoz integration using official Helm chart

- Add SigNoz as a Helm dependency with conditional deployment
- Enable SigNoz by default for minikube environments
- Auto-configure OTEL to use internal SigNoz when enabled
- Update Docker Compose to include existing SigNoz stack
- Minimal configuration following the official chart approach

Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>

* Configure local signoz

* do not deploy signoz in ci

* makefile: ensure signoz is available

* feat: Simplify SigNoz integration for improved user experience

- Remove external SigNoz configuration prompts from setup-local script
- Make local SigNoz deployment the default for quickstart experience
- Move external SigNoz configuration to MANUAL_SETUP.md for advanced users
- Streamline README log access section to focus on local SigNoz UI
- Relocate kubectl commands to QUICK_REFERENCE.md as alternative method
- Improve documentation structure for better user onboarding

Addresses feedback from @michaelbrownuc to simplify the integration
before merging.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>

* Update MANUAL_SETUP.md

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
2025-08-06 09:35:53 -04:00
Ronald Eytchison cbafd1e10a Scale down minikube specs and runner (#245)
* Scale down minikube specs and runner

* Scale down registry-cache and minikube again

* Use runner which can be used in a public repo

* Increase minikube size for services without resource requests

Also rename github action
2025-08-05 09:33:55 -04:00
Ronald Eytchison 996738097a Make release namespace and name flexible for litellm config job (#241) 2025-08-04 12:35:04 -04:00
Ronald Eytchison e2ff4edb62 Configure LiteLLM limit (#230)
* Configure LiteLLM limit

* Create Litellm user virtual key for components

This is because a budget cannot be enforced for a master key.

Based on prior work by Riccardo Schirone
<562321+ret2libc@users.noreply.github.com>:
https://github.com/aixcc-finals/afc-crs-trail-of-bits/pull/887

* Configure virtual key budget

* Make RBAC for litellm key setup more restrictive

---------

Co-authored-by: Michael D Brown <michael.brown@trailofbits.com>
2025-08-04 11:21:58 -04:00
Riccardo Schirone 3cd643e667 ci: reenable example-libpng integration test (#222)
* ci: try to reenable example-libpng integration test

* ci: try to use GITHUB_TOKEN

* ci: deploy the cluster

* ci: try private runner

* ci: no need for kubeconfig setting anymore

* Makefile: make all targets namespace flexible

* ci: use the right github token secret

* Makefile: make send-* targets return 0

* ci: use buttercup-ui and don't kill port-forward

* orchestrator/ui: add /webhook/sarif endpoint

* orchestrator/ui: model dump the broadcast

* ui: implement a few other competition-api endpoints

* ui: fix bundle apis
2025-08-04 09:07:20 -04:00
Brad Swain a351a97c45 1 build bot replica for minikube deployments (#228) 2025-08-04 10:23:23 +02:00
Riccardo Schirone c9d49f76f7 feat: save CRS artifacts to run-data directories (#206)
* feat: save CRS artifacts to run-data directories

Add functionality to automatically save POVs, patches, and bundles
received from the CRS into organized run-data-<timestamp> directories
structured by task-id as requested in issue #205.

Changes:
- Add run_data_dir configuration setting to Settings
- Implement save_artifact() utility function with proper base64 decoding
- Modify bundle, patch, and POV endpoints to save artifacts to disk
- Create directory structure: run-data-YYYYMMDDHHMMSS/<task-id>/{povs,patches,bundles}/
- Handle different file types: .json for bundles, .patch for patches, .bin for POVs

Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>

* feat: add hostPath volume for buttercup-ui run data access

- Add run-data-volume hostPath mount to UI deployment for minikube
- Maps container /tmp/buttercup-run-data to host /data/buttercup-run-data
- Enables external access to CRS artifacts (POVs, patches, bundles)
- Falls back to emptyDir for non-minikube environments

Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>

* fix: add BUTTERCUP_UI_RUN_DATA_DIR environment variable to UI deployment

- Set BUTTERCUP_UI_RUN_DATA_DIR to /tmp/buttercup-run-data to match volume mount
- Ensures UI application saves run data artifacts to the correct directory
- Run data will now be accessible outside Kubernetes cluster via hostPath volume

Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>

* fix save-artifact feature

* orchestrator: fix lint

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
Co-authored-by: Michael D Brown <michael.brown@trailofbits.com>
2025-07-31 10:10:59 -04:00
Riccardo Schirone 5cfa9bd26e Add support for ARM (#207)
* Fix integration-test run

* use the proper oss-fuzz-aixcc commit to run integration-test
* determine OSS_FUZZ_CONTAINER_ORG at runtime
* use `git diff` in the patcher to create the patch to fix a problem
  with patches affecting non-newline terminated files

* fix parsing

* fix program-model lint

* Modify CRS to work on MacOS/ARM

* Use LibUCL for testing

* use example-libpng

* fix linting

* common: fix tests
2025-07-31 09:55:36 -04:00
Riccardo Schirone a08cbf1050 Make CRS more flexible (#202)
* Fix integration-test run

* use the proper oss-fuzz-aixcc commit to run integration-test
* determine OSS_FUZZ_CONTAINER_ORG at runtime
* use `git diff` in the patcher to create the patch to fix a problem
  with patches affecting non-newline terminated files

* fix parsing

* fix program-model lint
2025-07-31 09:34:28 -04:00
Brad Swain c7fc0f7c9a remove refs to aixcc resources (#195)
* remove refs to aixcc resources

* remove aixcc.tech

* change aixcc-finals to tob-challenges
2025-07-30 09:34:58 -05:00
Brad Swain 188cd092ed remove mock competition api (#200) 2025-07-30 09:42:31 +02:00
Brad Swain cb1dbd5f8a Make GitHub PAT optional (#187)
* make github PAT optional

* remove unused check_minikube_config

* remove warning messages if GHCR is not set

* remove old configure_ghcr
2025-07-25 14:56:24 -04:00
Stefano Bonicatti 7487c9105b Skip Docker registry setup if credentials are missing (#172)
Docker credentials are optional, so don't try to create
a Docker registry secret if they are not configured.

Co-authored-by: Stefano Bonicatti <148902+Smjert@users.noreply.github.com>
Co-authored-by: Michael D Brown <michael.brown@trailofbits.com>
2025-07-25 10:06:04 -04:00
Brad Swain 24744624fc allow updating values in make setup-local (#168)
* allow reconfiguring values in make setup-local

* use print_status

* add linebreaks to each prompt block
2025-07-25 10:04:50 -04:00
Ronald Eytchison 913e51043c Support a Github fine-grained PAT for local deployment (#164) 2025-07-24 10:11:42 -04:00
Riccardo Schirone 1d385cf89f Make deployment easier (#158)
* deployment: just use the value in values.template

* ci: disable integration tests and private settings

* Download trailofbits cscope, not aixcc-finals one

* ci: fix docker login to ghcr.io

* Changes to allow non aixcc deployment

* buttercup-ui: basic skeleton for a CRS interface

* file-server implementation

* add ui to k8s

* other apis

* try to fix k8s

* remove some labels

* fix ui

* small fixes to doc

* ui: support for cloning private repos

* Add setup scripts for easy deployment

* update scripts

* update make/readme

* small adj

* address review

* we need 0.0.0.0 for k8s
2025-07-11 07:31:57 -04:00
Ronald Eytchison e2e5e45cee Build cscope image locally instead of pulling (#148)
* Add cscope as submodule

* Use cscope submodule instead of docker image

* Pass token to checkout private submodule in CI
2025-07-10 15:49:09 -04:00
Riccardo Schirone 354ca31f8b buttercup-ui: basic interface to the CRS (#141)
* add ui to k8s
* ui: support for cloning private repos
2025-07-10 17:41:22 +02:00
Riccardo Schirone cdb67b0b60 Changes to allow non aixcc deployment (#147) 2025-07-09 12:22:54 +02:00
Riccardo Schirone 2d85829b08 deployment: fix CRS/Service instance IDs usage (#137) 2025-07-08 10:09:03 +02:00
Riccardo Schirone 6f4b0118ac deployment: just use the LOG_MAX_LINE_LENGTH value in values.template (#126)
* deployment: just use the value in values.template

* ci: disable integration tests and private settings

* Download trailofbits cscope, not aixcc-finals one

* ci: fix docker login to ghcr.io
2025-07-07 15:13:29 +02:00
Henrik Brodin c7cb6b7a84 Bump version number 2025-07-02 12:53:09 +00:00
Riccardo Schirone f2cb357ad7 Include backend changes and Bump v0.4.3 (#937) 2025-06-25 15:27:04 +02:00