ci: update

This commit is contained in:
silas 2023-11-18 20:10:09 +00:00 committed by GitHub
parent d0b4edce1a
commit dcd6187641
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 50 deletions

34
.github/workflows/code-review.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: 'Code Review'
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
sast:
name: Security Scan
runs-on: ubuntu-latest
if: (github.actor != 'dependabot[bot]')
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'python', 'javascript' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialise CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Run CodeQL
uses: github/codeql-action/analyze@v2

View File

@ -1,50 +0,0 @@
# GitHub SAST (static application security testing) tool that scans code for security bugs and unsafe coding practices
name: "CodeQL Scan"
# Events that triggers CodeQL to run
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Option to configure as a scheduled action to monitor for drift in code
# schedule:
# - cron: '0 6 * * 1'
jobs:
analyze:
name: CodeQL Analysis
runs-on: ubuntu-latest
# Skip any PR created by dependabot to avoid permission issues (if used)
if: (github.actor != 'dependabot[bot]')
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
# Add more languages if relevnt to the project
language: [ 'python', 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initialises the CodeQL tools for scanning (sorry Americans)
- name: Initialise CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Run the analysis and upload results to the security tab
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1