Update README.md
Browse files
README.md
CHANGED
@@ -48,3 +48,20 @@ configs:
|
|
48 |
|
49 |
Extracted from the database of [Vulnerability-Lookup](https://vulnerability.circl.lu).
|
50 |
Dumps of the data are available [here](https://vulnerability.circl.lu/dumps/).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
Extracted from the database of [Vulnerability-Lookup](https://vulnerability.circl.lu).
|
50 |
Dumps of the data are available [here](https://vulnerability.circl.lu/dumps/).
|
51 |
+
|
52 |
+
|
53 |
+
### Query with datasets
|
54 |
+
|
55 |
+
```python
|
56 |
+
import json
|
57 |
+
from datasets import load_dataset
|
58 |
+
|
59 |
+
dataset = load_dataset("CIRCL/vulnerability-scores")
|
60 |
+
|
61 |
+
vulnerabilities = ["CVE-2012-2339", "RHSA-2023:5964", "GHSA-7chm-34j8-4f22", "PYSEC-2024-225"]
|
62 |
+
|
63 |
+
filtered_entries = dataset.filter(lambda elem: elem["id"] in vulnerabilities)
|
64 |
+
|
65 |
+
for entry in filtered_entries["train"]:
|
66 |
+
print(json.dumps(entry, indent=4))
|
67 |
+
```
|