dataset.tarcontains the source C programs along with test cases. It also contains csv files for test case coverage and code metrics (no. of pointers, no. of functions etc.rust_translations.tarcontains final translated programs from all translation outcomes (correct, compilation error programs etc.)resultscontains all the evaluation files.vulnerability_analysishas all the files related to our security analysis.vulnerability_analysis/model_checkershould contain source files for ESBMC tool.
Run the following command to setup a conda environment with all the necessary dependencies:
conda env create -f dependencies.yml -n new_env_nameSetup the API keys in your terminal session according to the selected model:
export DEEPSEEK_API_KEY=<your_key>
export OPENAI_API_KEY=<your_key>To use the models from bedrock update the aws_config.json with the required configurations
Run the following command by specifying the model and deployed location:
python safe_trans.py --model_name <model_name> --service_name <service_name>
It will generate intermediate directories with repair reports, compile reports and final results in rust_translations .
- Run
scan.pyto detect vulnerable files in the C programs. It generates ascan_report.json - Run
vulnerability_analysis/create_json_report.pyfile to parse log files from the ESBMC output and generate avulnerability_summary.jsonreport which includes identified vulnerability types and frequency.