{"id":13787441,"url":"https://github.com/arichardson/juliet-test-suite-c","last_synced_at":"2025-04-06T02:11:34.766Z","repository":{"id":68797811,"uuid":"179281349","full_name":"arichardson/juliet-test-suite-c","owner":"arichardson","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-10T16:52:28.000Z","size":38388,"stargazers_count":80,"open_issues_count":1,"forks_count":54,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T07:25:01.202Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arichardson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-04-03T12:03:21.000Z","updated_at":"2025-02-16T12:12:35.000Z","dependencies_parsed_at":"2023-05-07T06:05:09.231Z","dependency_job_id":null,"html_url":"https://github.com/arichardson/juliet-test-suite-c","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arichardson%2Fjuliet-test-suite-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arichardson%2Fjuliet-test-suite-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arichardson%2Fjuliet-test-suite-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arichardson%2Fjuliet-test-suite-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arichardson","download_url":"https://codeload.github.com/arichardson/juliet-test-suite-c/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423515,"owners_count":20936626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T20:00:34.467Z","updated_at":"2025-04-06T02:11:34.749Z","avatar_url":"https://github.com/arichardson.png","language":"C","funding_links":[],"categories":["Resources","[↑](#table-of-contents)Datasets \u003ca name=\"datasets\"\u003e\u003c/a\u003e"],"sub_categories":["By Purpose","Cybersecurity Skills"],"readme":"# Juliet Test Suite for C/C++\n\nThis is the Juliet Test Suite for C/C++ version 1.3 from https://samate.nist.gov/SARD/testsuite.php augmented with a build system for Unix-like OSes that supports automatically building test cases into individual executables and running those tests. The build system originally provided with the test suite supports building all test cases for a particular [CWE](https://cwe.mitre.org/) into a monolithic executable. Building individual test cases supports the evaluation of projects like [CHERI](https://www.cl.cam.ac.uk/research/security/ctsrd/cheri/) that facilitate memory safety for C/C++ programs at runtime. \n\nTestcases are organized by CWE in the `testcases` subdirectory. `juliet.py` is the main script that supports building and running individual test cases - individual CWEs or the entire test suite can be targeted. To build executables, `juliet.py` copies `CMakeLists.txt` into the directories for targeted CWEs and runs cmake followed by make. Output appears by default in a `bin` subdirectory. Each targeted CWE has a `bin/CWEXXX` directory that is further divided into `bin/CWEXXX/good` and `bin/CWEXXX/bad` subdirectories. For each test case, a \"good\" binary that does not contain the error is built and placed into the good subdirectory and a \"bad\" binary that contains the error is built and placed into the bad subdirectory.\n\nTo run executables after they are built, `juliet.py` invokes the `juliet-run.sh` script, which is copied to the `bin` subdirectory during the build. It records exit codes in `bin/CWEXXX/good.run` and `bin/CWEXXX/bad.run`. Executables are run with a timeout so that test cases depending on user input timeout with exit code 124.\n\n**Note:** Juliet C++ test cases that use namespace std and the bind() socket function didn't compile under c++11, which introduces std::bind(). This version of the test suite has replaced `bind()` calls in C++ source files with calls to `::bind()`.\n\n## Running tests on CheriBSD\n\nTODO\n\nTo run the tests on CHERI you can use [cheribuild](https://github.com/CTSRD-CHERI/cheribuild):\n`cheribuild.py juliet-c-cheri --build-and-test` will build and run the tests (assuming you have built the SDK and a CheriBSD image first).\n\nYou can also manually mount the built `bin` subdirectory on a CheriBSD host and use the `juliet-run.sh` script directly to run tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farichardson%2Fjuliet-test-suite-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farichardson%2Fjuliet-test-suite-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farichardson%2Fjuliet-test-suite-c/lists"}