|
6 | 6 | "metadata": {
|
7 | 7 | "collapsed": true,
|
8 | 8 | "ExecuteTime": {
|
9 |
| - "end_time": "2025-01-04T11:09:06.167189Z", |
10 |
| - "start_time": "2025-01-04T11:09:06.161084Z" |
| 9 | + "end_time": "2025-01-04T11:32:31.707960Z", |
| 10 | + "start_time": "2025-01-04T11:32:31.700865Z" |
11 | 11 | }
|
12 | 12 | },
|
13 | 13 | "source": [
|
|
31 | 31 | ]
|
32 | 32 | }
|
33 | 33 | ],
|
34 |
| - "execution_count": 48 |
| 34 | + "execution_count": 64 |
35 | 35 | },
|
36 | 36 | {
|
37 | 37 | "metadata": {
|
38 | 38 | "ExecuteTime": {
|
39 |
| - "end_time": "2025-01-04T11:09:08.134841Z", |
40 |
| - "start_time": "2025-01-04T11:09:06.240914Z" |
| 39 | + "end_time": "2025-01-04T11:32:33.188225Z", |
| 40 | + "start_time": "2025-01-04T11:32:31.726057Z" |
41 | 41 | }
|
42 | 42 | },
|
43 | 43 | "cell_type": "code",
|
|
265 | 265 | "</div>"
|
266 | 266 | ]
|
267 | 267 | },
|
268 |
| - "execution_count": 49, |
| 268 | + "execution_count": 65, |
269 | 269 | "metadata": {},
|
270 | 270 | "output_type": "execute_result"
|
271 | 271 | }
|
272 | 272 | ],
|
273 |
| - "execution_count": 49 |
| 273 | + "execution_count": 65 |
274 | 274 | },
|
275 | 275 | {
|
276 | 276 | "metadata": {},
|
|
290 | 290 | {
|
291 | 291 | "metadata": {
|
292 | 292 | "ExecuteTime": {
|
293 |
| - "end_time": "2025-01-04T11:09:08.315714Z", |
294 |
| - "start_time": "2025-01-04T11:09:08.288787Z" |
| 293 | + "end_time": "2025-01-04T11:32:33.499933Z", |
| 294 | + "start_time": "2025-01-04T11:32:33.465548Z" |
295 | 295 | }
|
296 | 296 | },
|
297 | 297 | "cell_type": "code",
|
|
361 | 361 | ],
|
362 | 362 | "id": "78362296379ded2c",
|
363 | 363 | "outputs": [],
|
364 |
| - "execution_count": 50 |
| 364 | + "execution_count": 66 |
365 | 365 | },
|
366 | 366 | {
|
367 | 367 | "metadata": {},
|
|
380 | 380 | {
|
381 | 381 | "metadata": {
|
382 | 382 | "ExecuteTime": {
|
383 |
| - "end_time": "2025-01-04T11:09:08.445448Z", |
384 |
| - "start_time": "2025-01-04T11:09:08.395098Z" |
| 383 | + "end_time": "2025-01-04T11:32:33.615619Z", |
| 384 | + "start_time": "2025-01-04T11:32:33.571449Z" |
385 | 385 | }
|
386 | 386 | },
|
387 | 387 | "cell_type": "code",
|
|
459 | 459 | ],
|
460 | 460 | "id": "127acc20aa0961e5",
|
461 | 461 | "outputs": [],
|
462 |
| - "execution_count": 51 |
| 462 | + "execution_count": 67 |
463 | 463 | },
|
464 | 464 | {
|
465 | 465 | "metadata": {},
|
|
479 | 479 | {
|
480 | 480 | "metadata": {
|
481 | 481 | "ExecuteTime": {
|
482 |
| - "end_time": "2025-01-04T11:09:10.757764Z", |
483 |
| - "start_time": "2025-01-04T11:09:09.191392Z" |
| 482 | + "end_time": "2025-01-04T11:32:34.301903Z", |
| 483 | + "start_time": "2025-01-04T11:32:33.686554Z" |
484 | 484 | }
|
485 | 485 | },
|
486 | 486 | "cell_type": "code",
|
|
632 | 632 | ],
|
633 | 633 | "id": "82d6e7106cd5a47f",
|
634 | 634 | "outputs": [],
|
635 |
| - "execution_count": 52 |
| 635 | + "execution_count": 68 |
636 | 636 | },
|
637 | 637 | {
|
638 | 638 | "metadata": {},
|
|
652 | 652 | {
|
653 | 653 | "metadata": {
|
654 | 654 | "ExecuteTime": {
|
655 |
| - "end_time": "2025-01-04T11:09:10.961030Z", |
656 |
| - "start_time": "2025-01-04T11:09:10.781992Z" |
| 655 | + "end_time": "2025-01-04T11:32:34.544009Z", |
| 656 | + "start_time": "2025-01-04T11:32:34.412398Z" |
657 | 657 | }
|
658 | 658 | },
|
659 | 659 | "cell_type": "code",
|
|
769 | 769 | ],
|
770 | 770 | "id": "11754c648da36dec",
|
771 | 771 | "outputs": [],
|
772 |
| - "execution_count": 53 |
| 772 | + "execution_count": 69 |
773 | 773 | },
|
774 | 774 | {
|
775 | 775 | "metadata": {},
|
|
787 | 787 | {
|
788 | 788 | "metadata": {
|
789 | 789 | "ExecuteTime": {
|
790 |
| - "end_time": "2025-01-04T11:09:12.736814Z", |
791 |
| - "start_time": "2025-01-04T11:09:11.088436Z" |
| 790 | + "end_time": "2025-01-04T11:32:36.739691Z", |
| 791 | + "start_time": "2025-01-04T11:32:34.727792Z" |
792 | 792 | }
|
793 | 793 | },
|
794 | 794 | "cell_type": "code",
|
795 | 795 | "source": [
|
796 |
| - "import pandas as pd\n", |
797 |
| - "import json\n", |
798 |
| - "\n", |
799 |
| - "# Set the generated date for metadata\n", |
800 |
| - "generated_date = \"2024-12-30\"\n", |
801 |
| - "\n", |
802 | 796 | "# Filter for all CVEs with CVSS_Base_Score of 10.0\n",
|
803 | 797 | "cvss_10_cves = df_2024[df_2024['CVSS_Base_Score'] == 10.0].copy()\n",
|
804 | 798 | "\n",
|
|
869 | 863 | " }\n",
|
870 | 864 | "}\n",
|
871 | 865 | "\n",
|
| 866 | + "\n", |
| 867 | + "# Handle NaN values in the output\n", |
| 868 | + "def handle_nan_values(obj):\n", |
| 869 | + " if isinstance(obj, float) and pd.isna(obj):\n", |
| 870 | + " return None # Replace NaN with null for JSON compatibility\n", |
| 871 | + " if isinstance(obj, dict):\n", |
| 872 | + " return {key: handle_nan_values(value) for key, value in obj.items()}\n", |
| 873 | + " if isinstance(obj, list):\n", |
| 874 | + " return [handle_nan_values(value) for value in obj]\n", |
| 875 | + " return obj\n", |
| 876 | + "\n", |
| 877 | + "\n", |
| 878 | + "# Process the JSON data to handle NaN values\n", |
| 879 | + "specific_cve_details_cleaned = handle_nan_values(specific_cve_details)\n", |
| 880 | + "\n", |
872 | 881 | "# Save the specific CVE details to a JSON file\n",
|
873 | 882 | "output_path = \"../../data/2024_insights/output/cve_details.json\"\n",
|
874 | 883 | "with open(output_path, \"w\") as f:\n",
|
875 |
| - " json.dump(specific_cve_details, f)" |
| 884 | + " json.dump(specific_cve_details_cleaned, f)" |
876 | 885 | ],
|
877 | 886 | "id": "387ed0168ac5725a",
|
878 | 887 | "outputs": [],
|
879 |
| - "execution_count": 54 |
| 888 | + "execution_count": 70 |
880 | 889 | },
|
881 | 890 | {
|
882 | 891 | "metadata": {},
|
|
894 | 903 | {
|
895 | 904 | "metadata": {
|
896 | 905 | "ExecuteTime": {
|
897 |
| - "end_time": "2025-01-04T11:09:13.344786Z", |
898 |
| - "start_time": "2025-01-04T11:09:12.829511Z" |
| 906 | + "end_time": "2025-01-04T11:32:37.432858Z", |
| 907 | + "start_time": "2025-01-04T11:32:36.832421Z" |
899 | 908 | }
|
900 | 909 | },
|
901 | 910 | "cell_type": "code",
|
|
980 | 989 | ],
|
981 | 990 | "id": "ffd736d262cf033f",
|
982 | 991 | "outputs": [],
|
983 |
| - "execution_count": 55 |
| 992 | + "execution_count": 71 |
984 | 993 | }
|
985 | 994 | ],
|
986 | 995 | "metadata": {
|
|
0 commit comments