mirror of
https://github.com/margrop/wrong-notebook.git
synced 2026-12-07 06:27:26 +08:00
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
name: CodeQL
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
schedule:
|
|
# 每周一 03:00(北京时间)扫描一次,及时发现新公开的漏洞模式
|
|
- cron: '0 19 * * 0'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
# 同分支/PR 有新推送时取消旧扫描;每周定时扫描单独一组不取消
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event_name == 'schedule' && 'schedule' || github.ref }}
|
|
cancel-in-progress: ${{ github.event_name != 'schedule' }}
|
|
|
|
jobs:
|
|
analyze:
|
|
runs-on: ubuntu-latest
|
|
# 只在 GitHub 上运行;Gitea 读取 main 时会回退到本目录,需跳过
|
|
if: github.server_url == 'https://github.com'
|
|
name: Analyze (${{ matrix.language }})
|
|
permissions:
|
|
contents: read
|
|
security-events: write
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# Web 端与服务端、安卓壳(Java)、CI 工作流;均无需编译即可分析
|
|
language: [javascript-typescript, java-kotlin, actions]
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
|
with:
|
|
languages: ${{ matrix.language }}
|
|
build-mode: none
|
|
queries: security-extended
|
|
|
|
- name: Perform CodeQL analysis
|
|
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
|
with:
|
|
category: /language:${{ matrix.language }}
|