Common Deployment Scenarios
Scenario 1 - Uploading a Fortify FPR with embedded source code
If you have a fortify FPR report with source code embedded, you can run an analysis through Bugsy without needing to connect to your repository. In this case, simply use the analyze mode and use -p (--src-path) and point it at the FPR file.
For example, let's say we have a file called fortify.fpr that contains both the SAST report + Source code:
npx @mobb.ai/cli@latest analyze -f .\fortify.fpr -p .\fortify.fpr -r https://my_repo_url --api-key xxxxxxxExplanation:
-f .\fortify.fprspecifies the location of the SAST report-p .\fortify.fprspecifies the location of the source code (in this case embedded in the FPR file)-r https://my_repo_urlspecifies the location of the actual repository. We encourage that this field is specified correctly, as it tells Mobb where the fix commits should go to.--api-key xxxxxxxspecify your API key here
Scenario 2 - Automatically create pull requests for trusted fixes
If you want Mobb to automatically generate pull requests for trusted fixes, you must first enable it under your Project Settings --> Fix Policy as shown here.
npx @mobb.ai/cli@latest analyze -f sast_results.json -r https://github.com/mobb-dev/simple-vulnerable-java-project --ref dev --auto-pr --ci --api-key xxxxxxxExplanation:
--auto-prwill tell Mobb to respect the fix policy as defined in the project settings and generate a pull request for the issue types where automatic PR is enabled in the fix policy.--api-keyis required whenever--ciis used.
Scenario 3 - Automatically commit fixes to a target branch
If you want to enable automatic commit for trusted fixes, you must first enable it under your Project Settings --> Fix Policy, as shown here.
This scenario is typically reserved for directly committing the fixes to a development branch.
Explanation:
--auto-prwill tell Mobb to respect the fix policy as defined in the project settings--commit-directlywill tell Mobb that instead of generating a Pull Request, generate a commit on the branch specified by--ref dev. Note that--commit-directlyrequires--auto-pr.
Scenario 4 - Handling Large FPR Files (50k+ Issues)
When dealing with very large Fortify FPR files (containing 50,000+ issues or exceeding 10GB in internal compressed XML size), you'll need to convert the FPR to SARIF format and compress it before uploading. This approach is necessary because:
File size limitations: Direct FPR uploads are blocked when the internal compressed XML exceeds 10GB
Network efficiency: ZIP compression reduces upload time for slower connections
Step-by-step process:
Step 1: Convert the FPR file to SARIF format
Step 2: Compress the SARIF file into a ZIP archive
Step 3: Upload the compressed SARIF file for analysis
Explanation:
convert-to-sarifconverts the large FPR file to SARIF format, which is more efficient for Mobb's backend processingtar -a -c -fcreates a compressed ZIP archive containing the SARIF fileThe final
npx @mobb.ai/cli@latest analyzecommand processes the compressed SARIF file like any other scan report
Scenario 5 - Gating a pull request build on the Scan & Gate Policy
If you want a pipeline to fail when a pull request introduces a finding that your organization's Scan & Gate Policy blocks on, combine Mobb's native scan with --baseline-commit and --gate:
Explanation:
--baseline-commit <base-sha>restricts the scan to findings introduced by the PR, so pre-existing issues on the base branch cannot fail the build--gatemakes the CLI exit2when the policy blocks,0when it passes, and1on an operational error (including a scan that failed to finish)No
-f/--scan-fileis used —--gateenforces the policy on Mobb's own scan and is rejected when combined with a third-party report
See Scan and Fix Mode for the full exit-code table.
Scenario 6 - CI runners without a suitable Node.js version
@mobb.ai/cli ships a standalone binary with its runtime embedded, so the CLI itself does not need a Node.js install. This is the main practical reason to prefer it over npx mobbdev@latest in a pipeline.
Explanation:
The CLI's own runtime requirement goes away entirely — the binary carries it
npxis still npm tooling and needs Node.js >= 14 to run; that is the only remaining Node.js dependencyAfter the first run the platform binary is cached, so later pipeline steps do not re-download it
On a platform with no published binary (notably Windows on arm64), fall back to
npx mobbdev@latest— see supported platforms
Last updated