Skip to content

Commit

Permalink
Show MASVS v1 IDs in the tests teables (OWASP#2522)
Browse files Browse the repository at this point in the history
* add masvs v1 IDs to tests table

* Refactor column_titles and masvs_v1_id formatting in populate_dynamic_pages.py
  • Loading branch information
cpholguera authored and Edilson Galvão committed Feb 4, 2024
1 parent 80c64ce commit 78c31cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ In the following section, we list some common root detection methods you'll enco

Root detection can also be implemented through libraries such as [RootBeer](https://github.com/scottyab/rootbeer "RootBeer").

#### SafetyNet
#### SafetyNet

SafetyNet is an Android API that provides a set of services and creates profiles of devices according to software and hardware information. This profile is then compared to a list of accepted device models that have passed Android compatibility testing. Google [recommends](https://developers.google.com/android/reference/com/google/android/gms/safetynet/SafetyNet "SafetyNet Documentation") using the feature as "an additional in-depth defense signal as part of an anti-abuse system".

Expand Down
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

0 comments on commit 78c31cb

Please sign in to comment.