Update lint-component target to use ty (Astral type checker) instead of mypy:
- Run ty check for all components uniformly
- Add fuzzer_runner to available components list
- Simplify type checking logic
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previously, `send-integration-task` and `send-libpng-task` used
`pkill -f "kubectl port-forward"` which killed ALL kubectl port-forward
processes. This was problematic when other port-forwards were running.
Now each target captures the PID of the port-forward it starts and kills
only that specific process when done.
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.
* 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
* Update location and name of cscope
* Update README and add quick test script
* Add architecture check and disable full test for now
* Remove test script. Enable libpng integration test
---------
Co-authored-by: Michael D Brown <michael.brown@trailofbits.com>
* 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>
* Enforce mypy on fuzzer component
- Add mypy type checking enforcement for fuzzer component in Makefile
- Fix 39 type errors across 9 files in fuzzer component:
- Add missing return type annotations (-> None, -> bool, -> int)
- Fix Beautiful Soup union type issues with proper casting and None checks
- Fix TemporaryDirectory path usage by using .name attribute
- Add type annotations for function parameters and variables
- Handle potential None values in registry and XML parsing
All fuzzer component files now pass strict mypy type checking.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Brad Swain <BradSwain@users.noreply.github.com>
* fix tests
* Update fuzzer/src/buttercup/fuzzing_infra/builder_bot.py
Co-authored-by: Riccardo Schirone <562321+ret2libc@users.noreply.github.com>
* Update fuzzer/src/buttercup/fuzzing_infra/builder_bot.py
Co-authored-by: Riccardo Schirone <562321+ret2libc@users.noreply.github.com>
* use pathlike[str] instead of tmpdir
* update test to use Path directly
* fix type annotation
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Brad Swain <BradSwain@users.noreply.github.com>
Co-authored-by: Riccardo Schirone <562321+ret2libc@users.noreply.github.com>
* 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
* enforce: Add mypy type checking to seed-gen component
- Add seed-gen to mypy enforcement in Makefile (line 181)
- Update Makefile comment to reflect current mypy-enabled components
- Fix critical type errors:
- Add return type annotations to functions
- Add null safety checks for settings.server in CLI
- Fix OutputParserException string formatting
- Add type annotation for Command objects
- Reduce mypy errors from 65 to 51
The seed-gen component now enforces mypy type checking during linting,
matching the standard applied to common, patcher, orchestrator, and
program-model components.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
* ci: enable seed-gen mypy
* fix: Resolve all mypy type checking issues in seed-gen component
- Move @tool decorated functions outside of classes to fix self parameter issues
- Add proper type annotations and type casting for BaseTaskState subclasses
- Fix return type mismatches with type ignore comments where appropriate
- Resolve attribute access issues using cast() for proper type narrowing
- Update import statements to include required BaseTaskState type
- Fix Redis return type handling in task counter
- Address unreachable code warnings in CLI module
All 51 mypy errors have been resolved, enabling full type checking compliance.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: trigger CI rebuild after mypy fixes
All mypy issues in seed-gen have been resolved but CI may need
a fresh build to recognize the changes.
Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
* fix: Move BaseTaskState class definition before @tool functions
Resolves forward reference issue where BaseTaskState was referenced
in @tool decorated functions before being defined.
Changes:
- Move BaseTaskState class to appear after imports, before Task class
- Use forward references for types not yet defined (HarnessInfo, ToolCallResult, Task)
- Remove duplicate class definition
- Update method signatures to use direct class references
Co-authored-by: Alessandro Gario <alessandrogario@users.noreply.github.com>
* fix: Address review comments for mypy type checking
- Add types-redis to pyproject.toml dev dependencies
- Remove unnecessary comment from __init__.py
- Move cast imports to top of files and add type assertions
- Improve type safety with proper casting and assertions
Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
* fix mypy manually
* common: reintroduce removed line by mistake
* fix overrides
---------
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: Claude <noreply@anthropic.com>
Co-authored-by: Alessandro Gario <alessandrogario@users.noreply.github.com>
* 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>
* 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
* Remove just tool completely and migrate all functionality to Makefiles
- Added install-cscope, lint-python, and lint-python-all targets to main Makefile
- Created program-model/Makefile with all justfile functionality
- Removed justfiles from both main and program-model directories
- Updated all documentation to use make commands instead of just
- Removed just installation and checking functions from setup scripts
- All functionality preserved with equivalent make targets
Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
* Remove duplicate lint-python targets from Makefile
These targets duplicated existing lint and lint-component targets.
Updated CLAUDE.md to reference the correct make targets.
Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
* Fix remaining references to removed lint-python targets in documentation
Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
* Fix Makefile: Add missing targets to .PHONY declaration
Added lint, lint-component, clean-local, wait-crs, check-crs,
crs-instance-id, status, and send-integration-task to .PHONY
to ensure they work correctly even if files with those names exist.
Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
* ci: remove just references
---------
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>
* add 'status' make command to check deployment status
* unify make commands
* rename `make test` to `make send-integration-task`
* add check-crs message
* 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