garrison 0.8.0

Garrison - 面向 Rust 生态的一站式身份认证鉴权框架
Documentation
# Copyright (c) 2026 Kirky.X. All rights reserved.
# See LICENSE for full license text.

# CodeQL 静态安全分析(GitHub 原生,跨语言自动检测)。
# 触发: push 到主分支 / PR / 每周二定时全量扫描
# 无需额外 secret:使用自动注入的 GITHUB_TOKEN。
name: CodeQL

on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main, develop]
  schedule:
    - cron: "37 4 * * 2" # 每周二 04:37 UTC(避开整点)

permissions:
  contents: read
  security-events: write # 上传 SARIF 到 Security 标签页

concurrency:
  group: codeql-${{ github.ref }}
  cancel-in-progress: true

jobs:
  analyze:
    name: Analyze
    runs-on: ubuntu-latest
    timeout-minutes: 30
    permissions:
      security-events: write
      actions: read
      contents: read
    strategy:
      fail-fast: false
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

      # 不传 languages → CodeQL 自动检测仓库语言
      # 使用 .github/codeql-config.yml 配置 paths-ignore 排除测试文件
      # (测试代码中的硬编码密码/nonce 是预期行为,非真实漏洞)
      # codeql-action 用 SHA pin 防供应链攻击(与 ci.yml/docs.yml 策略一致)
      - name: Initialize CodeQL
        uses: github/codeql-action/init@fb4bfd79bfa826ce96c90727ff8833835ba8aad0 # v3, nosemgrep
        with:
          config-file: .github/codeql-config.yml

      - name: Autobuild
        uses: github/codeql-action/autobuild@fb4bfd79bfa826ce96c90727ff8833835ba8aad0 # v3, nosemgrep

      - name: Perform CodeQL Analysis
        uses: github/codeql-action/analyze@fb4bfd79bfa826ce96c90727ff8833835ba8aad0 # v3, nosemgrep
        with:
          category: "/language:autodetect"