Commit Graph

339 Commits

Author SHA1 Message Date
Riccardo Schirone 093e26ec0a common: fallback to delete challenge task dir inside docker (#385)
* common/ChallengeTask: add exec_docker_cmd and use it to clean tmp dirs

* fix typo

* fix run-docker-cmd

* fix tests
2025-04-15 09:47:49 +02:00
Boyan MILANOV 319236d88b Fix code query search (#396)
Co-authored-by: Boyan MILANOV <boyanmilanov@coder-boyanmilanov-aixcc-boyan.c.production-1-405717.internal>
2025-04-15 08:38:53 +03:00
Riccardo Schirone 689f75e39b deployment: pull competition API image (#397) 2025-04-14 18:42:01 +02:00
Riccardo Schirone f8f1af6c66 common: remove some old example files (#387) 2025-04-14 18:07:03 +02:00
Riccardo Schirone cf6bde73b2 remove old OSSFuzzTool (#386) 2025-04-11 15:29:00 +02:00
Henrik Brodin 1e4e56490f NodeLocalStorage (#369)
This PR introduces a NodeLocal storage concept. Data is always processed on the local node, and only replicated to the azure file storage as needed.

A DaemonSet is introduced that syncs any corpus on the local node with the global corpus directory.

The following path structure is introduced:

/node_data/crs_scratch
/node_data/tasks_storage
/node_data/scratch
The first two directories is the equivalent of the previous usage of

/crs_scratch
/tasks_storage
The scratch is for basing temporary files and directories on the same filesystem as node-local version to be able to do atomic renames.

Further, ChallengeTask data is used normally on the /node_data/... paths, but is stored as /tasks_storage/{uuid}.tgz on the "remote" storage. This is to speed up copying.

Corpus and CrashSets are synced as is.
2025-04-11 14:03:49 +02:00
Riccardo Schirone 4a724763aa patcher: test code snippet request parsing (#384) 2025-04-10 14:58:46 +02:00
Riccardo Schirone 582045ada0 patcher: improve code snippet change parsing (#383)
Allow for multiple old_code/code blocks in a single patch, all using the
same identifer/file_path.
2025-04-10 13:27:17 +02:00
Evan Downing a754c94c82 Add new regression tests for c/java (#378)
* Add zookeeper test file

* Update java function query.

* Add caller/callee queries

* Add example test for C with fixture

* Refactor challenge task creation in tests

---------

Co-authored-by: Boyan MILANOV <boyanmilanov@coder-boyanmilanov-aixcc-boyan.c.production-1-405717.internal>
2025-04-10 10:09:35 +03:00
Ronald Eytchison e2148aa5e3 Increase limits for coverage-bot to prevent OOM error (#381)
* Increase limits for coverage-bot to prevent OOM error

* Appease ruff
2025-04-09 13:49:23 -04:00
Ronald Eytchison 662e9779b9 Fix return type in coverage runner (#379) 2025-04-09 10:26:36 -04:00
Riccardo Schirone eb66060ac3 ci: run mypy on components (#132) 2025-04-09 09:56:16 +02:00
Henrik Brodin 35680246eb Fix build-type (#370) 2025-04-08 12:58:42 +02:00
Henrik Brodin d187482bad Henrik boyan/fix type hints (#367)
* Use alternative type alias for BuildType type hints

* Remove unrelated test file

* check

---------

Co-authored-by: Boyan-MILANOV <boyan.milanov@trailofbits.com>
2025-04-08 11:34:16 +02:00
Henrik Brodin 939819c6d4 Competition api v1.1-rc7 (#368)
- adds a script to send SARIF messages
- updated readme
2025-04-08 11:34:05 +02:00
Riccardo Schirone 14f77c799a deployment: fix crs-architecture to run everywhere (#364) 2025-04-08 10:23:12 +02:00
Riccardo Schirone 658f9c64c4 patcher: improve context retriever agent (#357) 2025-04-07 12:39:47 +02:00
Riccardo Schirone 98e736c194 fuzzer/tracer_runner: add a log for better observability (#356) 2025-04-07 11:58:29 +02:00
Boyan MILANOV 966c184129 Make build_type a proper enum (#346)
* Make build type an int enum

* Lint

* Fix protobuf

* Fix protobuf for linux

* Remove old  enum and use the  class from protobuf message

* Lint

* Fix tests

* Print build type name instead of int value in logs

* Try fix enum instanciation in scheduler

* Correctly get protobuf enum name for BuildType values using EnumTypeWrapper methods

* Fix import

---------

Co-authored-by: Boyan MILANOV <boyanmilanov@coder-boyanmilanov-aixcc-boyan.c.production-1-405717.internal>
2025-04-07 11:54:42 +03:00
Riccardo Schirone 84d235feed deployment: download tasks_storage first because static (#358) 2025-04-07 10:54:09 +02:00
Riccardo Schirone fbe5b98dc1 deployment: make it easy to work in minikube (#347)
* deployment: add a minikube environment

* deployment: allow to use minikube for local dev

* deployment: make minikube use local images
2025-04-07 10:25:21 +02:00
Henrik Brodin a06006c2a6 Use docker auth to not be affected by rate limits (#335)
* Use docker auth to not be affected by rate limits

* Add the docker auth vars to the template env
2025-04-03 15:23:56 +02:00
Henrik Brodin b8c8fb9886 Henrik/1vuln 1patch (#343)
* Do not allow multiple patches for the same vulnerability

* Add test cases to verify
2025-04-03 10:29:19 +02:00
Henrik Brodin 8c6f6795c7 Henrik/v0.1.3 (#333)
* Fix quoting issue

* Bump to version 0.1.3
v0.1.3
2025-04-01 09:58:05 +02:00
Henrik Brodin d7e761a031 Fix quoting issue (#332) 2025-04-01 09:57:51 +02:00
Riccardo Schirone 0289f6a21e deployment: prepare for unscored-1 (#331) 2025-04-01 09:11:51 +02:00
Henrik Brodin c4753b81b4 Bump version (#328)
* Bump version

* images version
v0.1.2
2025-03-31 18:53:34 +02:00
Henrik Brodin 005d0d01e8 Convert from milliseconds to secs since epoch (#324) 2025-03-31 18:44:14 +02:00
Riccardo Schirone a2c8a0978d patcher: make path handling more flexible (#327)
* patcher: use fuzzy search in codequery if strict fails

* patcher/swe: increase retries number

* patcher/swe: adjust file paths when creating patches

* patcher: improve paths handling

* patcher: improve rootcause prompt

* deployment/patcher: set limits for loops/recursions
2025-03-31 16:39:08 +02:00
Henrik Brodin ce326f5171 Script to collect all container logs (#320)
* Script to collect all container logs

* Adding a script to collect all data

* Actually download tasks_storage
2025-03-31 14:43:11 +02:00
Henrik Brodin 2042bcd86f Enable additional logging and empty return values (#316)
* Enable additional logging and empty return values

* Update orchestrator/src/buttercup/orchestrator/task_server/server.py

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

---------

Co-authored-by: Riccardo Schirone <562321+ret2libc@users.noreply.github.com>
2025-03-31 13:56:02 +02:00
Riccardo Schirone c237229aa0 scheduler: more logs in build request/outputs (#321) 2025-03-31 13:46:46 +02:00
Henrik Brodin 44bbadb3c1 Implements stop harness processing (#317)
Previously, if all harnesses had zero weight on would still be chosen.
This ensures only harnesses of weight >0.0 are considered and allows for
proper stop.
A minor change to the task cancellation was also made to ensure delete
all tasks message was acknowledged properly.
2025-03-31 11:08:36 +02:00
Ronald Eytchison cc7ab22750 Fix CoverageMap and CoverageBot and add test cases (#319) 2025-03-30 09:42:42 -04:00
Riccardo Schirone 379e3efa7c deployment: fix disabling competition-api (#304) 2025-03-29 15:18:02 +01:00
Ronald Eytchison 637a41110a Tweak function lookup prompting for java (#307) 2025-03-28 15:14:30 -04:00
Ronald Eytchison f13bfc2c93 Tweak vuln discovery prompt for Java (#303) 2025-03-28 12:00:51 -04:00
Riccardo Schirone c409f4fb96 deployment: mount the /tmp volume in competition-api (#302) 2025-03-28 16:46:42 +01:00
Riccardo Schirone b3359bfbf7 deployment: fix typo and bump version (#301) v0.1.1 2025-03-28 16:02:26 +01:00
Riccardo Schirone 42f010e913 deployment: create prod/staging environments (#256)
* update VM sizes to L16
v0.1.0
2025-03-28 14:47:01 +01:00
2over12 ab0d7be2fd Optimize Copies for Seedgen (#295)
* update seedgen

* context manager

* format

* format

* tests and fixes
2025-03-28 09:35:44 -04:00
Ronald Eytchison 338809a5f0 Lookup function definitions in vuln-discovery (#293) 2025-03-28 08:49:47 -04:00
2over12 c31c63faca fuzzer: Use tmp for fuzzer wdir (#289) 2025-03-28 11:07:29 +01:00
Riccardo Schirone 545e8526ef program-model: make sure challenge is rw (#297) 2025-03-28 11:06:33 +01:00
Henrik Brodin 3347564dd1 Enable Redis Append Only File (AOF) (#296)
Enables the appendonly file, sync every sec and use manage-premium
storage class. Currently set to 8G, but that needs to be evaluated.
2025-03-28 11:05:39 +01:00
Ronald Eytchison 5e089cf6c4 Upload LLM OTel data to Signoz (#275)
* Copy signoz deployment from example-crs-architecture

* Make ports local and remove unused clickhouse config

* Upload seed-gen LLM traces to SigNoz with OTel

* Add telemetry to patcher and seed-gen with common function

* Update README and lockfiles
2025-03-28 11:04:45 +01:00
Henrik Brodin c2e2dc95c7 Include task metadata (#290) 2025-03-28 09:27:10 +01:00
Ronald Eytchison e94b7b3654 Sample seed-gen tasks from a weighted distribution (#273)
* Sample seed-gen tasks from a weighted distribution

* Initially prioritize seed-init task

Also seed-gen task counter in redis
2025-03-27 19:51:59 -04:00
Evan Downing 6129f37c1b Add tests for java challenges (#285) 2025-03-27 14:53:10 -04:00
Riccardo Schirone 758e831063 patcher: use codequery.get_types and fix context (#287)
* patcher: add tool to retrieve types

* program-model: fix codequery indexing

CodeQuery was run on the task without the patch applied, thus the
context was confusing the patcher, which was not able to generate a new
patch
2025-03-27 17:11:14 +01:00