{"id":13709530,"url":"https://github.com/tintinweb/smart-contract-vulndb","last_synced_at":"2025-04-09T23:17:38.224Z","repository":{"id":176355860,"uuid":"657163312","full_name":"tintinweb/smart-contract-vulndb","owner":"tintinweb","description":"🍋 An open dataset containing smart contract audit issues from various sources.","archived":false,"fork":false,"pushed_at":"2024-03-21T13:47:39.000Z","size":66750,"stargazers_count":218,"open_issues_count":2,"forks_count":18,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-09T23:17:28.457Z","etag":null,"topics":["smart-contract-security","vulnerabilities"],"latest_commit_sha":null,"homepage":"https://tintinweb.github.io/smart-contract-vulndb/","language":"JavaScript","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/tintinweb.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-22T13:03:53.000Z","updated_at":"2025-04-06T17:35:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"a02847d3-e886-4263-aa22-5e68ff1205c5","html_url":"https://github.com/tintinweb/smart-contract-vulndb","commit_stats":null,"previous_names":["tintinweb/smart-contract-vulndb"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tintinweb%2Fsmart-contract-vulndb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tintinweb%2Fsmart-contract-vulndb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tintinweb%2Fsmart-contract-vulndb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tintinweb%2Fsmart-contract-vulndb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tintinweb","download_url":"https://codeload.github.com/tintinweb/smart-contract-vulndb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125593,"owners_count":21051771,"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":["smart-contract-security","vulnerabilities"],"created_at":"2024-08-02T23:00:40.973Z","updated_at":"2025-04-09T23:17:38.198Z","avatar_url":"https://github.com/tintinweb.png","language":"JavaScript","funding_links":[],"categories":["With Vulnerabilities or Bugs"],"sub_categories":[],"readme":"[\u003cimg width=\"700\" alt=\"The Creed Rebellion!\" src=\"https://user-images.githubusercontent.com/2865694/233321738-92a9335c-d331-441e-89c3-cfecb8291f01.png\"\u003e](https://thecreed.xyz/)\u003cbr\u003e\n[[  🌐  ](https://thecreed.xyz/)[  🫂  ](https://community.thecreed.xyz/c/start-here)]\n\u003c/sup\u003e\u003cbr/\u003e\u003cbr/\u003e\n\n\n\n# Smart Contract VulnDB\n\nAn open dataset of publicly available smart contract issues aggregated from various audit reports. The dataset can be accessed at 🌻 [vulns.json](dataset/vulns.json), is updated once a day, and a live demo is available 🌐 [here](https://tintinweb.github.io/smart-contract-vulndb/\n).\n\n\u003csup\u003e\nLMK if you're building cool things with this dataset and I'll list them here 😊🙏\n\u003c/sup\u003e\n\n## 🔸 DataSet\n\n⚠️ NOTE: Breaking Change due to [GIT Large File Policy](https://docs.github.com/en/repositories/working-with-files/managing-large-files/about-large-files-on-github#file-size-limits)\nSwitching from one big `vulns.json` to files a 25k issues `vulns-1.json`, `vulns-2.json`, ...\n\n\n[\u003cimg width=\"760\" alt=\"image\" src=\"https://github.com/tintinweb/smart-contract-vulndb/assets/2865694/1b33870e-4201-43c9-b967-cf82498b5b48\"\u003e](https://github.com/tintinweb/smart-contract-vulndb/blob/main/dataset/vulns.json)\n\n\n```typescript\nconst issue: Issue = {\n  title: \"\u003cstring:title\u003e\",\n  severity: Severity.Medium,\n  body: \"\u003cmarkdown-string:description\u003e\",\n  dataSource: {\n    name: \"\u003cstring:path-like-report-identifier\u003e\",\n    repo: \"\u003cstring:git-or-http-url\u003e\",\n    url: \"\u003cstring:url\u003e\"\n  }\n};\n```\n\nTo work around [GitHub File Size Limits](https://docs.github.com/en/repositories/working-with-files/managing-large-files/about-large-files-on-github#file-size-limits) we'll split the database into equal files of 25k issues\n\n* [vulns-1.json](dataset/vulns-1.json) - a 25k issues\n* [vulns-2.json](dataset/vulns-2.json)\n\n## 🔸 Live Demo \n\n[\u003cimg width=\"941\" alt=\"image\" src=\"https://github.com/tintinweb/smart-contract-vulndb/assets/2865694/bf9cdd59-d415-438c-9c9b-95b7f01d3d62\"\u003e](https://tintinweb.github.io/smart-contract-vulndb/)\n\n* [Demo](https://tintinweb.github.io/smart-contract-vulndb/)\n\n## 🔸 Accessing the Latest Snapshot\n\n- Shell\n```\n⇒  curl https://tintinweb.github.io/smart-contract-vulndb/cache/vulns-1.json\n⇒  curl https://tintinweb.github.io/smart-contract-vulndb/cache/vulns-2.json\n```\n\n- JavaScript\n```javascript\nconst all_issues = []\nfor(let idx=1; idx\u003c10; idx++){\n  try {\n    const all = await (await fetch(`https://tintinweb.github.io/smart-contract-vulndb/cache/vulns-${idx}.json`)).text();\n    for(let line of all.split(\"\\n\")){\n      if(line.trim().length == 0){\n        continue;\n      } \n      try{\n        all_issues.push(JSON.parse(line))\n      } catch(e){\n        console.log(line)\n        throw e\n      }\n    }\n} catch (e){\n    console.log(e)\n    break;\n  }\n}\n```\n\n- JavaScript Local\n```javascript\nconst fs = require(\"fs\")\nlet issues = [];\nfor(let idx=1; idx\u003c10; idx++){\n  if(!fs.existsSync(`./dataset/vulns-${idx}.json`)) {\n    break;\n  }\n  const data = fs.readFileSync(`./dataset/vulns-${idx}.json`, \"utf-8\");\n  const part = data.split('\\n').filter(l =\u003e l.trim().length \u003e 0).map(l =\u003e JSON.parse(l))\n  issues = [...issues, ...part]\n}\nconsole.log(issues.length)\n// 39125\n[... new Set(issues.map(i =\u003e i.severity))]\n/*\n[\n  'medium',   'minor',\n  null,       'major',\n  'critical', undefined,\n  'info'\n]\n*/\n```\n\n- [NodeJs](./examples/javascript/example.js)\n- [TypeScript](./examples/typescript/example.ts)\n- [Python](./examples/python/example.py)\n\n## 🤓 For Nerds \n\nFirst, run the development server:\n\n```bash\nnpm run dev\n# or\nyarn dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\n## 🎓 Citation\n\nIf you are using this dataset in your research and paper, here's how you can cite this dataset: \n\n- APA6\n```\nOrtner, M. (n.d.). Smart Contract VulnDB. Retrieved from https://github.com/tintinweb/smart-contract-vulndb.\n```\n\n- LateX (Bib)\n```\n @article{smart_contract_vulndb, \n          title={Smart Contract VulnDB}, \n          url={https://github.com/tintinweb/smart-contract-vulndb}, \n          author={Ortner, Martin}} \n ```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftintinweb%2Fsmart-contract-vulndb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftintinweb%2Fsmart-contract-vulndb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftintinweb%2Fsmart-contract-vulndb/lists"}