diff --git a/.github/workflows/check-actions.yaml b/.github/workflows/check-actions.yaml index cd4a19c..7468441 100644 --- a/.github/workflows/check-actions.yaml +++ b/.github/workflows/check-actions.yaml @@ -2,7 +2,7 @@ name: Check actions -permissions: {} +# permissions: {} on: pull_request: diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml new file mode 100644 index 0000000..b03f772 --- /dev/null +++ b/.github/workflows/codeql.yaml @@ -0,0 +1,44 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json + +name: CodeQL + +# permissions: {} + +on: + pull_request: + branches: + - main + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + required: + runs-on: ubuntu-latest + permissions: + security-events: write + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + fetch-depth: 0 + - name: Run Trivy vulnerability scanner in repo mode + uses: aquasecurity/trivy-action@d43c1f16c00cfd3978dde6c07f4bbcf9eb6993ca # v0.16.1 + with: + scan-type: fs + ignore-unfixed: false + format: sarif + output: trivy-results.sarif + severity: CRITICAL,HIGH,MEDIUM + scanners: vuln,secret + exit-code: '0' + vuln-type: os,library + - name: Upload Trivy scan results to GitHub Security tab + uses: github/codeql-action/upload-sarif@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.13.4 + with: + sarif_file: trivy-results.sarif + category: code \ No newline at end of file