Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Implementing Codeql for Security Code Scanning #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/codeql/codeql-config-default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Configuration file for CodeQL.
# You can tune the CodeQL analysis (excluding paths from being scanned for instance)
#
# See https://codeql.github.com/docs/codeql-cli/specifying-command-options-in-a-codeql-configuration-file/

paths-ignore:
- "**/*__tests__*/**"
- "*vendor"
- "**/vendor*/**"
- "docs/*"
47 changes: 47 additions & 0 deletions .github/workflows/codeql-analysis-default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "CodeQL - Default"

on:
push:
branches: ['master']
pull_request:
# The branches below must be a subset of the branches above
branches: [ '**' ]
schedule:
- cron: '25 9 * * 4'
workflow_dispatch:

jobs:
analyze:
name: Analyze
runs-on: lever-self-hosted
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ['javascript']
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install nodejs
uses: actions/setup-node@v4
with:
node-version: '>=20'
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config-default.yml
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
queries: security-extended,security-and-quality

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
Loading