migrate to jspecify annotations (was checker framework) #3874
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
if: github.event.repository.fork == false | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Run Codacy Analysis | |
uses: codacy/codacy-analysis-cli-action@97bf5df3c09e75f5bcd72695998f96ebd701846e # v4.4.5 | |
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@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 | |
with: | |
files: results.sarif | |
- name: Remove duplicate runs | |
if: steps.check_files.outputs.files_exists == 'true' | |
run: jq -c '.runs |= unique_by({tool, invocations, results})' < results.sarif > codacy.sarif | |
- name: Upload result to GitHub Code Scanning | |
uses: github/codeql-action/upload-sarif@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5 | |
if: steps.check_files.outputs.files_exists == 'true' | |
continue-on-error: true | |
with: | |
sarif_file: codacy.sarif |