From e1d8deded23f0e71f5bd3853f02360015b692728 Mon Sep 17 00:00:00 2001 From: Dionysis Lorentzos Date: Fri, 6 Feb 2026 11:53:11 +0100 Subject: [PATCH 01/20] Cluster workflows --- .github/workflows/main-checks.yml | 20 +++++++++ .github/workflows/pr-checks.yml | 22 ++++++++++ .../{ => reusable}/markdown-linter.yml | 13 +++--- .github/workflows/reusable/spell-checker.yml | 44 +++++++++++++++++++ .../workflows/{ => reusable}/url-checker.yml | 15 ++++--- .github/workflows/spell-checker-pr.yml | 29 ------------ .github/workflows/spell-checker.yml | 17 ------- .github/workflows/url-checker-pr.yml | 16 ------- 8 files changed, 101 insertions(+), 75 deletions(-) create mode 100644 .github/workflows/main-checks.yml create mode 100644 .github/workflows/pr-checks.yml rename .github/workflows/{ => reusable}/markdown-linter.yml (81%) create mode 100644 .github/workflows/reusable/spell-checker.yml rename .github/workflows/{ => reusable}/url-checker.yml (51%) delete mode 100644 .github/workflows/spell-checker-pr.yml delete mode 100644 .github/workflows/spell-checker.yml delete mode 100644 .github/workflows/url-checker-pr.yml diff --git a/.github/workflows/main-checks.yml b/.github/workflows/main-checks.yml new file mode 100644 index 00000000000..f75477f61f4 --- /dev/null +++ b/.github/workflows/main-checks.yml @@ -0,0 +1,20 @@ +name: Main Checks + +on: + workflow_dispatch: + push: + branches: + - master + +jobs: + spell-check: + uses: ./.github/workflows/reusable/spell-checker.yml + secrets: inherit + + url-check: + uses: ./.github/workflows/reusable/url-checker.yml + secrets: inherit + + markdown-lint: + uses: ./.github/workflows/reusable/markdown-linter.yml + secrets: inherit diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml new file mode 100644 index 00000000000..a9ef02b1fc7 --- /dev/null +++ b/.github/workflows/pr-checks.yml @@ -0,0 +1,22 @@ +name: PR Checks + +on: + pull_request: + +jobs: + spell-check: + uses: ./.github/workflows/reusable/spell-checker.yml + secrets: inherit + with: + check_modified_files_only: true + pr_number: ${{ github.event.pull_request.number }} + + url-check: + uses: ./.github/workflows/reusable/url-checker.yml + secrets: inherit + with: + check_modified_files_only: true + + markdown-lint: + uses: ./.github/workflows/reusable/markdown-linter.yml + secrets: inherit diff --git a/.github/workflows/markdown-linter.yml b/.github/workflows/reusable/markdown-linter.yml similarity index 81% rename from .github/workflows/markdown-linter.yml rename to .github/workflows/reusable/markdown-linter.yml index 776ab3ead88..5b69f38d3db 100644 --- a/.github/workflows/markdown-linter.yml +++ b/.github/workflows/reusable/markdown-linter.yml @@ -1,11 +1,7 @@ -name: Markdown Linter +name: Markdown Linter (Reusable) on: - workflow_dispatch: - pull_request: - push: - branches: - - master + workflow_call: jobs: markdown-lint-check: @@ -15,10 +11,11 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 1 + - name: Install markdownlint-rule-search-replace plugin - run: npm install markdownlint-rule-search-replace --save-dev + run: npm install markdownlint-rule-search-replace --save-dev + - name: markdownlint-cli2 uses: DavidAnson/markdownlint-cli2-action@v16.0.0 with: config: ".markdownlint.jsonc" - diff --git a/.github/workflows/reusable/spell-checker.yml b/.github/workflows/reusable/spell-checker.yml new file mode 100644 index 00000000000..daf215826e9 --- /dev/null +++ b/.github/workflows/reusable/spell-checker.yml @@ -0,0 +1,44 @@ +name: Spell Checker (Reusable) + +on: + workflow_call: + inputs: + check_modified_files_only: + description: 'Only check files changed in the PR' + required: false + default: false + type: boolean + pr_number: + description: 'PR number (required when check_modified_files_only is true)' + required: false + type: number + +jobs: + codespell: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Get Changed Files from Pull Request + if: inputs.check_modified_files_only + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + files=$(gh pr diff ${{ inputs.pr_number }} --name-only | xargs -I {} sh -c 'echo "./{}"' | tr '\n' ' ') + echo "CHANGED_FILES=$files" >> "$GITHUB_ENV" + + - name: Check Spelling (Changed Files) + if: inputs.check_modified_files_only + uses: codespell-project/actions-codespell@master + with: + check_filenames: true + skip: "*.json,*.yml,*.apk,*.ipa,*.svg,*.txt,*.kt,*.swift,*.xml,*.java" + ignore_words_list: "aas,aaS,ba,bund,compliancy,firt,ist,keypair,ligh,Manuel,Manual,ro,ser,synopsys,theses,zuser,lief,EDE" + path: ${{ env.CHANGED_FILES }} + + - name: Check Spelling (All Files) + if: ${{ !inputs.check_modified_files_only }} + uses: codespell-project/actions-codespell@master + with: + skip: "*.json,*.yml,*.apk,*.ipa,*.svg,*.txt,*.kt,*.swift,*.xml,*.java" + ignore_words_list: "aas,aaS,ba,bund,compliancy,firt,ist,keypair,ligh,Manuel,Manual,ro,ser,synopsys,theses,zuser,lief,EDE" \ No newline at end of file diff --git a/.github/workflows/url-checker.yml b/.github/workflows/reusable/url-checker.yml similarity index 51% rename from .github/workflows/url-checker.yml rename to .github/workflows/reusable/url-checker.yml index 62037cf994d..2aa6ac2e5fb 100644 --- a/.github/workflows/url-checker.yml +++ b/.github/workflows/reusable/url-checker.yml @@ -1,10 +1,13 @@ -name: URL Checker +name: URL Checker (Reusable) on: - workflow_dispatch: - push: - branches: - - master + workflow_call: + inputs: + check_modified_files_only: + description: 'Only check files modified in the PR' + required: false + default: false + type: boolean jobs: markdown-link-check: @@ -12,8 +15,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: URL Link Check uses: Diolor/github-action-markdown-link-check@1.3 with: use-quiet-mode: 'yes' config-file: '.github/workflows/config/url-checker-config.json' + check-modified-files-only: ${{ inputs.check_modified_files_only && 'yes' || 'no' }} \ No newline at end of file diff --git a/.github/workflows/spell-checker-pr.yml b/.github/workflows/spell-checker-pr.yml deleted file mode 100644 index f107ebbd71d..00000000000 --- a/.github/workflows/spell-checker-pr.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Spell Checker (PR) - -on: - pull_request: - -jobs: - codespell: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Get Changed Files from Pull Request - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - # get file names and seperate them with space ' ' - files=$(gh pr diff ${{ github.event.pull_request.number }} --name-only | xargs -I {} sh -c 'echo "./{}"' | tr '\n' ' ') - echo "CHANGED_FILES=$files" >> "$GITHUB_ENV" - - - name: Output Changed Files - run: echo ${{ env.CHANGED_FILES }} - - - name: Check for Spelling Errors for Changed Files - uses: codespell-project/actions-codespell@master - with: - check_filenames: true - skip: "*.json,*.yml,*.apk,*.ipa,*.svg,*.txt,*.kt,*.swift,*.xml,*.java" - ignore_words_list: "aas,aaS,ba,bund,compliancy,firt,ist,keypair,ligh,Manuel,Manual,ro,ser,synopsys,theses,zuser,lief,EDE" - path: ${{ env.CHANGED_FILES }} diff --git a/.github/workflows/spell-checker.yml b/.github/workflows/spell-checker.yml deleted file mode 100644 index a85d6b48f80..00000000000 --- a/.github/workflows/spell-checker.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Spell Checker - -on: - workflow_dispatch: - push: - branches: - - master - -jobs: - codespell: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: codespell-project/actions-codespell@master - with: - ignore_words_list: "aas,aaS,ba,bund,compliancy,firt,ist,keypair,ligh,Manuel,Manual,ro,ser,synopsys,theses,zuser,lief,EDE" - skip: "*.json,*.yml,*.apk,*.ipa,*.svg,*.txt,*.kt,*.swift,*.xml,*.java" diff --git a/.github/workflows/url-checker-pr.yml b/.github/workflows/url-checker-pr.yml deleted file mode 100644 index 80543406382..00000000000 --- a/.github/workflows/url-checker-pr.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: URL Checker (PR) - -on: [pull_request] - -jobs: - markdown-link-check: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: URL Link Check - uses: Diolor/github-action-markdown-link-check@1.3 - with: - use-quiet-mode: 'yes' - config-file: '.github/workflows/config/url-checker-config.json' - check-modified-files-only: 'yes' From 1b9e7933daf52242313d39de4c95713f188eeed2 Mon Sep 17 00:00:00 2001 From: Dionysis Lorentzos Date: Fri, 6 Feb 2026 11:58:32 +0100 Subject: [PATCH 02/20] Naming --- .github/workflows/main-checks.yml | 5 ++++- .github/workflows/pr-checks.yml | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main-checks.yml b/.github/workflows/main-checks.yml index f75477f61f4..8be6fb633ee 100644 --- a/.github/workflows/main-checks.yml +++ b/.github/workflows/main-checks.yml @@ -1,4 +1,4 @@ -name: Main Checks +name: Main Branch Checks on: workflow_dispatch: @@ -8,13 +8,16 @@ on: jobs: spell-check: + name: Spell Check (Full) uses: ./.github/workflows/reusable/spell-checker.yml secrets: inherit url-check: + name: URL Check (Full) uses: ./.github/workflows/reusable/url-checker.yml secrets: inherit markdown-lint: + name: Markdown Lint uses: ./.github/workflows/reusable/markdown-linter.yml secrets: inherit diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index a9ef02b1fc7..c21af507e56 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -5,6 +5,7 @@ on: jobs: spell-check: + name: Spell Check (Changed Files) uses: ./.github/workflows/reusable/spell-checker.yml secrets: inherit with: @@ -12,11 +13,13 @@ jobs: pr_number: ${{ github.event.pull_request.number }} url-check: + name: URL Check (Changed Files) uses: ./.github/workflows/reusable/url-checker.yml secrets: inherit with: check_modified_files_only: true markdown-lint: + name: Markdown Lint uses: ./.github/workflows/reusable/markdown-linter.yml secrets: inherit From 08a05d70f69bd29dcfab87aa1bdcd4854542ce7f Mon Sep 17 00:00:00 2001 From: Dionysis Lorentzos Date: Fri, 6 Feb 2026 12:01:56 +0100 Subject: [PATCH 03/20] Move website build check workflow to PRs --- .github/workflows/check-website-build.yml | 12 ------------ .github/workflows/pr-checks.yml | 7 +++++++ .../workflows/reusable/website-build-checker.yml | 16 ++++++++++++++++ 3 files changed, 23 insertions(+), 12 deletions(-) delete mode 100644 .github/workflows/check-website-build.yml create mode 100644 .github/workflows/reusable/website-build-checker.yml diff --git a/.github/workflows/check-website-build.yml b/.github/workflows/check-website-build.yml deleted file mode 100644 index e99e8605e80..00000000000 --- a/.github/workflows/check-website-build.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Check Website Build -on: - pull_request: - branches: - - "*" - -jobs: - build: - uses: OWASP/mas-website/.github/workflows/build-website-reusable.yml@main - with: - deploy: false - sources_override_json: ${{ format('{{"OWASP/mastg":"refs/pull/{0}/head"}}', github.event.pull_request.number) }} diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index c21af507e56..8bf83abbeb9 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -23,3 +23,10 @@ jobs: name: Markdown Lint uses: ./.github/workflows/reusable/markdown-linter.yml secrets: inherit + + website-build: + name: Website Build Check + uses: ./.github/workflows/reusable/website-build-checker.yml + secrets: inherit + with: + pr_number: ${{ github.event.pull_request.number }} diff --git a/.github/workflows/reusable/website-build-checker.yml b/.github/workflows/reusable/website-build-checker.yml new file mode 100644 index 00000000000..d4493a737f3 --- /dev/null +++ b/.github/workflows/reusable/website-build-checker.yml @@ -0,0 +1,16 @@ +name: Website Build Checker (Reusable) + +on: + workflow_call: + inputs: + pr_number: + description: 'Pull request number' + required: true + type: number + +jobs: + website-build-check: + uses: OWASP/mas-website/.github/workflows/build-website-reusable.yml@main + with: + deploy: false + sources_override_json: ${{ format('{"OWASP/mastg":"refs/pull/{0}/head"}', inputs.pr_number) }} From bd199cb6bd885a6738c7d58307667e6f0f0bf0b2 Mon Sep 17 00:00:00 2001 From: Dionysis Lorentzos Date: Fri, 6 Feb 2026 12:10:25 +0100 Subject: [PATCH 04/20] Move duplicate id checks to pr workflow --- .github/workflows/pr-checks.yml | 5 ++ .../duplicate-ids-checker.yml} | 67 +++++++++---------- 2 files changed, 35 insertions(+), 37 deletions(-) rename .github/workflows/{check-duplicate-ids.yml => reusable/duplicate-ids-checker.yml} (89%) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 8bf83abbeb9..812e8321055 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -30,3 +30,8 @@ jobs: secrets: inherit with: pr_number: ${{ github.event.pull_request.number }} + + duplicate-ids: + name: Duplicate IDs Check + uses: ./.github/workflows/reusable/duplicate-ids-checker.yml + secrets: inherit diff --git a/.github/workflows/check-duplicate-ids.yml b/.github/workflows/reusable/duplicate-ids-checker.yml similarity index 89% rename from .github/workflows/check-duplicate-ids.yml rename to .github/workflows/reusable/duplicate-ids-checker.yml index cc61fb9e653..39658fbbd60 100644 --- a/.github/workflows/check-duplicate-ids.yml +++ b/.github/workflows/reusable/duplicate-ids-checker.yml @@ -1,79 +1,72 @@ -name: Check Duplicate File IDs +name: Duplicate IDs Checker (Reusable) on: - pull_request: - paths: - - 'apps/**' - - 'best-practices/**' - - 'demos/**' - - 'tests-beta/**' - - 'tools/**' - - 'techniques/**' + workflow_call: jobs: check-duplicates: runs-on: ubuntu-latest - + steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 1 - + - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' - + - name: Get new files in PR id: get-new-files run: | # Get the base branch ref from the PR event BASE_REF="${{ github.event.pull_request.base.ref }}" echo "Base branch is: $BASE_REF" - + # Fetch the base branch to ensure it's available locally git fetch origin $BASE_REF - + # Create a file with the list of new files in this PR git diff --name-status --diff-filter=A origin/$BASE_REF..HEAD | grep -E "^A\s+(apps/|best-practices/|demos/|tests-beta/|tools/|techniques/)" | cut -f2 > new_files_in_pr.txt || echo "No new files matching the pattern" - + echo "New files in PR:" cat new_files_in_pr.txt - + # Ensure the file exists even if empty touch new_files_in_pr.txt - + - name: Check for duplicate file IDs id: check-duplicates run: | python .github/scripts/check_duplicate_ids.py - + - name: Delete previous comments and comment on PR if duplicates found if: always() - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const fs = require('fs'); - + // Helper function to format a notification message const formatDuplicateMessage = (duplicate, isReviewComment = true) => { // Extract the ID prefix for a more specific message let idType = duplicate.file_id.split('-').slice(0, 2).join('-'); - + // Choose the appropriate header style based on comment type const headerPrefix = isReviewComment ? '###' : '##'; - + return ` ${headerPrefix} ⚠️ Duplicate \`${idType}\` ID Detected - + ${isReviewComment ? 'This file' : `File \`${duplicate.file_path}\``} has the ID \`${duplicate.file_id}\` which already exists in \`${duplicate.existing_path}\`. - + **IMPORTANT:** Please use the next available ID: \`${duplicate.suggested_id}\` `; }; - + // Step 1: Try to clean up existing comments try { const comments = await github.rest.pulls.listReviewComments({ @@ -81,15 +74,15 @@ jobs: repo: context.repo.repo, pull_number: context.issue.number }); - + // Filter for comments from this action - const ourComments = comments.data.filter(comment => - comment.body.includes('⚠️ Duplicate') && + const ourComments = comments.data.filter(comment => + comment.body.includes('⚠️ Duplicate') && comment.body.includes('ID Detected') ); - + console.log(`Found ${ourComments.length} previous comments from this action.`); - + // Delete the comments for (const comment of ourComments) { try { @@ -107,18 +100,18 @@ jobs: console.log(`Error handling existing comments: ${error.message}`); // Continue with the workflow regardless of errors with existing comments } - + // Step 2: Check if we need to post new notifications const hasDuplicatesOutput = '${{ steps.check-duplicates.outputs.has_duplicates }}'; - + if (hasDuplicatesOutput !== 'true' || !fs.existsSync('duplicate_files.json')) { console.log('No duplicates to report.'); return; } - + // Step 3: Post notifications for each duplicate const duplicatesData = JSON.parse(fs.readFileSync('duplicate_files.json', 'utf8')); - + for (const duplicate of duplicatesData) { // First try posting a review comment (preferred method) try { @@ -135,7 +128,7 @@ jobs: console.log(`Successfully posted review comment for ${duplicate.file_path}`); } catch (error) { console.log(`Error posting review comment: ${error.message}`); - + // Fallback: post a comment on the PR thread instead of as a review comment try { await github.rest.issues.createComment({ @@ -149,4 +142,4 @@ jobs: console.log(`Error posting fallback PR thread comment: ${fallbackError.message}`); } } - } \ No newline at end of file + } From a6ae616c884a48228b11dbe72578d90bbd3e0541 Mon Sep 17 00:00:00 2001 From: Dionysis Lorentzos Date: Fri, 6 Feb 2026 12:11:30 +0100 Subject: [PATCH 05/20] Generate demo matrix can be reusable --- .github/scripts/generate-demo-matrix.sh | 44 +++++++++++++++++++++++ .github/workflows/build-android-demos.yml | 31 ++++------------ .github/workflows/build-ios-demos.yml | 29 ++++----------- 3 files changed, 56 insertions(+), 48 deletions(-) create mode 100755 .github/scripts/generate-demo-matrix.sh diff --git a/.github/scripts/generate-demo-matrix.sh b/.github/scripts/generate-demo-matrix.sh new file mode 100755 index 00000000000..1e83f735c8b --- /dev/null +++ b/.github/scripts/generate-demo-matrix.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Generate a matrix of demo directories for GitHub Actions +# Usage: generate-demo-matrix.sh [base_sha] +# Example: generate-demo-matrix.sh android pull_request abc123 + +set -e + +PLATFORM="$1" +EVENT_NAME="$2" +BASE_SHA="$3" + +if [ -z "$PLATFORM" ] || [ -z "$EVENT_NAME" ]; then + echo "Usage: $0 [base_sha]" >&2 + exit 1 +fi + +DEMO_PATH="demos/${PLATFORM}" + +if [ "$EVENT_NAME" = "pull_request" ]; then + if [ -z "$BASE_SHA" ]; then + echo "Error: base_sha is required for pull_request events" >&2 + exit 1 + fi + + # Get list of changed files in demos// directory + changed_files=$(git diff --name-only "$BASE_SHA" HEAD -- "${DEMO_PATH}/*") + + echo "Changed files:" >&2 + echo "$changed_files" >&2 + + # Extract unique demo directories + matrix=$(echo "$changed_files" | grep -oE "${DEMO_PATH}/[^/]*/MASTG-DEMO-[^/]+" | sort -u | head -c -1 | tr '\n' ' ' | sed 's/ /","/g') + + # If no changes, set empty matrix + if [ -z "$matrix" ]; then + echo '{"demo":[]}' + else + echo "{\"demo\":[\"$matrix\"]}" + fi +else + # Default behavior: include all demos for master branch + matrix=$(echo ${DEMO_PATH}/*/MASTG-DEMO-* | sed 's/ /","/g') + echo "{\"demo\":[\"$matrix\"]}" +fi diff --git a/.github/workflows/build-android-demos.yml b/.github/workflows/build-android-demos.yml index 3d443f00234..8fa296e33fa 100644 --- a/.github/workflows/build-android-demos.yml +++ b/.github/workflows/build-android-demos.yml @@ -23,36 +23,17 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: - sparse-checkout: demos/android + sparse-checkout: | + demos/android + .github/scripts fetch-depth: 2 # Required for git diff in PRs - name: Generate matrix id: set-matrix run: | - if [ "${{ github.event_name }}" = "pull_request" ]; then - # Get list of changed files in demos/android/ directory - changed_files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} HEAD -- 'demos/android/*') - - echo "Changed files:" - echo "$changed_files" - - # Extract unique demo directories - matrix=$(echo "$changed_files" | grep -oE 'demos/android/[^/]*/MASTG-DEMO-[^/]+' | sort -u | head -c -1 | tr '\n' ' ' | sed 's/ /","/g') - - # If no changes, set empty matrix - if [ -z "$matrix" ]; then - echo "matrix={\"demo\":[]}" >> $GITHUB_OUTPUT - else - echo "matrix={\"demo\":[\"$matrix\"]}" >> $GITHUB_OUTPUT - fi - else - # Default behavior: include all demos for master branch - matrix=$(echo demos/android/*/MASTG-DEMO-* | sed 's/ /","/g') - echo "matrix={\"demo\":[\"$matrix\"]}" >> $GITHUB_OUTPUT - fi - echo "Print matrix: $matrix" - - name: Print matrix - run: echo "${{ steps.set-matrix.outputs.matrix }}" + matrix=$(.github/scripts/generate-demo-matrix.sh android "${{ github.event_name }}" "${{ github.event.pull_request.base.sha }}") + echo "matrix=$matrix" >> $GITHUB_OUTPUT + echo "Generated matrix: $matrix" build-base-app: runs-on: ubuntu-latest diff --git a/.github/workflows/build-ios-demos.yml b/.github/workflows/build-ios-demos.yml index a54f01c1ba7..f9f488ab180 100644 --- a/.github/workflows/build-ios-demos.yml +++ b/.github/workflows/build-ios-demos.yml @@ -22,34 +22,17 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: - sparse-checkout: demos/ios + sparse-checkout: | + demos/ios + .github/scripts fetch-depth: 2 # Required for git diff in PRs - name: Generate matrix id: set-matrix run: | - if [ "${{ github.event_name }}" = "pull_request" ]; then - # Get list of changed files in demos/ios/ directory - changed_files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} HEAD -- 'demos/ios/*') - - echo "Changed files:" - echo "$changed_files" - - # Extract unique demo directories - matrix=$(echo "$changed_files" | grep -oE 'demos/ios/[^/]*/MASTG-DEMO-[^/]+' | sort -u | head -c -1 | tr '\n' ' ' | sed 's/ /","/g') - - # If no changes, set empty matrix - if [ -z "$matrix" ]; then - echo "matrix={\"demo\":[]}" >> $GITHUB_OUTPUT - else - echo "matrix={\"demo\":[\"$matrix\"]}" >> $GITHUB_OUTPUT - fi - else - # Default behavior: include all demos for master branch - matrix=$(echo demos/ios/*/MASTG-DEMO-* | sed 's/ /","/g') - echo "matrix={\"demo\":[\"$matrix\"]}" >> $GITHUB_OUTPUT - fi - echo "Print matrix: $matrix" + matrix=$(.github/scripts/generate-demo-matrix.sh ios "${{ github.event_name }}" "${{ github.event.pull_request.base.sha }}") + echo "matrix=$matrix" >> $GITHUB_OUTPUT + echo "Generated matrix: $matrix" build: needs: generate-matrix From 82d8c43737b9fe60d712851b9f3a8cea99a35fa2 Mon Sep 17 00:00:00 2001 From: Dionysis Lorentzos Date: Fri, 6 Feb 2026 12:15:44 +0100 Subject: [PATCH 06/20] Add concurrency groups for main and pr check. This will cancel previous jobs for master and PRs --- .github/workflows/main-checks.yml | 4 ++++ .github/workflows/pr-checks.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/main-checks.yml b/.github/workflows/main-checks.yml index 8be6fb633ee..0dfa08d6c1f 100644 --- a/.github/workflows/main-checks.yml +++ b/.github/workflows/main-checks.yml @@ -6,6 +6,10 @@ on: branches: - master +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: spell-check: name: Spell Check (Full) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 812e8321055..a25838da11a 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -3,6 +3,10 @@ name: PR Checks on: pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + jobs: spell-check: name: Spell Check (Changed Files) From 094c51067afb14f9473e6bdbffc8d0f2bc8535bf Mon Sep 17 00:00:00 2001 From: Dionysis Lorentzos Date: Fri, 6 Feb 2026 12:21:42 +0100 Subject: [PATCH 07/20] Revert path check for duplicate ids --- .github/workflows/check-duplicate-ids.yml | 17 +++++++++++++++++ .github/workflows/pr-checks.yml | 5 ----- 2 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/check-duplicate-ids.yml diff --git a/.github/workflows/check-duplicate-ids.yml b/.github/workflows/check-duplicate-ids.yml new file mode 100644 index 00000000000..2dd41087259 --- /dev/null +++ b/.github/workflows/check-duplicate-ids.yml @@ -0,0 +1,17 @@ +name: Check Duplicate File IDs + +on: + pull_request: + paths: + - 'apps/**' + - 'best-practices/**' + - 'demos/**' + - 'tests-beta/**' + - 'tools/**' + - 'techniques/**' + +jobs: + check-duplicates: + name: Duplicate IDs Check + uses: ./.github/workflows/reusable/duplicate-ids-checker.yml + secrets: inherit diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index a25838da11a..6ff6a1897e6 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -34,8 +34,3 @@ jobs: secrets: inherit with: pr_number: ${{ github.event.pull_request.number }} - - duplicate-ids: - name: Duplicate IDs Check - uses: ./.github/workflows/reusable/duplicate-ids-checker.yml - secrets: inherit From cef632b52e7f61e830d859ee827377d28891db7f Mon Sep 17 00:00:00 2001 From: Dionysis Lorentzos Date: Fri, 6 Feb 2026 12:21:55 +0100 Subject: [PATCH 08/20] Make globs expand to nothing if no matches --- .github/scripts/generate-demo-matrix.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/scripts/generate-demo-matrix.sh b/.github/scripts/generate-demo-matrix.sh index 1e83f735c8b..e584a41092b 100755 --- a/.github/scripts/generate-demo-matrix.sh +++ b/.github/scripts/generate-demo-matrix.sh @@ -4,6 +4,7 @@ # Example: generate-demo-matrix.sh android pull_request abc123 set -e +shopt -s nullglob # Make globs expand to nothing if no matches PLATFORM="$1" EVENT_NAME="$2" @@ -39,6 +40,11 @@ if [ "$EVENT_NAME" = "pull_request" ]; then fi else # Default behavior: include all demos for master branch - matrix=$(echo ${DEMO_PATH}/*/MASTG-DEMO-* | sed 's/ /","/g') - echo "{\"demo\":[\"$matrix\"]}" + demos=(${DEMO_PATH}/*/MASTG-DEMO-*) + if [ ${#demos[@]} -eq 0 ]; then + echo '{"demo":[]}' + else + matrix=$(printf '%s\n' "${demos[@]}" | sed 's/.*/"&"/' | paste -sd, -) + echo "{\"demo\":[$matrix]}" + fi fi From cf45cc760a8b7ef807f65b5fb7ae28459a4b2966 Mon Sep 17 00:00:00 2001 From: Dionysis Lorentzos Date: Fri, 6 Feb 2026 12:22:02 +0100 Subject: [PATCH 09/20] Sanity check --- .github/workflows/main-checks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main-checks.yml b/.github/workflows/main-checks.yml index 0dfa08d6c1f..eb4173f5bc1 100644 --- a/.github/workflows/main-checks.yml +++ b/.github/workflows/main-checks.yml @@ -5,6 +5,7 @@ on: push: branches: - master + - cluster-workflows # temporary, for testing master flow on the branch concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 772d3d4a67313d0a299ba0f1b3a0f02d7d1f28d9 Mon Sep 17 00:00:00 2001 From: Dionysis Lorentzos Date: Fri, 6 Feb 2026 12:28:34 +0100 Subject: [PATCH 10/20] EOL --- .github/workflows/reusable/spell-checker.yml | 2 +- .github/workflows/reusable/url-checker.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable/spell-checker.yml b/.github/workflows/reusable/spell-checker.yml index daf215826e9..f33360ca4fb 100644 --- a/.github/workflows/reusable/spell-checker.yml +++ b/.github/workflows/reusable/spell-checker.yml @@ -41,4 +41,4 @@ jobs: uses: codespell-project/actions-codespell@master with: skip: "*.json,*.yml,*.apk,*.ipa,*.svg,*.txt,*.kt,*.swift,*.xml,*.java" - ignore_words_list: "aas,aaS,ba,bund,compliancy,firt,ist,keypair,ligh,Manuel,Manual,ro,ser,synopsys,theses,zuser,lief,EDE" \ No newline at end of file + ignore_words_list: "aas,aaS,ba,bund,compliancy,firt,ist,keypair,ligh,Manuel,Manual,ro,ser,synopsys,theses,zuser,lief,EDE" diff --git a/.github/workflows/reusable/url-checker.yml b/.github/workflows/reusable/url-checker.yml index 2aa6ac2e5fb..b927eec49a8 100644 --- a/.github/workflows/reusable/url-checker.yml +++ b/.github/workflows/reusable/url-checker.yml @@ -21,4 +21,4 @@ jobs: with: use-quiet-mode: 'yes' config-file: '.github/workflows/config/url-checker-config.json' - check-modified-files-only: ${{ inputs.check_modified_files_only && 'yes' || 'no' }} \ No newline at end of file + check-modified-files-only: ${{ inputs.check_modified_files_only && 'yes' || 'no' }} From ee79f264aabc86f80697431efcc2248eebd85e6e Mon Sep 17 00:00:00 2001 From: Dionysis Lorentzos Date: Fri, 6 Feb 2026 12:31:20 +0100 Subject: [PATCH 11/20] Check filenames also on master --- .github/workflows/reusable/spell-checker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reusable/spell-checker.yml b/.github/workflows/reusable/spell-checker.yml index f33360ca4fb..41bc61731fe 100644 --- a/.github/workflows/reusable/spell-checker.yml +++ b/.github/workflows/reusable/spell-checker.yml @@ -40,5 +40,6 @@ jobs: if: ${{ !inputs.check_modified_files_only }} uses: codespell-project/actions-codespell@master with: + check_filenames: true skip: "*.json,*.yml,*.apk,*.ipa,*.svg,*.txt,*.kt,*.swift,*.xml,*.java" ignore_words_list: "aas,aaS,ba,bund,compliancy,firt,ist,keypair,ligh,Manuel,Manual,ro,ser,synopsys,theses,zuser,lief,EDE" From ec36c5716c1792cdb634acd103d29c6788bf7ca4 Mon Sep 17 00:00:00 2001 From: Dionysis Lorentzos Date: Fri, 6 Feb 2026 12:36:35 +0100 Subject: [PATCH 12/20] Make all reusable workflows first level --- .github/workflows/check-duplicate-ids.yml | 141 ++++++++++++++++- .github/workflows/main-checks.yml | 6 +- .github/workflows/pr-checks.yml | 8 +- ...inter.yml => reusable-markdown-linter.yml} | 0 ...checker.yml => reusable-spell-checker.yml} | 0 ...l-checker.yml => reusable-url-checker.yml} | 0 ...yml => reusable-website-build-checker.yml} | 0 .../reusable/duplicate-ids-checker.yml | 145 ------------------ 8 files changed, 145 insertions(+), 155 deletions(-) rename .github/workflows/{reusable/markdown-linter.yml => reusable-markdown-linter.yml} (100%) rename .github/workflows/{reusable/spell-checker.yml => reusable-spell-checker.yml} (100%) rename .github/workflows/{reusable/url-checker.yml => reusable-url-checker.yml} (100%) rename .github/workflows/{reusable/website-build-checker.yml => reusable-website-build-checker.yml} (100%) delete mode 100644 .github/workflows/reusable/duplicate-ids-checker.yml diff --git a/.github/workflows/check-duplicate-ids.yml b/.github/workflows/check-duplicate-ids.yml index 2dd41087259..56b6cb68987 100644 --- a/.github/workflows/check-duplicate-ids.yml +++ b/.github/workflows/check-duplicate-ids.yml @@ -12,6 +12,141 @@ on: jobs: check-duplicates: - name: Duplicate IDs Check - uses: ./.github/workflows/reusable/duplicate-ids-checker.yml - secrets: inherit + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Get new files in PR + id: get-new-files + run: | + # Get the base branch ref from the PR event + BASE_REF="${{ github.event.pull_request.base.ref }}" + echo "Base branch is: $BASE_REF" + + # Fetch the base branch to ensure it's available locally + git fetch origin $BASE_REF + + # Create a file with the list of new files in this PR + git diff --name-status --diff-filter=A origin/$BASE_REF..HEAD | grep -E "^A\s+(apps/|best-practices/|demos/|tests-beta/|tools/|techniques/)" | cut -f2 > new_files_in_pr.txt || echo "No new files matching the pattern" + + echo "New files in PR:" + cat new_files_in_pr.txt + + # Ensure the file exists even if empty + touch new_files_in_pr.txt + + - name: Check for duplicate file IDs + id: check-duplicates + run: | + python .github/scripts/check_duplicate_ids.py + + - name: Delete previous comments and comment on PR if duplicates found + if: always() + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const fs = require('fs'); + + // Helper function to format a notification message + const formatDuplicateMessage = (duplicate, isReviewComment = true) => { + // Extract the ID prefix for a more specific message + let idType = duplicate.file_id.split('-').slice(0, 2).join('-'); + + // Choose the appropriate header style based on comment type + const headerPrefix = isReviewComment ? '###' : '##'; + + return ` + ${headerPrefix} ⚠️ Duplicate \`${idType}\` ID Detected + + ${isReviewComment ? 'This file' : `File \`${duplicate.file_path}\``} has the ID \`${duplicate.file_id}\` which already exists in \`${duplicate.existing_path}\`. + + **IMPORTANT:** Please use the next available ID: \`${duplicate.suggested_id}\` + `; + }; + + // Step 1: Try to clean up existing comments + try { + const comments = await github.rest.pulls.listReviewComments({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number + }); + + // Filter for comments from this action + const ourComments = comments.data.filter(comment => + comment.body.includes('⚠️ Duplicate') && + comment.body.includes('ID Detected') + ); + + console.log(`Found ${ourComments.length} previous comments from this action.`); + + // Delete the comments + for (const comment of ourComments) { + try { + await github.rest.pulls.deleteReviewComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: comment.id + }); + console.log(`Deleted comment ID ${comment.id}`); + } catch (error) { + console.log(`Error deleting comment ID ${comment.id}: ${error.message}`); + } + } + } catch (error) { + console.log(`Error handling existing comments: ${error.message}`); + // Continue with the workflow regardless of errors with existing comments + } + + // Step 2: Check if we need to post new notifications + const hasDuplicatesOutput = '${{ steps.check-duplicates.outputs.has_duplicates }}'; + + if (hasDuplicatesOutput !== 'true' || !fs.existsSync('duplicate_files.json')) { + console.log('No duplicates to report.'); + return; + } + + // Step 3: Post notifications for each duplicate + const duplicatesData = JSON.parse(fs.readFileSync('duplicate_files.json', 'utf8')); + + for (const duplicate of duplicatesData) { + // First try posting a review comment (preferred method) + try { + await github.rest.pulls.createReviewComment({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number, + commit_id: context.payload.pull_request.head.sha, + path: duplicate.file_path, + body: formatDuplicateMessage(duplicate, true), + line: 1, + side: 'RIGHT' + }); + console.log(`Successfully posted review comment for ${duplicate.file_path}`); + } catch (error) { + console.log(`Error posting review comment: ${error.message}`); + + // Fallback: post a comment on the PR thread instead of as a review comment + try { + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: formatDuplicateMessage(duplicate, false) + }); + console.log(`Posted fallback PR thread comment for ${duplicate.file_path}`); + } catch (fallbackError) { + console.log(`Error posting fallback PR thread comment: ${fallbackError.message}`); + } + } + } diff --git a/.github/workflows/main-checks.yml b/.github/workflows/main-checks.yml index eb4173f5bc1..67005e57022 100644 --- a/.github/workflows/main-checks.yml +++ b/.github/workflows/main-checks.yml @@ -14,15 +14,15 @@ concurrency: jobs: spell-check: name: Spell Check (Full) - uses: ./.github/workflows/reusable/spell-checker.yml + uses: ./.github/workflows/reusable-spell-checker.yml secrets: inherit url-check: name: URL Check (Full) - uses: ./.github/workflows/reusable/url-checker.yml + uses: ./.github/workflows/reusable-url-checker.yml secrets: inherit markdown-lint: name: Markdown Lint - uses: ./.github/workflows/reusable/markdown-linter.yml + uses: ./.github/workflows/reusable-markdown-linter.yml secrets: inherit diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 6ff6a1897e6..3f934c3ef8f 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -10,7 +10,7 @@ concurrency: jobs: spell-check: name: Spell Check (Changed Files) - uses: ./.github/workflows/reusable/spell-checker.yml + uses: ./.github/workflows/reusable-spell-checker.yml secrets: inherit with: check_modified_files_only: true @@ -18,19 +18,19 @@ jobs: url-check: name: URL Check (Changed Files) - uses: ./.github/workflows/reusable/url-checker.yml + uses: ./.github/workflows/reusable-url-checker.yml secrets: inherit with: check_modified_files_only: true markdown-lint: name: Markdown Lint - uses: ./.github/workflows/reusable/markdown-linter.yml + uses: ./.github/workflows/reusable-markdown-linter.yml secrets: inherit website-build: name: Website Build Check - uses: ./.github/workflows/reusable/website-build-checker.yml + uses: ./.github/workflows/reusable-website-build-checker.yml secrets: inherit with: pr_number: ${{ github.event.pull_request.number }} diff --git a/.github/workflows/reusable/markdown-linter.yml b/.github/workflows/reusable-markdown-linter.yml similarity index 100% rename from .github/workflows/reusable/markdown-linter.yml rename to .github/workflows/reusable-markdown-linter.yml diff --git a/.github/workflows/reusable/spell-checker.yml b/.github/workflows/reusable-spell-checker.yml similarity index 100% rename from .github/workflows/reusable/spell-checker.yml rename to .github/workflows/reusable-spell-checker.yml diff --git a/.github/workflows/reusable/url-checker.yml b/.github/workflows/reusable-url-checker.yml similarity index 100% rename from .github/workflows/reusable/url-checker.yml rename to .github/workflows/reusable-url-checker.yml diff --git a/.github/workflows/reusable/website-build-checker.yml b/.github/workflows/reusable-website-build-checker.yml similarity index 100% rename from .github/workflows/reusable/website-build-checker.yml rename to .github/workflows/reusable-website-build-checker.yml diff --git a/.github/workflows/reusable/duplicate-ids-checker.yml b/.github/workflows/reusable/duplicate-ids-checker.yml deleted file mode 100644 index 39658fbbd60..00000000000 --- a/.github/workflows/reusable/duplicate-ids-checker.yml +++ /dev/null @@ -1,145 +0,0 @@ -name: Duplicate IDs Checker (Reusable) - -on: - workflow_call: - -jobs: - check-duplicates: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - - name: Get new files in PR - id: get-new-files - run: | - # Get the base branch ref from the PR event - BASE_REF="${{ github.event.pull_request.base.ref }}" - echo "Base branch is: $BASE_REF" - - # Fetch the base branch to ensure it's available locally - git fetch origin $BASE_REF - - # Create a file with the list of new files in this PR - git diff --name-status --diff-filter=A origin/$BASE_REF..HEAD | grep -E "^A\s+(apps/|best-practices/|demos/|tests-beta/|tools/|techniques/)" | cut -f2 > new_files_in_pr.txt || echo "No new files matching the pattern" - - echo "New files in PR:" - cat new_files_in_pr.txt - - # Ensure the file exists even if empty - touch new_files_in_pr.txt - - - name: Check for duplicate file IDs - id: check-duplicates - run: | - python .github/scripts/check_duplicate_ids.py - - - name: Delete previous comments and comment on PR if duplicates found - if: always() - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const fs = require('fs'); - - // Helper function to format a notification message - const formatDuplicateMessage = (duplicate, isReviewComment = true) => { - // Extract the ID prefix for a more specific message - let idType = duplicate.file_id.split('-').slice(0, 2).join('-'); - - // Choose the appropriate header style based on comment type - const headerPrefix = isReviewComment ? '###' : '##'; - - return ` - ${headerPrefix} ⚠️ Duplicate \`${idType}\` ID Detected - - ${isReviewComment ? 'This file' : `File \`${duplicate.file_path}\``} has the ID \`${duplicate.file_id}\` which already exists in \`${duplicate.existing_path}\`. - - **IMPORTANT:** Please use the next available ID: \`${duplicate.suggested_id}\` - `; - }; - - // Step 1: Try to clean up existing comments - try { - const comments = await github.rest.pulls.listReviewComments({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.issue.number - }); - - // Filter for comments from this action - const ourComments = comments.data.filter(comment => - comment.body.includes('⚠️ Duplicate') && - comment.body.includes('ID Detected') - ); - - console.log(`Found ${ourComments.length} previous comments from this action.`); - - // Delete the comments - for (const comment of ourComments) { - try { - await github.rest.pulls.deleteReviewComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: comment.id - }); - console.log(`Deleted comment ID ${comment.id}`); - } catch (error) { - console.log(`Error deleting comment ID ${comment.id}: ${error.message}`); - } - } - } catch (error) { - console.log(`Error handling existing comments: ${error.message}`); - // Continue with the workflow regardless of errors with existing comments - } - - // Step 2: Check if we need to post new notifications - const hasDuplicatesOutput = '${{ steps.check-duplicates.outputs.has_duplicates }}'; - - if (hasDuplicatesOutput !== 'true' || !fs.existsSync('duplicate_files.json')) { - console.log('No duplicates to report.'); - return; - } - - // Step 3: Post notifications for each duplicate - const duplicatesData = JSON.parse(fs.readFileSync('duplicate_files.json', 'utf8')); - - for (const duplicate of duplicatesData) { - // First try posting a review comment (preferred method) - try { - await github.rest.pulls.createReviewComment({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.issue.number, - commit_id: context.payload.pull_request.head.sha, - path: duplicate.file_path, - body: formatDuplicateMessage(duplicate, true), - line: 1, - side: 'RIGHT' - }); - console.log(`Successfully posted review comment for ${duplicate.file_path}`); - } catch (error) { - console.log(`Error posting review comment: ${error.message}`); - - // Fallback: post a comment on the PR thread instead of as a review comment - try { - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - body: formatDuplicateMessage(duplicate, false) - }); - console.log(`Posted fallback PR thread comment for ${duplicate.file_path}`); - } catch (fallbackError) { - console.log(`Error posting fallback PR thread comment: ${fallbackError.message}`); - } - } - } From a8a41252be3640d9b2b1dcf5b5118de99f51d789 Mon Sep 17 00:00:00 2001 From: Dionysis Lorentzos Date: Fri, 6 Feb 2026 12:43:46 +0100 Subject: [PATCH 13/20] Workflow got updated but no tests were touched, so it fails --- .github/workflows/build-android-demos.yml | 1 - .github/workflows/build-ios-demos.yml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-android-demos.yml b/.github/workflows/build-android-demos.yml index 8fa296e33fa..5c114d31006 100644 --- a/.github/workflows/build-android-demos.yml +++ b/.github/workflows/build-android-demos.yml @@ -12,7 +12,6 @@ on: - master paths: - 'demos/**' - - '.github/workflows/build-android-demos.yml' jobs: generate-matrix: diff --git a/.github/workflows/build-ios-demos.yml b/.github/workflows/build-ios-demos.yml index f9f488ab180..112a14c7411 100644 --- a/.github/workflows/build-ios-demos.yml +++ b/.github/workflows/build-ios-demos.yml @@ -12,7 +12,7 @@ on: - master paths: - 'demos/**' - - '.github/workflows/build-ios-demos.yml' + jobs: generate-matrix: runs-on: ubuntu-latest From d27562b2d487ba8393dc8b2d8c6fcea34c42ba63 Mon Sep 17 00:00:00 2001 From: Dionysis Lorentzos Date: Fri, 6 Feb 2026 13:40:29 +0100 Subject: [PATCH 14/20] Update demo branch --- .github/workflows/main-checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main-checks.yml b/.github/workflows/main-checks.yml index 67005e57022..bb9b630e906 100644 --- a/.github/workflows/main-checks.yml +++ b/.github/workflows/main-checks.yml @@ -5,7 +5,7 @@ on: push: branches: - master - - cluster-workflows # temporary, for testing master flow on the branch + - Diolor:cluster-workflows # temporary, for testing master flow on the branch concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 83a235087a9567fa561ad1499f54d20acd5a6f04 Mon Sep 17 00:00:00 2001 From: Dionysis Lorentzos Date: Fri, 6 Feb 2026 13:41:18 +0100 Subject: [PATCH 15/20] Update demo branch --- .github/workflows/main-checks.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main-checks.yml b/.github/workflows/main-checks.yml index bb9b630e906..d47000cc0a6 100644 --- a/.github/workflows/main-checks.yml +++ b/.github/workflows/main-checks.yml @@ -5,7 +5,6 @@ on: push: branches: - master - - Diolor:cluster-workflows # temporary, for testing master flow on the branch concurrency: group: ${{ github.workflow }}-${{ github.ref }} From ae238d47f66a9f3ef3b1e3e320dba67a3e7799db Mon Sep 17 00:00:00 2001 From: Dionysis Lorentzos Date: Fri, 6 Feb 2026 13:43:43 +0100 Subject: [PATCH 16/20] Fix workflow source override --- .github/workflows/reusable-website-build-checker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-website-build-checker.yml b/.github/workflows/reusable-website-build-checker.yml index d4493a737f3..7adb0b05b55 100644 --- a/.github/workflows/reusable-website-build-checker.yml +++ b/.github/workflows/reusable-website-build-checker.yml @@ -13,4 +13,4 @@ jobs: uses: OWASP/mas-website/.github/workflows/build-website-reusable.yml@main with: deploy: false - sources_override_json: ${{ format('{"OWASP/mastg":"refs/pull/{0}/head"}', inputs.pr_number) }} + sources_override_json: ${{ format('{{"OWASP/mastg":"refs/pull/{0}/head"}}', inputs.pr_number) }} From 81dc263b0dd0d260034327477479ae59b6bb30d7 Mon Sep 17 00:00:00 2001 From: Dionysis Lorentzos Date: Thu, 12 Feb 2026 12:49:49 +0100 Subject: [PATCH 17/20] Test workflow --- .github/workflows/main-checks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main-checks.yml b/.github/workflows/main-checks.yml index d47000cc0a6..a4ab93b904a 100644 --- a/.github/workflows/main-checks.yml +++ b/.github/workflows/main-checks.yml @@ -5,6 +5,7 @@ on: push: branches: - master + - cluster-workflows concurrency: group: ${{ github.workflow }}-${{ github.ref }} From f6e828dbdb473f1e220db877f21e91517eea57ec Mon Sep 17 00:00:00 2001 From: Dionysis Lorentzos Date: Thu, 12 Feb 2026 13:11:11 +0100 Subject: [PATCH 18/20] Split workflows in order to support standalone badges --- .github/workflows/main-markdown-lint.yml | 18 ++++++++++++++++++ .../{main-checks.yml => main-spell-check.yml} | 12 +----------- .github/workflows/main-url-check.yml | 18 ++++++++++++++++++ 3 files changed, 37 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/main-markdown-lint.yml rename .github/workflows/{main-checks.yml => main-spell-check.yml} (53%) create mode 100644 .github/workflows/main-url-check.yml diff --git a/.github/workflows/main-markdown-lint.yml b/.github/workflows/main-markdown-lint.yml new file mode 100644 index 00000000000..2bcc8432b75 --- /dev/null +++ b/.github/workflows/main-markdown-lint.yml @@ -0,0 +1,18 @@ +name: Markdown Lint + +on: + workflow_dispatch: + push: + branches: + - master + - cluster-workflows + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + markdown-lint: + name: Markdown Lint + uses: ./.github/workflows/reusable-markdown-linter.yml + secrets: inherit diff --git a/.github/workflows/main-checks.yml b/.github/workflows/main-spell-check.yml similarity index 53% rename from .github/workflows/main-checks.yml rename to .github/workflows/main-spell-check.yml index a4ab93b904a..4dcc2e1f910 100644 --- a/.github/workflows/main-checks.yml +++ b/.github/workflows/main-spell-check.yml @@ -1,4 +1,4 @@ -name: Main Branch Checks +name: Spell Check on: workflow_dispatch: @@ -16,13 +16,3 @@ jobs: name: Spell Check (Full) uses: ./.github/workflows/reusable-spell-checker.yml secrets: inherit - - url-check: - name: URL Check (Full) - uses: ./.github/workflows/reusable-url-checker.yml - secrets: inherit - - markdown-lint: - name: Markdown Lint - uses: ./.github/workflows/reusable-markdown-linter.yml - secrets: inherit diff --git a/.github/workflows/main-url-check.yml b/.github/workflows/main-url-check.yml new file mode 100644 index 00000000000..af098689f21 --- /dev/null +++ b/.github/workflows/main-url-check.yml @@ -0,0 +1,18 @@ +name: URL Check + +on: + workflow_dispatch: + push: + branches: + - master + - cluster-workflows + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + url-check: + name: URL Check (Full) + uses: ./.github/workflows/reusable-url-checker.yml + secrets: inherit From 18aed67c0c0af6fe05b402ccc4d8711e8da87c39 Mon Sep 17 00:00:00 2001 From: Dionysis Lorentzos Date: Thu, 12 Feb 2026 13:13:02 +0100 Subject: [PATCH 19/20] Update badges --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8cdd1eb23db..8d7dbda9e1f 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ [![OWASP Flagship](https://img.shields.io/badge/owasp-flagship%20project-48A646.svg)](https://owasp.org/projects/) [![Creative Commons License](https://img.shields.io/github/license/OWASP/mastg)](https://creativecommons.org/licenses/by-sa/4.0/ "CC BY-SA 4.0") -[![Markdown Linter](https://github.com/OWASP/mastg/actions/workflows/markdown-linter.yml/badge.svg?branch=master)](https://github.com/OWASP/mastg/actions/workflows/markdown-linter.yml) -[![URL Checker](https://github.com/OWASP/mastg/actions/workflows/url-checker.yml/badge.svg?branch=master)](https://github.com/OWASP/mastg/actions/workflows/url-checker.yml) +[![Markdown Lint](https://github.com/OWASP/mastg/actions/workflows/main-markdown-lint.yml/badge.svg?branch=master)](https://github.com/OWASP/mastg/actions/workflows/main-markdown-lint.yml) +[![URL Check](https://github.com/OWASP/mastg/actions/workflows/main-url-check.yml/badge.svg?branch=master)](https://github.com/OWASP/mastg/actions/workflows/main-url-check.yml) The **OWASP Mobile Application Security Testing Guide (MASTG)** is a comprehensive manual for mobile app security testing and reverse engineering. It describes technical processes for verifying the [OWASP Mobile Security Weakness Enumeration (MASWE)](https://github.com/OWASP/maswe "MASWE") weaknesses, which are in alignment with the controls listed in the [OWASP Mobile Application Verification Standard (MASVS)](https://github.com/OWASP/masvs "MASVS"). From ebf526c11b96d86c8c3b4bd7f80ddfb702521a46 Mon Sep 17 00:00:00 2001 From: Dionysis Lorentzos Date: Thu, 12 Feb 2026 13:13:27 +0100 Subject: [PATCH 20/20] Remove test branches --- .github/workflows/main-markdown-lint.yml | 1 - .github/workflows/main-spell-check.yml | 1 - .github/workflows/main-url-check.yml | 1 - 3 files changed, 3 deletions(-) diff --git a/.github/workflows/main-markdown-lint.yml b/.github/workflows/main-markdown-lint.yml index 2bcc8432b75..ddc2e100294 100644 --- a/.github/workflows/main-markdown-lint.yml +++ b/.github/workflows/main-markdown-lint.yml @@ -5,7 +5,6 @@ on: push: branches: - master - - cluster-workflows concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/main-spell-check.yml b/.github/workflows/main-spell-check.yml index 4dcc2e1f910..1a176107643 100644 --- a/.github/workflows/main-spell-check.yml +++ b/.github/workflows/main-spell-check.yml @@ -5,7 +5,6 @@ on: push: branches: - master - - cluster-workflows concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/main-url-check.yml b/.github/workflows/main-url-check.yml index af098689f21..82ef80e36ec 100644 --- a/.github/workflows/main-url-check.yml +++ b/.github/workflows/main-url-check.yml @@ -5,7 +5,6 @@ on: push: branches: - master - - cluster-workflows concurrency: group: ${{ github.workflow }}-${{ github.ref }}