{"id":20484644,"url":"https://github.com/sap-samples/security-research-graph-learning","last_synced_at":"2026-04-20T01:04:01.580Z","repository":{"id":239533450,"uuid":"797330136","full_name":"SAP-samples/security-research-graph-learning","owner":"SAP-samples","description":"Sample code to reproduce the research on \"Deep Learning-Based Code Vulnerability Detection: A New Perspective\" at SAP Security Research. The repository implements an GNN evaluation pipeline as well as pretraining schedules.","archived":false,"fork":false,"pushed_at":"2024-05-13T05:50:03.000Z","size":7707,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-05T16:20:24.670Z","etag":null,"topics":["analysis","code","detection","graph","intelligent","networks","neural","vulnerability"],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SAP-samples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-07T16:19:23.000Z","updated_at":"2025-02-18T06:33:20.000Z","dependencies_parsed_at":"2024-05-13T06:51:08.839Z","dependency_job_id":null,"html_url":"https://github.com/SAP-samples/security-research-graph-learning","commit_stats":null,"previous_names":["sap-samples/security-research-graph-learning"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SAP-samples/security-research-graph-learning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fsecurity-research-graph-learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fsecurity-research-graph-learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fsecurity-research-graph-learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fsecurity-research-graph-learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SAP-samples","download_url":"https://codeload.github.com/SAP-samples/security-research-graph-learning/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fsecurity-research-graph-learning/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32028550,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"ssl_error","status_checked_at":"2026-04-20T00:17:31.068Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["analysis","code","detection","graph","intelligent","networks","neural","vulnerability"],"created_at":"2024-11-15T16:24:42.233Z","updated_at":"2026-04-20T01:03:59.524Z","avatar_url":"https://github.com/SAP-samples.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Graph Learning for Code Vulnerability Detection\n\n[![REUSE status](https://api.reuse.software/badge/github.com/SAP-samples/security-research-graph-learning)](https://api.reuse.software/info/github.com/SAP-samples/security-research-graph-learning)\n\n## Description\nThis repository contains sample code to reproduce the research done for the bachelor thesis _\"Deep Learning-Based Code Vulnerability Detection: A New Perspective\"_ at SAP Security Research. \n\nThe repository implements an GNN evaluation pipeline including cross-validation as well as pretraining schedules.\n\n## Download and Installation\n\nTo run the experiments, the [DiversVul dataset](https://github.com/wagner-group/diversevul) (Chen, Yizheng, et al. 2023) must be downloaded, graphs need to be parsed with the [cpg](https://github.com/Fraunhofer-AISEC/cpg) tool and python packages in ``0_install`` are required. Further, scripts in ``codegraphs/diversevul/`` produce intermediate pickle files for cross-validation and filtering large and small graphs, which ``CodeGraphDataset.py`` requires to load the datasets.\n\n## Running the experiments\n\nAll configuration files can be found in ``configs/``. By switching out the filename in ``1_train.py`` different models can be run. ``2_helper_get_best_run.py`` summarizes results from cross-validation.\n\n - The main test results are produced with the ``configs/7_*`` and ``configs/9_*`` files.\n - Visualizations from the paper are made with scripts in ``utils/``\n - Different models as well as the training script are specified in ``models``.\n\n## Known Issues\nNo known issues.\n\n## How to obtain support\n[Create an issue](https://github.com/SAP-samples/\u003crepository-name\u003e/issues) in this repository if you find a bug or have questions about the content.\n \nFor additional support, [ask a question in SAP Community](https://answers.sap.com/questions/ask.html).\n\n## Contributing\nIf you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses [the standard DCO text of the Linux Foundation](https://developercertificate.org/).\n\n## License\nCopyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsap-samples%2Fsecurity-research-graph-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsap-samples%2Fsecurity-research-graph-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsap-samples%2Fsecurity-research-graph-learning/lists"}