Skip to content
Merged
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
36 changes: 36 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "JEngine CodeQL Configuration"

# Only analyze JEngine source code, exclude third-party dependencies
paths:
# JEngine Core package
- 'UnityProject/Packages/com.jasonxudeveloper.jengine.core'
# JEngine Util package
- 'UnityProject/Packages/com.jasonxudeveloper.jengine.util'
# Hot update code
- 'UnityProject/Assets/HotUpdate/Code'

paths-ignore:
# Third-party packages
- 'UnityProject/Packages/com.code-philosophy.hybridclr'
- 'UnityProject/Packages/com.focus-creative-games.*'
- 'UnityProject/Packages/com.tuyoogame.*'
- 'UnityProject/Packages/com.unity.*'
- 'UnityProject/Packages/com.cysharp.*'
# Unity generated files
- 'UnityProject/Library'
- 'UnityProject/Temp'
- 'UnityProject/Logs'
- 'UnityProject/obj'
# Build outputs
- 'UnityProject/Builds'
- 'UnityProject/ServerData'
# Test files (optional - remove if you want tests scanned)
- 'UnityProject/Assets/Tests'
# Third-party assets
- 'UnityProject/Assets/Plugins'
# Samples
- 'UnityProject/Assets/Samples'

# Query configuration
queries:
- uses: security-and-quality
61 changes: 61 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CodeQL Security Analysis

on:
push:
branches: [master]
paths:
# Only run when JEngine code changes
- 'UnityProject/Packages/com.jasonxudeveloper.jengine.core/**'
- 'UnityProject/Packages/com.jasonxudeveloper.jengine.util/**'
- 'UnityProject/Assets/HotUpdate/Code/**'
- '.github/codeql/**'
- '.github/workflows/codeql.yml'
pull_request:
branches: [master]
paths:
- 'UnityProject/Packages/com.jasonxudeveloper.jengine.core/**'
- 'UnityProject/Packages/com.jasonxudeveloper.jengine.util/**'
- 'UnityProject/Assets/HotUpdate/Code/**'
- '.github/codeql/**'
- '.github/workflows/codeql.yml'
schedule:
# Run weekly on Sunday at 00:00 UTC
- cron: '0 0 * * 0'
workflow_dispatch:

jobs:
analyze:
name: Analyze C# Code
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

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

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: csharp
config-file: ./.github/codeql/codeql-config.yml
# Use security-and-quality queries for comprehensive analysis
queries: security-and-quality

# Build step for C# - CodeQL needs to observe the build
# For Unity projects, we set up a minimal build environment
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'

# Autobuild attempts to build the project automatically
- name: Autobuild
uses: github/codeql-action/autobuild@v3

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