Skip to content

Commit

Permalink
First draft in adding codeQL analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrillay committed Jan 10, 2025
1 parent ee37cf1 commit f4c4694
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,32 @@ on:
- main

jobs:
analyze:
name: CodeQL Analysis
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: python
queries: security-and-quality

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:python"

build-and-push:
name: Build and push from ${{ github.ref_name }}/${{ github.sha }}
needs: analyze
runs-on: ubuntu-latest
env:
APP_IMAGE_NAME: ghcr.io/${{ github.repository }}/app
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/test_codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test CodeQL Analysis

on:
push:
branches:
- feat(ci-cd)/add-codeql-vulnerability-analysis-in-ci-cd

jobs:
analyze:
name: CodeQL Analysis
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: python
queries: security-and-quality

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:python"

0 comments on commit f4c4694

Please sign in to comment.