feat: support scan-and-fix mode and diff-aware scanning#37
Open
antonychiu2 wants to merge 3 commits into
Open
Conversation
Make report-file optional so users can run Mobb's native scan-and-fix mode (internal opengrep scan). Add a new diff-aware input that, when true on a pull_request event, passes the PR base SHA to the CLI as --baseline-commit for diff-aware scanning. README updated with a scan-and-fix example workflow.
mobbjon
approved these changes
May 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
report-fileoptional. Omitting it enables Mobb's scan-and-fix mode: the Mobb CLI runs its own SAST scan (internal opengrep) instead of consuming an external SARIF/JSON report.diff-awareinput (defaultfalse). When set totrueand the workflow is triggered by apull_requestevent, the action passes--baseline-commit <pr.base.sha>tomobbdev analyze, enabling diff-aware scanning. Outside of PR context the flag is silently ignored.No changes to the existing fix-only flow — workflows that already pass
report-filekeep working unchanged.Test plan
report-fileset (existing fix-only path) and confirm-f <path>still appears in the logged Mobb command.report-fileand confirm the log says "Running in scan-and-fix mode" and no-fis appended.pull_requestworkflow withdiff-aware: trueand confirm--baseline-commit <sha>is appended usinggithub.event.pull_request.base.sha.push(non-PR) workflow withdiff-aware: trueand confirm the action logs the skip message and does not append--baseline-commit.