forked from bbstilson/sbt-codeartifact
-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (40 loc) · 1.39 KB
/
Copy pathcode-scanning.yml
File metadata and controls
50 lines (40 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: "Code Analysis"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '0 0 * * 1' # Runs every Monday at midnight, this is to ensure that there is at least 1 scan every 7 days.
workflow_dispatch:
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true
jobs:
scala-scan:
# User definable name of this GitHub Actions job.
name: Scala Security Audit
# If you are self-hosting, change the following `runs-on` value:
runs-on: ubuntu-latest
container:
# A Docker image with Semgrep installed. Do not change this.
image: semgrep/semgrep
# Skip any PR created by dependabot to avoid permission issues:
if: (github.actor != 'dependabot[bot]')
steps:
- uses: actions/checkout@v6
- name: Fetch forked ruleset
uses: actions/checkout@v4
with:
repository: 'Iterable/semgrep-rules'
path: .scala-security
sparse-checkout: 'scala'
token: ${{ secrets.GITHUB_TOKEN }}
# Run the "semgrep scan" command on the command line of the docker image.
- run: semgrep scan --config .scala-security/scala/ --sarif-output=semgrep.sarif
- name: Upload SARIF results to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v4
if: always()
with:
sarif_file: semgrep.sarif
category: semgrep