You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+63-8Lines changed: 63 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,25 +2,32 @@
2
2
3
3
## Overview
4
4
5
-
This action is used alongside the native CodeQL Code Scanning feature to monitor for the completion of a CodeQL scan within a Pull Request. Once the code scanning is complete, the analysis results (.sarif files) are downloaded and provided to Mobb to generate auto-remediation fixes.
5
+
This action is used alongside the native CodeQL Code Scanning feature to monitor for the completion of a CodeQL scan within a Pull Request or on commits. Once the code scanning is complete, the analysis results (.sarif files) are downloaded and provided to Mobb to generate auto-remediation fixes.
6
+
7
+
## Supported Triggers
8
+
9
+
This action supports two types of CodeQL scans:
10
+
11
+
1.**Pull Request Scans**: Triggered when CodeQL runs on pull requests
12
+
2.**Commit Scans**: Triggered when CodeQL runs on push events to branches
6
13
7
14
## Example usage
8
15
9
16
Create a file under the path `.github/workflow/mobb.yml`.
10
17
11
-
A sample content of the workflow file:
18
+
### For Pull Requests and Commits (Recommended)
12
19
13
20
```yaml
14
21
name: Mobb fix from CodeQL reports
15
22
on:
16
23
workflow_run:
17
-
workflows: ["CodeQL"] # This workflow is triggered when the name specified here is triggered. In CodeQL Default Code Scanning Setup, this name is "CodeQL", if you are using CodeQL Advanced Setup, you may need to change this if you have a different workflow name.
24
+
workflows: ["CodeQL"] # This workflow is triggered when the name specified here is triggered. In CodeQL Default Code Scanning Setup, this name is "CodeQL", if you are using CodeQL Advanced Setup, you may need to change this if you have a different workflow name.
**Optional** The Mobb Project Name. If unspecified, it will go to "My First Project".
51
86
87
+
## `organization-id`
88
+
89
+
**Optional** The Mobb Organization ID. If specified, the analysis will be associated with the specified organization.
90
+
52
91
## `github-token`
53
92
54
93
**Required** The GitHub api token to use with the action. Usually available as `${{ secrets.GITHUB_TOKEN }}`.
55
94
56
95
## Results
57
-
The fixes are presented in 2 formats:
58
-
1. **Selected fixes in the pull request comments** - The fixes presented here only contain a subset of all available fixes that are only relevant to the context of the current pull request based on what has been changed in the diff.
96
+
97
+
The fixes are presented differently depending on the trigger type:
98
+
99
+
### For Pull Requests
100
+
The fixes are presented in 2 formats:
101
+
1. **Selected fixes in the pull request comments** - The fixes presented here only contain a subset of all available fixes that are only relevant to the context of the current pull request based on what has been changed in the diff.
59
102
2. **Full fix report** - A full fix analysis report is available via the "Mobb Fix Report Link" in the status section. The fix report here contains all fixes relevant to the entire repository.
60
103
104
+
### For Commits
105
+
For commit-triggered scans, the full fix report URL is available in the action output. Since there's no pull request context, the fixes include all vulnerabilities found in the scanned commit.
106
+
107
+
## Behavior Differences
108
+
109
+
| Feature | Pull Request Scans | Commit Scans |
110
+
|---------|-------------------|--------------|
111
+
| PR Comments | ✅ Yes | ❌ No |
112
+
| Status Checks | ✅ Yes | ❌ No |
113
+
| Fix Report URL | ✅ Yes (in status + output) | ✅ Yes (in output only) |
0 commit comments