tintinweb/smart-contract-vulndb
About
๐ An open dataset containing smart contract audit issues from various sources.
Security & PrivacyMeasured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalSmart Contract VulnDB
An open dataset of publicly available smart contract issues aggregated from various audit reports. The dataset can be accessed at ๐ป vulns.json, is updated once a day, and a live demo is available ๐ here.
LMK if you're building cool things with this dataset and I'll list them here ๐๐๐ธ DataSet
โ ๏ธ NOTE: Breaking Change due to GIT Large File Policy
Switching from one big vulns.json to files a 25k issues vulns-1.json, vulns-2.json, ...
const issue: Issue = {
title: "<string:title>",
severity: Severity.Medium,
body: "<markdown-string:description>",
dataSource: {
name: "<string:path-like-report-identifier>",
repo: "<string:git-or-http-url>",
url: "<string:url>"
}
};
To work around GitHub File Size Limits we'll split the database into equal files of 25k issues
- vulns-1.json - a 25k issues
- vulns-2.json
๐ธ Live Demo
๐ธ Accessing the Latest Snapshot
- Shell
โ curl https://tintinweb.github.io/smart-contract-vulndb/cache/vulns-1.json
โ curl https://tintinweb.github.io/smart-contract-vulndb/cache/vulns-2.json
- JavaScript
const all_issues = []
for(let idx=1; idx<10; idx++){
try {
const all = await (await fetch(`https://tintinweb.github.io/smart-contract-vulndb/cache/vulns-${idx}.json`)).text();
for(let line of all.split("\n")){
if(line.trim().length == 0){
continue;
}
try{
all_issues.push(JSON.parse(line))
} catch(e){
console.log(line)
throw e
}
}
} catch (e){
console.log(e)
break;
}
}
- JavaScript Local
const fs = require("fs")
let issues = [];
for(let idx=1; idx<10; idx++){
if(!fs.existsSync(`./dataset/vulns-${idx}.json`)) {
break;
}
const data = fs.readFileSync(`./dataset/vulns-${idx}.json`, "utf-8");
const part = data.split('\n').filter(l => l.trim().length > 0).map(l => JSON.parse(l))
issues = [...issues, ...part]
}
console.log(issues.length)
// 39125
[... new Set(issues.map(i => i.severity))]
/*
[
'medium', 'minor',
null, 'major',
'critical', undefined,
'info'
]
*/
๐ค For Nerds
First, run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
๐ Citation
If you are using this dataset in your research and paper, here's how you can cite this dataset:
- APA6
Ortner, M. (n.d.). Smart Contract VulnDB. Retrieved from https://github.com/tintinweb/smart-contract-vulndb.
- LateX (Bib)
@article{smart_contract_vulndb,
title={Smart Contract VulnDB},
url={https://github.com/tintinweb/smart-contract-vulndb},
author={Ortner, Martin}}
Explore related projects
Loadingโฆ
