Skip to content

Bump github/codeql-action from 3.26.7 to 3.26.12 #454

Bump github/codeql-action from 3.26.7 to 3.26.12

Bump github/codeql-action from 3.26.7 to 3.26.12 #454

Workflow file for this run

name: ci
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
needs: dependency-scan
timeout-minutes: 25
strategy:
fail-fast: true
max-parallel: 4
permissions:
contents: 'read'
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v1
with:
egress-policy: block
disable-telemetry: true
allowed-endpoints: >
api.github.com:443
dl.google.com:443
files.pythonhosted.org:443
github.com:443
oauth2.googleapis.com:443
objects.githubusercontent.com:443
pypi.org:443
github.com:443
storage.googleapis.com:443
y2oiacprodeus2file6.blob.core.windows.net:443 # cache builds
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- uses: psf/black@b965c2a5026f8ba399283ba3e01898b012853c79 # stable
dependency-scan:
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
contents: read # for actions/checkout to fetch code
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7
with:
egress-policy: block
allowed-endpoints: >
api.github.com:443
ghcr.io:443
github.com:443
pkg-containers.githubusercontent.com:443
- name: Checkout the code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v2
with:
fetch-depth: 0
persist-credentials: false
- name: Run vulnerability scanner in repo mode
if: github.actor != 'dependabot[bot]'
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # 0.2.2
with:
scan-type: 'fs'
format: 'sarif'
vuln-type: 'library'
severity: 'HIGH,CRITICAL'
security-checks: 'vuln,config,secret'
output: 'trivy-results.sarif'
- name: Run vulnerability scanner in repo mode
if: github.actor == 'dependabot[bot]'
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # 0.2.2
with:
scan-type: 'fs'
exit-code: 1
format: 'sarif'
vuln-type: 'library'
severity: 'MEDIUM,HIGH,CRITICAL'
security-checks: 'vuln,config,secret'
output: 'trivy-results.sarif'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v1
if: always()
with:
sarif_file: 'trivy-results.sarif'
semgrep:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: write # for semgrep to add comments in pull request
name: semgrep-scan
runs-on: ubuntu-latest
needs: dependency-scan
container:
image: returntocorp/semgrep
if: github.actor != 'dependabot[bot]'
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Checkout the code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v3.0.2
with:
fetch-depth: 0
- run: semgrep ci || true
env:
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
analyze:
name: Analyze
runs-on: ubuntu-latest
needs: dependency-scan
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'python' ]
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v2.2.11
with:
languages: ${{ matrix.language }}
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v2.2.11
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v2.2.11
with:
category: "/language:${{matrix.language}}"