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

Fix local build #2806

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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: 2 additions & 2 deletions .github/workflows/docgenerator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ jobs:
repository: "OWASP/owasp-masvs.git"
ref: ${{env.MASVS_VERSION}}
fetch-depth: 1
path: src/scripts/owasp-masvs
path: owasp-masvs

- name: Get MASVS Current Commit ID
run: cd src/scripts/owasp-masvs && echo "MASVS_COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
run: cd owasp-masvs && echo "MASVS_COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Confirm MASTG Current Commit ID
run: echo ${{env.MASVS_COMMIT}}

Expand Down
5 changes: 4 additions & 1 deletion run_web.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# rm -rf docs/MASTG
rm -rf docs/MASWE
# rm -rf docs/MASWE
# rm -rf docs/MASVS

./src/scripts/structure_masvs.sh
./src/scripts/structure_mastg.sh
python3 src/scripts/transform_files.py
python3 src/scripts/populate_dynamic_pages.py
Expand Down
1 change: 0 additions & 1 deletion src/scripts/populate_dynamic_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ def reorder_dict_keys(original_dict, key_order):
# tests/index.md

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

tests = get_mastg_components_dict("docs/MASTG/tests")
test_types = ["android", "ios"]
for test_type in test_types:
Expand Down
1 change: 0 additions & 1 deletion src/scripts/structure_mastg.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash

mkdir -p docs/MASTG
mkdir -p docs/MASTG/Intro
mkdir -p docs/MASTG/General
mkdir -p docs/MASTG/Android
Expand Down
30 changes: 21 additions & 9 deletions src/scripts/structure_masvs.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
mkdir docs/MASVS
mkdir docs/MASVS/Intro
mkdir docs/MASVS/controls
cp owasp-masvs/Document/*.md docs/MASVS
echo "$PWD"
if [ ! -d "../../owasp-masvs/" ] ; then
echo "Error: Clone owasp-masvs to same directory as owasp-mastg"
exit
fi

mkdir -p docs/MASVS/Intro
mkdir -p docs/MASVS/controls
cp ../../owasp-masvs/Document/*.md docs/MASVS
mv docs/MASVS/0[1-4]*.md docs/MASVS/Intro
mv owasp-masvs/controls/* docs/MASVS/controls
cp ../../owasp-masvs/controls/* docs/MASVS/controls

if [[ "$(uname)" == "Darwin" ]]; then
SED="gsed"
else
SED="sed"
fi


mkdir docs/assets/Images/MASVS
mv owasp-masvs/Document/images/* docs/assets/Images/MASVS
sed -i "s#images/#../../../assets/Images/MASVS/#g" docs/MASVS/**/*.md
sed -i "s#images/#../../assets/Images/MASVS/#g" docs/MASVS/*.md
mkdir -p docs/assets/Images/MASVS
cp ../../owasp-masvs/Document/images/* docs/assets/Images/MASVS
$SED -i "s#images/#../../../assets/Images/MASVS/#g" docs/MASVS/**/*.md
$SED -i "s#images/#../../assets/Images/MASVS/#g" docs/MASVS/*.md
Loading