{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Generate DISARM github files\n", "\n", "Generate all the DISARM github files from the DISARM master spreadsheets, being careful to retain any comments people have made below the \"don't write above this\" line in them. " ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "updated ../generated_pages/disarm_red_framework.md\n", "updated ../generated_files/disarm_red_framework_clickable.html\n", "updated ../generated_pages/disarm_blue_framework.md\n", "updated ../generated_files/disarm_blue_framework_clickable.html\n", "Temp: objecttype phase\n", "updated ../generated_pages/phases_index.md\n", "Temp: objecttype tactic\n", "updated ../generated_pages/tactics_index.md\n", "Updating ../generated_pages/tactics/TA01.md\n", "Updating ../generated_pages/tactics/TA02.md\n", "Updating ../generated_pages/tactics/TA13.md\n", "Updating ../generated_pages/tactics/TA04.md\n", "Updating ../generated_pages/tactics/TA05.md\n", "Updating ../generated_pages/tactics/TA06.md\n", "Updating ../generated_pages/tactics/TA08.md\n", "Updating ../generated_pages/tactics/TA10.md\n", "Temp: objecttype technique\n", "updated ../generated_pages/techniques_index.md\n", "Updating ../generated_pages/techniques/T0004.md\n", "Updating ../generated_pages/techniques/T0006.md\n", "Updating ../generated_pages/techniques/T0011.md\n", "Updating ../generated_pages/techniques/T0014.md\n", "Updating ../generated_pages/techniques/T0015.md\n", "Updating ../generated_pages/techniques/T0017.md\n", "Updating ../generated_pages/techniques/T0018.md\n", "Updating ../generated_pages/techniques/T0026.md\n", "Updating ../generated_pages/techniques/T0065.md\n", "Temp: objecttype task\n", "updated ../generated_pages/tasks_index.md\n", "Temp: objecttype incident\n", "updated ../generated_pages/incidents_index.md\n", "Updating ../generated_pages/incidents/I00002.md\n", "Updating ../generated_pages/incidents/I00005.md\n", "Updating ../generated_pages/incidents/I00006.md\n", "Updating ../generated_pages/incidents/I00017.md\n", "Updating ../generated_pages/incidents/I00042.md\n", "Temp: objecttype counter\n", "updated ../generated_pages/counters_index.md\n", "Updating ../generated_pages/counters/C00006.md\n", "Updating ../generated_pages/counters/C00008.md\n", "Updating ../generated_pages/counters/C00010.md\n", "Updating ../generated_pages/counters/C00011.md\n", "Updating ../generated_pages/counters/C00012.md\n", "Updating ../generated_pages/counters/C00014.md\n", "Updating ../generated_pages/counters/C00016.md\n", "Updating ../generated_pages/counters/C00021.md\n", "Updating ../generated_pages/counters/C00022.md\n", "Updating ../generated_pages/counters/C00024.md\n", "Updating ../generated_pages/counters/C00027.md\n", "Updating ../generated_pages/counters/C00029.md\n", "Updating ../generated_pages/counters/C00030.md\n", "Updating ../generated_pages/counters/C00031.md\n", "Updating ../generated_pages/counters/C00036.md\n", "Updating ../generated_pages/counters/C00042.md\n", "Updating ../generated_pages/counters/C00053.md\n", "Updating ../generated_pages/counters/C00058.md\n", "Updating ../generated_pages/counters/C00059.md\n", "Updating ../generated_pages/counters/C00065.md\n", "Updating ../generated_pages/counters/C00066.md\n", "Updating ../generated_pages/counters/C00067.md\n", "Updating ../generated_pages/counters/C00070.md\n", "Updating ../generated_pages/counters/C00073.md\n", "Updating ../generated_pages/counters/C00074.md\n", "Updating ../generated_pages/counters/C00076.md\n", "Updating ../generated_pages/counters/C00080.md\n", "Updating ../generated_pages/counters/C00081.md\n", "Updating ../generated_pages/counters/C00082.md\n", "Updating ../generated_pages/counters/C00084.md\n", "Updating ../generated_pages/counters/C00085.md\n", "Updating ../generated_pages/counters/C00093.md\n", "Updating ../generated_pages/counters/C00094.md\n", "Updating ../generated_pages/counters/C00096.md\n", "Updating ../generated_pages/counters/C00098.md\n", "Updating ../generated_pages/counters/C00105.md\n", "Updating ../generated_pages/counters/C00107.md\n", "Updating ../generated_pages/counters/C00117.md\n", "Updating ../generated_pages/counters/C00119.md\n", "Updating ../generated_pages/counters/C00122.md\n", "Updating ../generated_pages/counters/C00125.md\n", "Updating ../generated_pages/counters/C00126.md\n", "Updating ../generated_pages/counters/C00129.md\n", "Updating ../generated_pages/counters/C00133.md\n", "Updating ../generated_pages/counters/C00153.md\n", "Updating ../generated_pages/counters/C00155.md\n", "Updating ../generated_pages/counters/C00156.md\n", "Updating ../generated_pages/counters/C00161.md\n", "Updating ../generated_pages/counters/C00162.md\n", "Updating ../generated_pages/counters/C00164.md\n", "Updating ../generated_pages/counters/C00169.md\n", "Updating ../generated_pages/counters/C00176.md\n", "Updating ../generated_pages/counters/C00178.md\n", "Updating ../generated_pages/counters/C00182.md\n", "Updating ../generated_pages/counters/C00189.md\n", "Updating ../generated_pages/counters/C00195.md\n", "Updating ../generated_pages/counters/C00197.md\n", "Updating ../generated_pages/counters/C00211.md\n", "Updating ../generated_pages/counters/C00216.md\n", "Updating ../generated_pages/counters/C00219.md\n", "Temp: objecttype metatechnique\n", "updated ../generated_pages/metatechniques_index.md\n", "Temp: objecttype actortype\n", "updated ../generated_pages/actortypes_index.md\n", "updated ../generated_pages/responsetype_index.md\n", "updated ../generated_pages/detections_index.md\n", "updated ../generated_pages/tactics_by_responsetype_table.md\n", "updated ../generated_pages/metatechniques_by_responsetype_table.md\n" ] } ], "source": [ "import pandas as pd\n", "from generate_DISARM_pages import Disarm\n", "disarm = Disarm()\n", "disarm.generate_and_write_datafiles()" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
disarm_idnamesummarysector_idsframework_idslongname
0A001data scientistPerson who can wrangle data, implement machine...S001, S002, S003, S004, S005, S006, S007, S008...FW01, FW02A001 - data scientist
1A002targetPerson being targeted by disinformation campaignS001, S002, S003, S004, S005, S006, S007, S008...FW02A002 - target
2A003trusted authorityInfluencerS001, S002, S003, S004, S005, S006, S007, S008...FW01, FW02A003 - trusted authority
3A004activistS002FW02A004 - activist
4A005community groupS002FW02A005 - community group
5A006educatorS002FW02A006 - educator
6A007factcheckerSomeone with the skills to verify whether info...S002FW02A007 - factchecker
7A008libraryS002FW02A008 - library
8A009NGOS002FW02A009 - NGO
9A010religious organisationS002FW02A010 - religious organisation
10A011schoolS002FW02A011 - school
11A012account ownerAnyone who owns an account onlineS006FW01\\nFW02A012 - account owner
12A013content creatorS006FW01\\nFW02A013 - content creator
13A014elvesS006FW02A014 - elves
14A015general publicS006FW02A015 - general public
15A016influencerS006FW01\\nFW02A016 - influencer
16A017coordinating bodyFor example the DHSS003FW02A017 - coordinating body
17A018governmentGovernment agenciesS003FW01\\nFW02A018 - government
18A019militaryS003FW02A019 - military
19A020policy makerS003FW02A020 - policy maker
20A021media organisationS010FW01\\nFW02A021 - media organisation
21A022companyS009FW02A022 - company
22A023adtech providerS008FW02A023 - adtech provider
23A024developerS008FW02A024 - developer
24A025funding_site_adminFunding site adminS008FW02A025 - funding_site_admin
25A026games designerS008FW01, FW02A026 - games designer
26A027information securityS008FW02A027 - information security
27A028platform administratorS008FW02A028 - platform administrator
28A029server admininistratorS008FW02A029 - server admininistrator
29A030platformsS007FW02A030 - platforms
30A031social media platform adminstratorPerson with the authority to make changes to a...S007FW02A031 - social media platform adminstrator
31A032social media platform outreachS007FW02A032 - social media platform outreach
32A033social media platform ownerPerson with authority to make changes to a soc...S007FW02A033 - social media platform owner
\n", "
" ], "text/plain": [ " disarm_id name \\\n", "0 A001 data scientist \n", "1 A002 target \n", "2 A003 trusted authority \n", "3 A004 activist \n", "4 A005 community group \n", "5 A006 educator \n", "6 A007 factchecker \n", "7 A008 library \n", "8 A009 NGO \n", "9 A010 religious organisation \n", "10 A011 school \n", "11 A012 account owner \n", "12 A013 content creator \n", "13 A014 elves \n", "14 A015 general public \n", "15 A016 influencer \n", "16 A017 coordinating body \n", "17 A018 government \n", "18 A019 military \n", "19 A020 policy maker \n", "20 A021 media organisation \n", "21 A022 company \n", "22 A023 adtech provider \n", "23 A024 developer \n", "24 A025 funding_site_admin \n", "25 A026 games designer \n", "26 A027 information security \n", "27 A028 platform administrator \n", "28 A029 server admininistrator \n", "29 A030 platforms \n", "30 A031 social media platform adminstrator \n", "31 A032 social media platform outreach \n", "32 A033 social media platform owner \n", "\n", " summary \\\n", "0 Person who can wrangle data, implement machine... \n", "1 Person being targeted by disinformation campaign \n", "2 Influencer \n", "3 \n", "4 \n", "5 \n", "6 Someone with the skills to verify whether info... \n", "7 \n", "8 \n", "9 \n", "10 \n", "11 Anyone who owns an account online \n", "12 \n", "13 \n", "14 \n", "15 \n", "16 For example the DHS \n", "17 Government agencies \n", "18 \n", "19 \n", "20 \n", "21 \n", "22 \n", "23 \n", "24 Funding site admin \n", "25 \n", "26 \n", "27 \n", "28 \n", "29 \n", "30 Person with the authority to make changes to a... \n", "31 \n", "32 Person with authority to make changes to a soc... \n", "\n", " sector_ids framework_ids \\\n", "0 S001, S002, S003, S004, S005, S006, S007, S008... FW01, FW02 \n", "1 S001, S002, S003, S004, S005, S006, S007, S008... FW02 \n", "2 S001, S002, S003, S004, S005, S006, S007, S008... FW01, FW02 \n", "3 S002 FW02 \n", "4 S002 FW02 \n", "5 S002 FW02 \n", "6 S002 FW02 \n", "7 S002 FW02 \n", "8 S002 FW02 \n", "9 S002 FW02 \n", "10 S002 FW02 \n", "11 S006 FW01\\nFW02 \n", "12 S006 FW01\\nFW02 \n", "13 S006 FW02 \n", "14 S006 FW02 \n", "15 S006 FW01\\nFW02 \n", "16 S003 FW02 \n", "17 S003 FW01\\nFW02 \n", "18 S003 FW02 \n", "19 S003 FW02 \n", "20 S010 FW01\\nFW02 \n", "21 S009 FW02 \n", "22 S008 FW02 \n", "23 S008 FW02 \n", "24 S008 FW02 \n", "25 S008 FW01, FW02 \n", "26 S008 FW02 \n", "27 S008 FW02 \n", "28 S008 FW02 \n", "29 S007 FW02 \n", "30 S007 FW02 \n", "31 S007 FW02 \n", "32 S007 FW02 \n", "\n", " longname \n", "0 A001 - data scientist \n", "1 A002 - target \n", "2 A003 - trusted authority \n", "3 A004 - activist \n", "4 A005 - community group \n", "5 A006 - educator \n", "6 A007 - factchecker \n", "7 A008 - library \n", "8 A009 - NGO \n", "9 A010 - religious organisation \n", "10 A011 - school \n", "11 A012 - account owner \n", "12 A013 - content creator \n", "13 A014 - elves \n", "14 A015 - general public \n", "15 A016 - influencer \n", "16 A017 - coordinating body \n", "17 A018 - government \n", "18 A019 - military \n", "19 A020 - policy maker \n", "20 A021 - media organisation \n", "21 A022 - company \n", "22 A023 - adtech provider \n", "23 A024 - developer \n", "24 A025 - funding_site_admin \n", "25 A026 - games designer \n", "26 A027 - information security \n", "27 A028 - platform administrator \n", "28 A029 - server admininistrator \n", "29 A030 - platforms \n", "30 A031 - social media platform adminstrator \n", "31 A032 - social media platform outreach \n", "32 A033 - social media platform owner " ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "disarm.df_actortypes" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.3" } }, "nbformat": 4, "nbformat_minor": 4 }