Auto-sync: 2026-04-22 04:02

This commit is contained in:
2026-04-22 04:03:04 +08:00
parent 24218550d2
commit de096f2f88
232 changed files with 16604 additions and 514 deletions

View File

@@ -1,49 +1,61 @@
# DevSecOps
## Definition
DevSecOps integrates security practices into the DevOps process, embedding security throughout the entire software development lifecycle rather than treating it as a separate phase.
DevSecOpsDevelopment-Security-Operations是将安全实践深度集成到软件开发全生命周期的方法论使安全成为开发、运维、安全团队的共同责任而非独立环节。
## Key Principles
- **Shift Left**: Integrate security early in the development process
- **Automation**: Security checks automated in CI/CD pipelines
- **Continuous Compliance**: Ongoing security validation and compliance monitoring
- **Proactive Vulnerability Management**: Early detection and remediation of security issues
## Core Principles
- **安全即代码**:安全策略、测试和合规检查均以代码形式实现
- **共享责任**:安全是每个人的责任,而非仅安全团队的工作
- **自动化优先**:通过自动化减少人为错误,提高安全检查效率
- **持续安全**:安全贯穿开发、测试、部署、运营全阶段
## Core Practices
- Static Application Security Testing (SAST)
- Dynamic Application Security Testing (DAST)
- Software Composition Analysis (SCA)
- Container security scanning
- Infrastructure as Code security validation
- Secret management and rotation
## Key Components
## Tools
- SAST: SonarQube, Checkmarx, Semgrep
- Container scanning: Trivy, Clair, Snyk
- Secret management: HashiCorp Vault, AWS Secrets Manager
### 1. Collaboration协作
安全任务在开发和运维团队间共享,安全团队确保安全标准嵌入整个开发流程。
## Security Progression Across DevOps Maturity Levels
### 2. Communication沟通
安全专业人员需要用开发者理解的简单语言解释安全控制,建立共同的安全认知。
| Maturity | Security Integration Level |
|----------|--------------------------|
| Phase 1 | Security involvement only weeks before release, minimal compliance scans |
| Phase 2 | Security operates separately from the rest of the team |
| Phase 3 | Security involved in design, architecture, and operations discussions; scans integrated throughout development |
| Phase 4 | Dependency vulnerability management; continuous security monitoring across the team |
| Phase 5 | Prevent insecure/non-compliant code from reaching production; high-level security integration |
### 3. Automation自动化
- 将自动化安全测试添加到 CI/CD 管道
- "Break the Build" 机制在安全风险过高时停止构建
- 确保软件依赖保持最新
## Sources
- [[sources/cloud-devop-maturity-guideline.md]]
- [[sources/what-is-devsecops-best-practices-benefits-and-tools.md]]
- [[sources/devops-maturity-model-from-traditional-it-to-advanced-devops.md]]
### 4. Tool & Architecture Security工具与架构安全
- 选择和审查安全工具
- 谨慎管理用户访问(多因素认证、最小权限)
- 定期监控漏洞和打补丁
- 扫描代码中的敏感数据
### 5. Testing测试
在每个开发阶段集成安全测试,使用 SAST/DAST/IAST/SCA 等工具。
## DevSecOps vs DevOps
| 维度 | DevOps | DevSecOps |
|------|--------|-----------|
| **定义** | 强调开发与运维协作加速交付 | 将安全实践集成到开发过程 |
| **安全角色** | 安全单独处理或最后处理 | 从一开始就将安全嵌入每个步骤 |
| **团队参与** | 开发与运维协作 | 开发、运维、安全三方协作 |
| **合规方式** | 开发后进行合规检查 | 开发部署全程确保合规 |
## Benefits
- 早期发现漏洞,修复成本降低可达 100 倍
- 70% 的上线后发现的安全漏洞可在开发阶段预防
- 安全与开发速度实现双赢
- 持续合规,减少审计压力
## Related Concepts
- [[concepts/DevOps-Maturity]]
- [[concepts/CI-CD-Pipeline]]
- [[concepts/Infrastructure-as-Code]]
- [[concepts/DORA-Metrics]]
- [[concepts/Change-Failure-Rate]]
- [[Shift-Left-Security]] — 安全测试左移到开发早期
- [[Shift-Right-Security]] — 生产环境持续安全监控
- [[SAST]] — 静态应用安全测试
- [[DAST]] — 动态应用安全测试
- [[IAST]] — 交互式应用安全测试
- [[SCA]] — 软件组成分析
- [[CI/CD Pipeline]] — DevSecOps 的载体
- [[Policy-as-Code]] — 以代码管理安全策略
- [[Break-the-Build]] — 安全失败时停止构建
## Ingested
- Date: 2026-04-21
- Date: 2026-04-24 (updated with maturity level progression)
## Sources
- [[what-is-devsecops-best-practices-benefits-and-tools]]