feat(ci): 集成gitleaks + pip-audit + vulture安全扫描到Validate阶段 #311

Merged
xiaoxia merged 1 commits from feat/ci-security-scans into develop 2026-07-14 14:55:58 +08:00
Owner

集成三项安全/质量扫描到CI的Validate阶段:

1. gitleaks 密钥检测(P0 - 阻断模式)

  • PR模式:增量扫描(只扫描PR改动)
  • Push模式:全量扫描
  • 发现密钥直接阻断合并
  • 双源下载(GitHub + Gitee镜像),网络问题时优雅降级
  • 配置白名单排除示例配置、测试文件等误报

2. pip-audit 依赖漏洞扫描(P1 - 告警模式)

  • 扫描所有requirements文件
  • 当前仅告警不阻断,待稳定后可升级

3. vulture 死代码检测(P2 - 告警模式)

  • 置信度80%
  • 排除tests/migrations/docs等目录
  • FastAPI/SQLAlchemy/Celery等框架代码白名单
  • 仅供参考,不阻断CI
集成三项安全/质量扫描到CI的Validate阶段: ## 1. gitleaks 密钥检测(P0 - 阻断模式) - PR模式:增量扫描(只扫描PR改动) - Push模式:全量扫描 - 发现密钥直接阻断合并 - 双源下载(GitHub + Gitee镜像),网络问题时优雅降级 - 配置白名单排除示例配置、测试文件等误报 ## 2. pip-audit 依赖漏洞扫描(P1 - 告警模式) - 扫描所有requirements文件 - 当前仅告警不阻断,待稳定后可升级 ## 3. vulture 死代码检测(P2 - 告警模式) - 置信度80% - 排除tests/migrations/docs等目录 - FastAPI/SQLAlchemy/Celery等框架代码白名单 - 仅供参考,不阻断CI
xiaoxia added 1 commit 2026-07-14 11:36:03 +08:00
feat(ci): 集成gitleaks + pip-audit + vulture安全扫描到Validate阶段
CI/CD Pipeline / Unit Tests (pull_request) Successful in 1m13s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m13s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Successful in 9m35s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Successful in 2m26s
a248883c8e
- gitleaks: 密钥检测(P0,阻断模式)
  - PR模式:增量扫描
  - Push模式:全量扫描
  - 双源下载(GitHub + Gitee镜像),失败优雅降级
- pip-audit: 依赖漏洞扫描(P1,告警模式,不阻断)
  - 扫描所有requirements文件
- vulture: 死代码检测(P2,告警模式,不阻断)
  - 置信度80%
  - 排除tests/migrations/scripts等
  - 框架代码白名单
xiaoxia merged commit 23d2406c27 into develop 2026-07-14 14:55:58 +08:00
Sign in to join this conversation.