-
Notifications
You must be signed in to change notification settings - Fork 1.6k
49 lines (48 loc) · 1.62 KB
/
codacy.yml
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
name: Codacy
permissions: read-all
on: [ push, pull_request ]
jobs:
security-scan:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.codacy.com:443
api.github.com:443
auth.docker.io:443
github.com:443
golang.org:443
objects.githubusercontent.com:443
production.cloudflare.docker.com:443
raw.githubusercontent.com:443
registry-1.docker.io:443
*.blob.core.windows.net:443
- name: Checkout code
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: Run Codacy Analysis
uses: codacy/codacy-analysis-cli-action@master
continue-on-error: true
with:
format: sarif
output: results.sarif
gh-code-scanning-compat: true
max-allowed-issues: 2147483647
- name: Check file existence
id: check_files
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2.0.0
with:
files: results.sarif
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.13.4
if: steps.check_files.outputs.files_exists == 'true'
with:
sarif_file: results.sarif