From 4005681070b51012c6ea9211967de4f249682ad4 Mon Sep 17 00:00:00 2001 From: Antony Chiu Date: Mon, 28 Jul 2025 14:52:39 -0600 Subject: [PATCH 1/5] Add organization-id input to action configuration --- README.md | 4 ++++ action.yml | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/README.md b/README.md index 49ca131..1f36e13 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,10 @@ This action posts the code and a SAST report to the Mobb vulnerability analysis **Optional** `true` or `false`. This requires `auto-pr` to be set to `true`. Once set, Fixes will be committed directly to the source branch. +## `organization-id` + +**Optional** The Organization ID to use with the Mobb platform. If not specified, the default organization will be used. + ## Outputs diff --git a/action.yml b/action.yml index 7780b6a..2a23d85 100644 --- a/action.yml +++ b/action.yml @@ -22,6 +22,9 @@ inputs: commit-directly: description: "Commit Directly flag, this requires Auto-PR flag to be set. Once enabled, Mobb will commit the fixes directly to the branch" required: false + organization-id: + description: "Organization ID" + required: false outputs: fix-report-url: @@ -47,6 +50,12 @@ runs: MobbExecString+=" --mobb-project-name \"${{ inputs.mobb-project-name }}\"" fi + # Check if organization-id exists and append it + if [ -n "${{ inputs.organization-id }}" ]; then + echo "organization-id specified: ${{ inputs.organization-id }}" + MobbExecString+=" --organization-id \"${{ inputs.organization-id }}\"" + fi + # Check if auto-pr flag is set append it if [ "${{ inputs.auto-pr }}" == "true" ]; then echo "Auto-PR flag is set" From 61f5ef2da51a6621262e2ab30997271977e0e152 Mon Sep 17 00:00:00 2001 From: Antony Chiu Date: Wed, 17 Sep 2025 09:52:35 -0600 Subject: [PATCH 2/5] Handle command execution failure gracefully in Mobb action --- review/action.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/review/action.yml b/review/action.yml index 036db78..a53dd98 100644 --- a/review/action.yml +++ b/review/action.yml @@ -70,12 +70,7 @@ runs: # Output the final command string for debugging echo "Mobb Command: $MobbExecString" - OUT=$(eval $MobbExecString) - - RETVAL=$? - if [ $RETVAL -ne 0 ]; then - exit $RETVAL - fi + OUT=$(eval $MobbExecString || true) OUT=$(echo $OUT | tr '\n' ' ') echo "fix-report-url=$OUT" >> $GITHUB_OUTPUT From f05b98416edacc841b64a658af4d7e785a692d42 Mon Sep 17 00:00:00 2001 From: Antony Chiu Date: Fri, 19 Sep 2025 09:21:58 -0600 Subject: [PATCH 3/5] Add conditional check for GitHub status action based on fix report URL --- review/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/review/action.yml b/review/action.yml index a53dd98..b369709 100644 --- a/review/action.yml +++ b/review/action.yml @@ -79,6 +79,7 @@ runs: shell: bash -l {0} - uses: Sibz/github-status-action@v1 + if: ${{ startsWith(steps.run-npx-mobb-dev.outputs.fix-report-url, 'https://') }} with: authToken: ${{ inputs.github-token }} context: "Mobb fix report link" From abb575048fae3cc80f73bdc9e674df35881f1639 Mon Sep 17 00:00:00 2001 From: Antony Chiu Date: Fri, 19 Sep 2025 09:31:31 -0600 Subject: [PATCH 4/5] changed if condiiton on mobb url publishing --- review/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/review/action.yml b/review/action.yml index b369709..c7675e5 100644 --- a/review/action.yml +++ b/review/action.yml @@ -79,7 +79,7 @@ runs: shell: bash -l {0} - uses: Sibz/github-status-action@v1 - if: ${{ startsWith(steps.run-npx-mobb-dev.outputs.fix-report-url, 'https://') }} + if: ${{ steps.run-npx-mobb-dev.outputs.fix-report-url != '' }} with: authToken: ${{ inputs.github-token }} context: "Mobb fix report link" From de226976862d913459eab352774845f1d0666158 Mon Sep 17 00:00:00 2001 From: Antony Chiu Date: Fri, 19 Sep 2025 09:31:54 -0600 Subject: [PATCH 5/5] revert --- review/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/review/action.yml b/review/action.yml index c7675e5..b369709 100644 --- a/review/action.yml +++ b/review/action.yml @@ -79,7 +79,7 @@ runs: shell: bash -l {0} - uses: Sibz/github-status-action@v1 - if: ${{ steps.run-npx-mobb-dev.outputs.fix-report-url != '' }} + if: ${{ startsWith(steps.run-npx-mobb-dev.outputs.fix-report-url, 'https://') }} with: authToken: ${{ inputs.github-token }} context: "Mobb fix report link"