Files
nexus/wiki/concepts/Shift-Left-Security.md

1.8 KiB
Raw Blame History

Shift-Left Security

Definition

"Shift left" means identifying security flaws early in the software development lifecycle. By focusing on these issues initially, teams can tackle and fix them before they become bigger problems.

Core Principle

将安全测试左移到软件开发生命周期的早期阶段,而非等到开发完成后才进行安全检查。

Cost Efficiency

发现阶段 相对修复成本
设计阶段 1x
开发/代码审查 5-10x
测试阶段 10-30x
生产环境 30-100x

Implementation

Design Phase

  • 威胁建模Threat Modeling
  • 安全需求定义
  • 安全架构评审

Development Phase

  • SAST 静态代码分析
  • SCA 依赖扫描
  • 安全编码规范检查
  • IDE 安全插件集成

CI/CD Integration

  • 在构建阶段自动运行安全扫描
  • Break-the-Build 机制阻止高风险构建
  • 自动依赖更新和漏洞告警

Best Practices

  1. 开发者编写安全代码,从一开始就重视安全
  2. 安全专家与开发团队紧密协作
  3. 使用自动化工具减少人工审查负担
  4. 建立安全编码标准并持续培训

Relationship with Shift-Right

Sources