This commit is contained in:
haibo.chen
2025-10-15 14:18:47 +08:00
parent 156f07644d
commit 1178b974a1
3 changed files with 79 additions and 0 deletions

22
.github/codeql/codeql-config.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: "CodeQL Config"
# 指定要扫描的路径
paths:
- pkg
- main
# 排除不需要扫描的路径
paths-ignore:
- '**/*_test.go'
- 'html/**'
- 'objs/**'
- 'vendor/**'
# 使用的查询套件
queries:
- uses: security-extended
- uses: security-and-quality
# 禁用默认查询(如果只想使用自定义查询)
# disable-default-queries: true

52
.github/workflows/codeql.yml vendored Normal file
View File

@ -0,0 +1,52 @@
name: "CodeQL"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
# 每周一凌晨2点运行
- cron: '0 2 * * 1'
jobs:
analyze:
name: Analyze Go Code
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
cache: true
# 初始化 CodeQL
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
# 自动构建
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# 执行 CodeQL 分析
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

View File

@ -1,6 +1,7 @@
# SRS-SIP # SRS-SIP
[![CI](https://github.com/ossrs/srs-sip/actions/workflows/ci.yml/badge.svg)](https://github.com/ossrs/srs-sip/actions/workflows/ci.yml) [![CI](https://github.com/ossrs/srs-sip/actions/workflows/ci.yml/badge.svg)](https://github.com/ossrs/srs-sip/actions/workflows/ci.yml)
[![CodeQL](https://github.com/ossrs/srs-sip/actions/workflows/codeql.yml/badge.svg)](https://github.com/ossrs/srs-sip/actions/workflows/codeql.yml)
[![codecov](https://codecov.io/gh/ossrs/srs-sip/branch/main/graph/badge.svg)](https://codecov.io/gh/ossrs/srs-sip) [![codecov](https://codecov.io/gh/ossrs/srs-sip/branch/main/graph/badge.svg)](https://codecov.io/gh/ossrs/srs-sip)
[![Go Report Card](https://goreportcard.com/badge/github.com/ossrs/srs-sip)](https://goreportcard.com/report/github.com/ossrs/srs-sip) [![Go Report Card](https://goreportcard.com/badge/github.com/ossrs/srs-sip)](https://goreportcard.com/report/github.com/ossrs/srs-sip)
[![License](https://img.shields.io/github/license/ossrs/srs-sip)](https://github.com/ossrs/srs-sip/blob/main/LICENSE) [![License](https://img.shields.io/github/license/ossrs/srs-sip)](https://github.com/ossrs/srs-sip/blob/main/LICENSE)
@ -46,6 +47,10 @@ go tool cover -func=coverage.out
For more details, see [Testing Guide](docs/TESTING.md). For more details, see [Testing Guide](docs/TESTING.md).
## Security
This project uses CodeQL for automated security scanning. For more information about security practices and how to report vulnerabilities, see [Security Guide](docs/SECURITY.md).
## Docker ## Docker
Use docker Use docker