mirror of
https://github.com/DISARMFoundation/DISARMframeworks.git
synced 2025-06-24 22:50:32 -04:00
Consolidated incidenttechniques sheet, added arent technique to techniques page, and removed BELOW THIS LINE etc
This commit is contained in:
parent
fa1360afee
commit
ba341c9379
424 changed files with 17187 additions and 487 deletions
|
@ -540,8 +540,14 @@ class Disarm:
|
|||
tactic=row['tactic_id'], summary=row['summary'])
|
||||
if objecttype == 'technique':
|
||||
tactic_name = self.df_tactics.loc[self.df_tactics['disarm_id'] == row['tactic_id'], 'name'].values[0]
|
||||
if "." in row['disarm_id']:
|
||||
parent_technique_id = row['disarm_id'].split(".")[0]
|
||||
parent_technique_name = self.df_techniques.loc[self.df_techniques['disarm_id'] == parent_technique_id, 'name'].values[0]
|
||||
parent_technique = "**Parent Technique:** " + parent_technique_id + ' ' + parent_technique_name
|
||||
else:
|
||||
parent_technique = ''
|
||||
metatext = template.format(type = 'Technique', id=row['disarm_id'], name=row['name'],
|
||||
tactic=f"{row['tactic_id']} {tactic_name}", summary=row['summary'],
|
||||
tactic=f"{row['tactic_id']} {tactic_name} {parent_technique}", summary=row['summary'],
|
||||
associatedtechniques=self.create_associated_techniques_string(row['disarm_id']),
|
||||
incidents=self.create_technique_incidents_string(row['disarm_id']),
|
||||
counters=self.create_technique_counters_string(row['disarm_id']))
|
||||
|
@ -583,7 +589,7 @@ class Disarm:
|
|||
print('Updating {}'.format(datafile))
|
||||
with open(datafile, 'w') as f:
|
||||
f.write(metatext)
|
||||
f.write(warntext)
|
||||
#f.write(warntext)
|
||||
f.write(usertext)
|
||||
f.close()
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue