Skip to content

Commit

Permalink
Create custom.codeql.yml
Browse files Browse the repository at this point in the history
Signed-off-by: rajapandi1234 <[email protected]>
  • Loading branch information
rajapandi1234 authored Nov 27, 2024
1 parent a8d44e6 commit 8a3347a
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/custom.codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "CodeQL Analysis"

on:
push:
branches:
- develop # Adjust to your default or target branches
pull_request:
branches:
- develop # Adjust to your default or target branches
schedule:
- cron: "0 2 * * 0" # Optional: Weekly analysis on Sunday at 2 AM

jobs:
analyze:
name: Analyze Python Code
runs-on: ubuntu-latest

permissions:
actions: read
contents: read
security-events: write # Required for CodeQL to upload results

strategy:
fail-fast: false
matrix:
language: [java] # Add other languages if needed

steps:
# Step 1: Checkout repository
- name: Checkout repository
uses: actions/checkout@v3

# Step 2: Set up CodeQL
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# Optional: Add custom queries or use a specific database
# queries: ./codeql-queries

# Step 3: Build and prepare the code (if needed)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# Step 4: Perform CodeQL analysis
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: security # This categorizes results in the Security tab

0 comments on commit 8a3347a

Please sign in to comment.