From 8a3347a31f39b156cf78088b5d7cb978ee1a400f Mon Sep 17 00:00:00 2001 From: rajapandi1234 <138785181+rajapandi1234@users.noreply.github.com> Date: Wed, 27 Nov 2024 13:21:07 +0530 Subject: [PATCH] Create custom.codeql.yml Signed-off-by: rajapandi1234 <138785181+rajapandi1234@users.noreply.github.com> --- .github/workflows/custom.codeql.yml | 49 +++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/custom.codeql.yml diff --git a/.github/workflows/custom.codeql.yml b/.github/workflows/custom.codeql.yml new file mode 100644 index 0000000000..fe6a228366 --- /dev/null +++ b/.github/workflows/custom.codeql.yml @@ -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