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" diff --git a/review/action.yml b/review/action.yml index 036db78..b369709 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 @@ -84,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"