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: docs/code-scanning-tools/semgrep.md
+64-2Lines changed: 64 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,70 @@ Pixee can automatically triage and fix issues detected by [Semgrep](https://semg
9
9
10
10
# GitHub Advanced Security
11
11
12
-
No setup is required for GitHub Advanced Security (GHAS) users to receive fixes from Semgrep results that are uploaded as Code Scanning alerts.
12
+
No setup is required for GitHub Advanced Security (GHAS) users to receive fixes from Semgrep results that are uploaded as Code Scanning alerts. Simply installing the Pixeebot GitHub App is sufficient.
13
13
14
14
# Others
15
15
16
-
Use the [pixee/upload-tool-results-action](https://github.com/pixee/upload-tool-results-action) GitHub Action to synchronize Semgrep findings with Pixee.
16
+
Use the [pixee/upload-tool-results-action](https://github.com/pixee/upload-tool-results-action) GitHub Action together with the Pixeebot GitHub App to synchronize Semgrep findings with Pixee.
17
+
18
+
The following GitHub Action workflow example demonstrates how to include Semgrep vulnerability detection with Pixee fixes in a Java application:
19
+
20
+
```yaml
21
+
name: Analyze with Semgrep and Fix with Pixee
22
+
23
+
on:
24
+
push:
25
+
branches:
26
+
- main
27
+
pull_request:
28
+
branches:
29
+
- main
30
+
31
+
permissions:
32
+
contents: read
33
+
id-token: write
34
+
35
+
jobs:
36
+
build:
37
+
runs-on: ubuntu-latest
38
+
39
+
steps:
40
+
- name: Checkout repository
41
+
uses: actions/checkout@v4
42
+
43
+
- name: Set up JDK 17
44
+
uses: actions/setup-java@v4
45
+
with:
46
+
java-version: "17"
47
+
distribution: "temurin"
48
+
49
+
- name: Build with Maven
50
+
run: mvn --batch-mode verify
51
+
52
+
- name: Install Semgrep
53
+
run: |
54
+
python3 -m pip install semgrep
55
+
56
+
- name: Run Semgrep
57
+
run: |
58
+
semgrep --config auto --sarif --output webgoat-semgrep-results.sarif.json
59
+
60
+
- name: Fix with Pixee
61
+
uses: pixee/upload-tool-results-action@v2
62
+
with:
63
+
tool: semgrep
64
+
file: webgoat-semgrep-results.sarif.json
65
+
```
66
+
67
+
This workflow:
68
+
69
+
1. Builds the Java project using Maven, to give Semgrep more context to find vulnerabilities.
70
+
2. Runs semgrep OSS on the project and stores the results in a standard SARIF file.
71
+
3. Runs the pixee/upload-tool-results-action that sends the SARIF file to Pixee.
72
+
73
+
Once Pixee receives the Semgrep vulnerabilities, it recalls them on its next analysis of this commit.
74
+
75
+
- When this commit the head of a pull request, then Pixee triggers its _PR Hardening_ analysis to fix as many Semgrep findings in this PR as it can.
76
+
- When this commit is the head of the main branch, then Pixee uses these findings the next time its _Continuous Improvement Campaign_ analysis runs. Users may trigger such an analysis to occur immediately by issuing the chat command `@pixeebot next` in any PR or issue comment on this repository. Pixee's continuous improvement campaign shows the queue of fixes in Pixeebot Acitvity Dashboard issue.
Copy file name to clipboardExpand all lines: docs/installing.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,9 +19,11 @@ Also [contact us](https://pixee.ai/demo-landing-page) if you want to partner as
19
19
20
20
## Tool connections
21
21
22
-
Pixee fixes problems detected by [your existing code scanning tools and
23
-
services](/code-scanning-tools/overview). Therefore, you will need to connect
24
-
Pixee to your code scanning tools and services, before Pixee sends fixes.
22
+
Pixee fixes problems detected by [your existing code scanning tools and services](/code-scanning-tools/overview).
23
+
24
+
If you use GitHub Advanced Security, then installing the Pixeebot GitHub App is sufficient for connecting Pixee to your GHAS results.
25
+
26
+
Otherwise, you will need to connect Pixee to your code scanning tools and services, before Pixee can send fixes. If your repository does not use any code scanning tools and services, but you still want to try Pixee, see our guide for [adding Semgrep CLI and Pixee to your GitHub repository](./code-scanning-tools/semgrep.md).
0 commit comments