142 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
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
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
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 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 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 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
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
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
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
Henrik Brodin e8a4f50e89 Prepare for 0.4.2 release (#936) 2025-06-25 15:16:01 +02:00
Riccardo Schirone 15ffc8eb95 Bump version to v0.4.1 (#933)
* codequery: do not consider asm files

* Bump version to v0.4.1
2025-06-24 20:36:21 +02:00
Ronald Eytchison 609e8de4f4 Set scored round Anthropic rate limits (#929) 2025-06-24 14:29:56 -04:00
Riccardo Schirone d0eb713e93 deployment: use litellm key for LLM keys (#928) 2025-06-24 10:51:18 +02:00
Riccardo Schirone 0eba5ee1ce Bump release to v0.4.0 (#927) 2025-06-24 09:32:44 +02:00
Michael D Brown b0ad2b9ffa deployment: add patchers (#922) 2025-06-24 09:26:07 +02:00
Ronald Eytchison f2da069656 Config updates for final dry run (#925)
* Increase claude 3.7 throughput limit for dry run

* Lower seed-gen workers
2025-06-23 21:07:36 -04:00
Ronald Eytchison 79f998a9fd Add liveness check to seed-gen (#924) 2025-06-23 16:40:40 -04:00
Ronald Eytchison 5fe43e0b0a Enforce size limits for PoVs and seeds (#905)
* Don't process PoVs that exceed the max size

* WIP enforce seed and PoV size limits in seed-gen

* Revert "Don't process PoVs that exceed the max size"

This reverts commit 8cee343160ba299dccd12284f65934efda63b2ef.

* Enforce max PoV size in fuzzer

* Set max seed size to 64 KiB

* Fixup

* Pass copy_corpus_max_size to Corpus and InputDir

* Fixup
2025-06-23 09:10:53 -04:00
Michael D Brown a7904b812c (#824) increase compute-only replicas (#907) 2025-06-23 12:08:06 +02:00
Henrik Brodin 438ce62d7e Limit number of outstanding patch requests (#914)
* Only allow six outstanding patch requests per task

To prevent a lot of initially unrelated entries for the same task from
requesting tasks only to find out that they are all mitigated by the
same patch we limit the number of outstanding patch requsts per task.
2025-06-23 11:46:29 +02:00
Riccardo Schirone 4d8c8ffb00 deployment: adjust litellm resources (#897) 2025-06-23 10:21:54 +02:00
Riccardo Schirone 9e1969c10b ci: give more resources to patcher (#908) 2025-06-21 17:51:38 +02:00
Riccardo Schirone e705a64fb2 patcher: misc fixes (#901)
* patcher: ensure tests_passed is always set

* patcher: make find_tests try harder

* patcher: prefer simpler patches

* patcher: make sure the rootcause also consider the last failing pov

* patcher: small adjustment to reflection prompt

* patcher: apply the delta-mode diff while testing test instructions

* patcher: other improvements

* fix tests

* patcher: store found test instructions to speed up future patches (#903)

* patcher: store found test instructions to speed up future patches

* fix lint
2025-06-20 17:03:33 -04:00
Ronald Eytchison e0a012d751 Increase seed-gen memory limit (#906) 2025-06-20 15:33:14 -04:00
Riccardo Schirone d62adad4bc Update CRS/Competition API to v1.4.0 (-rc1 capi) (#880)
* Update competition-test-api to v1.4-rc1
* Update to competition/crs API v1.4.0
2025-06-18 16:51:52 +02:00