Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show MASVS v1 IDs in the tests tables #2522

Merged
merged 2 commits into from
Feb 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/scripts/populate_dynamic_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def reorder_dict_keys(original_dict, key_order):

# tests/index.md

column_titles = {'id': 'ID', 'title': 'Name', 'masvs_v2_id': "MASVS ID", 'last_updated': 'Last Updated'} #'id': 'ID', ... , 'refs': 'Refs', 'techniques': 'Techniques'
column_titles = {'id': 'ID', 'title': 'Name', 'masvs_v2_id': "MASVS v2 ID", 'masvs_v1_id': "MASVS v1 IDs"} #'id': 'ID', ... , 'refs': 'Refs', 'techniques': 'Techniques', 'last_updated': 'Last Updated'

tests = get_mastg_components_dict("docs/MASTG/tests")
test_types = ["android", "ios"]
Expand All @@ -87,6 +87,8 @@ def reorder_dict_keys(original_dict, key_order):
tests_of_type = [reorder_dict_keys(test, column_titles.keys()) for test in tests if test['platform'] == test_type]
for test in tests_of_type:
test['masvs_v2_id'] = test['masvs_v2_id'][0]
if test.get("masvs_v1_id"):
test['masvs_v1_id'] = "<br>".join([f"{v1_id}" for v1_id in test['masvs_v1_id']])


for group_id, checklist in CHECKLIST_DICT.items():
Expand Down
Loading