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
+36
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,42 @@ jobs:
74
74
args: ./...
75
75
```
76
76
77
+
### Integrating with code scanning
78
+
79
+
You can [integrate third-party code analysis tools](https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/integrating-with-code-scanning) with GitHub code scanning by uploading data as SARIF files.
80
+
81
+
The workflow shows an example of running the `gosec` as a step in a GitHub action workflow which outputs the `results.sarif` file. The workflow then uploads the `results.sarif` file to GitHub using the `upload-sarif` action.
82
+
83
+
```yaml
84
+
name: "Security Scan"
85
+
86
+
# Run workflow each time code is pushed to your repository and on a schedule.
87
+
# The scheduled workflow runs every at 00:00 on Sunday UTC time.
88
+
on:
89
+
push:
90
+
schedule:
91
+
- cron: '0 0 * * 0'
92
+
93
+
jobs:
94
+
tests:
95
+
runs-on: ubuntu-latest
96
+
env:
97
+
GO111MODULE: on
98
+
steps:
99
+
- name: Checkout Source
100
+
uses: actions/checkout@v2
101
+
- name: Run Gosec Security Scanner
102
+
uses: securego/gosec@master
103
+
with:
104
+
# we let the report trigger content trigger a failure using the GitHub Security features.
0 commit comments