Skip to content

Commit

Permalink
for testing4
Browse files Browse the repository at this point in the history
  • Loading branch information
IITI-tushar committed Dec 18, 2024
1 parent 1706ddc commit 5da59b6
Showing 1 changed file with 6 additions and 25 deletions.
31 changes: 6 additions & 25 deletions .github/workflows/codeql-codescan.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
##############################################################################
##############################################################################
#
# NOTE!
#
# Please read the README.md file in this directory that defines what should
# be placed in this file
#
##############################################################################
##############################################################################

name: CodeQL codescan workflow

on:
Expand All @@ -29,36 +18,28 @@ jobs:
contents: read
security-events: write

# strategy:
# fail-fast: false
# matrix:
# language: [ 'typescript' ]
# directory: [ 'src/components', 'src/utils', 'src/services' ] # List of directories to scan

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

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
languages: 'typescript' # Or 'python', 'typescript', etc.
debug: true

- name: CodeQL Analysis for Directory
run: |
echo "Scanning directory: ${{ matrix.directory }}"
codeql database create db-${{ matrix.directory }} --language=${{ matrix.language }} --source-root=${{ matrix.directory }}
echo "Scanning directory: src"
codeql database create db-src --language=javascript --source-root=src # Modify language and directory accordingly
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}-${{ matrix.directory }}"
output: results-${{ matrix.directory }}.sarif
category: "/language:javascript-src"
output: results-src.sarif

- name: Upload SARIF to GitHub Security
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results-${{ matrix.directory }}.sarif


sarif_file: results-src.sarif

0 comments on commit 5da59b6

Please sign in to comment.