Commit Graph

20 Commits

Author SHA1 Message Date
Evan Downing dd7c9c21e7 Locate functions in java stacktrace (#460)
* Uncomment skipped tests

* Codequery was already working for bouncycastle.

* Add support for copying src after build
2025-05-01 13:12:44 -04:00
Evan Downing 17a7e77f87 Fix mypy errors (#515) 2025-05-01 07:22:04 -04:00
Boyan MILANOV f55466101f Callee deduplication for C and Java (#495)
* Add basic imports resolver

* Fixes and more tests

* Doc

* Enable C callee dedup in codequery

* Add two libxml2 tests

* Add test to log4j

* Add java callee dedup

* Use container src dir, fix zookeeper tests

* Add test workaround for log4j2

* Lint

---------

Co-authored-by: Boyan MILANOV <boyanmilanov@coder-boyanmilanov-aixcc-boyan.c.production-1-405717.internal>
2025-04-30 14:54:39 +03:00
Evan Downing b1a1c19d99 Modify fuzzy search (#484) 2025-04-29 15:37:25 -04:00
Evan Downing 558c0aeb97 Update Ubuntu version of program-model (#472)
* Update Ubuntu version to support newer version of CodeQuery

* program-model: install custom cscope and updated codequery

* patcher: fix vuln_id -> submission_index

* patcher: fix docker install

---------

Co-authored-by: Riccardo Schirone <riccardo.schirone@trailofbits.com>
2025-04-29 15:20:14 -04:00
Evan Downing 2f4fabf792 Add more robust fuzzy search (#464)
* Add regression test for fuzzy search

* Add more robust fuzzy matching logic
2025-04-25 15:51:16 -04:00
Evan Downing d62d1fb4b8 Add option to pass just the function name (#463) 2025-04-25 15:24:00 -04:00
Evan Downing 8377739753 Resolve mypy errors (#459) 2025-04-25 07:52:57 -04:00
Evan Downing ef323e20e9 Remove logger calls. Redirect subprocess run outputs (#458) 2025-04-25 07:49:57 -04:00
Evan Downing 93f55a274b Add support for inner classes (#443)
* Change cscope call to compress database and improve lookup speed. Update tests.

* Fix log4j2 source paths

* Add private version of cscope
2025-04-25 07:37:39 -04:00
Evan Downing d975edf0a9 Add support for commons-codec (#390)
* Add support for commons-codec

* Uncomment passing test

* Move common file. Modify zookeeper and commons_codec tests.
2025-04-17 15:33:22 -04:00
Boyan MILANOV d2bf90e974 [Program-model] C tests for HDF5 (#407)
* Refactor get_functions test

* Add some tests

* Callees tests

* Add type defs test

* Remove residual debug code

* Fix tests

* Fix workflow file

* Fix workflow file again

* Add file_path tests for type defs, implement path rebasing for type defs in codequery

* Fix fixtures in pytest

* Fix module scoped fixtures in tests

---------

Co-authored-by: Boyan MILANOV <boyanmilanov@coder-boyanmilanov-aixcc-boyan.c.production-1-405717.internal>
2025-04-17 19:37:43 +03:00
Riccardo Schirone 2475b8e507 Move to use in-container paths (e.g. /src/) (#395)
* disable kythe/graphdb in tests
* fix integration CI
2025-04-16 11:05:44 +02:00
Boyan MILANOV d68c7d6a96 Fixes in CodeQuery and TreeSitter APIs with tests (#399)
* Add callees tests

* Add more tests for finding types

* Remove debug statements
2025-04-16 10:34:32 +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
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
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
Evan Downing 5d60b606b7 Add retrieving types in codequery (#260)
* Add retrieving types in codequery

* Add fuzzy search option (#271)
2025-03-27 08:23:01 -04:00
Evan Downing 4a6c4baf07 Retrieve types using codequery (#201)
* Add retrieving types from treesitter

* Update preprocessor types. Update fuzz-tooling directory layout
2025-03-13 09:31:12 -04:00
Riccardo Schirone e0b898a6b4 program-model: introduce codequery (#178)
* program-model/tree-sitter: refactor classes

* program-model/tree-sitter: change how paths are considered

This allows to parse also code in oss-fuzz (e.g. injected fuzz targets
not in upstream project)

* common: change name format for challenge commit

* program-model/codequery: make it persistent and nice

* program-model: disable janus & co for now

* patcher: make use of codequery instead of just tree-sitter

* program-model: add integration tests for codequery

* program-model/codequery: add support for different languages

* patcher: install codequery in patcher's container

* ci: fix codequery install

* program-model: ensure cqdb storage in /crs_scratch

* program-model: ensure the cqdb storage is available only at the end
2025-03-10 14:11:07 +01:00