Secure development lifecycle

From Hack23/riksdagsmonitor · View interactive version

Secure development lifecycle is an AI agent skill from the GitHub repository Hack23/riksdagsmonitor. Comprehensive SDLC security covering planning, development, testing, deployment, and maintenance with classification-driven controls and AI governance

How to use this skill

Skill file

๐Ÿ›ก๏ธ Secure Development Lifecycle (SDLC) Skill

๐Ÿ”ด AI FIRST Quality Principle

Apply the AI FIRST principle: never accept first-pass quality. Minimum 2 iterations. Read all output, improve every section. No shortcuts.

๐ŸŽฏ Purpose

Comprehensive security practices for the entire Software Development Lifecycle (SDLC), ensuring security is built in from inception through maintenance. Integrates classification-driven requirements, AI-augmented development controls, and systematic testing frameworks aligned with Hack23 Secure Development Policy.

๐Ÿ”— Governance chain

Authority flows from the Information Security Policy (master ISMS document) โ†’ Secure Development Policy (SDLC requirements) โ†’ this skill (operational implementation in this repository).

Directly relevant companion policies:

๐Ÿ” Core Security Principles

๐Ÿ” Security by Design

๐ŸŒŸ Transparency Through Documentation

๐Ÿ”„ Continuous Security Improvement

๐Ÿ”„ 5-Phase SDLC Security Framework

๐Ÿ“‹ Phase 1: Planning & Design

๐Ÿท๏ธ Project Classification (REQUIRED)

Apply Classification Framework:

Classification Levels:

| Level | Confidentiality | Integrity | Availability | Security Investment |

|-------|----------------|-----------|--------------|-------------------|

| Critical | State secrets | Financial | <1 hour RTO | Maximum controls |

| High | Proprietary | Legal | 4 hour RTO | Strong controls |

| Medium | Internal | Operational | 24 hour RTO | Standard controls |

| Low | Public | Informational | 72 hour RTO | Baseline controls |

๐Ÿ—๏ธ Security Architecture Design (REQUIRED)

Maintain comprehensive architecture documentation:

๐ŸŽฏ Threat Modeling (MANDATORY)

Per Threat Modeling Policy:

๐Ÿ’ป Phase 2: Development

๐Ÿ›ก๏ธ Secure Coding Guidelines

OWASP Top 10 (2021) Alignment:

  1. A01 - Broken Access Control: Proper authentication/authorization
  2. A02 - Cryptographic Failures: TLS 1.3, AES-256 encryption
  3. A03 - Injection: Parameterized queries, input validation
  4. A04 - Insecure Design: Apply threat modeling, secure patterns
  5. A05 - Security Misconfiguration: Secure defaults, hardened configs
  6. A06 - Vulnerable Components: SCA scanning, SBOM generation
  7. A07 - Authentication Failures: MFA, secure session management
  8. A08 - Software/Data Integrity: Code signing, integrity checks
  9. A09 - Logging Failures: Comprehensive security event logging
  10. A10 - SSRF: Validate external resource requests
๐Ÿ” Code Review Requirements

Classification-Based Review:

| Classification | Review Type | Required Approvals | Security Focus |

|----------------|-------------|-------------------|----------------|

| Critical | Formal security review | 2+ reviewers + security architect | All OWASP Top 10 |

| High | Security-focused PR review | 2+ reviewers | Critical vulnerabilities |

| Medium | Standard PR review | 1+ reviewer | Input validation, auth |

| Low | Standard PR review | 1 reviewer | Basic security checks |

๐Ÿ” Secret Management (MANDATORY)

๐Ÿงช Phase 3: Security Testing

๐Ÿ”ฌ Static Application Security Testing (SAST)

Implementation:

Classification-Based Quality Gates:

| Classification | Security Hotspots | Code Coverage | Duplications | Maintainability |

|----------------|------------------|---------------|--------------|-----------------|

| Critical | 0 (block) | โ‰ฅ90% | <3% | A rating |

| High | โ‰ค2 (review) | โ‰ฅ80% | <5% | A or B rating |

| Medium | โ‰ค5 (track) | โ‰ฅ70% | <10% | B or C rating |

| Low | โ‰ค10 (monitor) | โ‰ฅ60% | <15% | C rating |

๐Ÿ“ฆ Software Composition Analysis (SCA)

Dependency Security:

Remediation SLAs:

| Severity | Critical Project | High Project | Medium Project | Low Project |

|----------|-----------------|-------------|----------------|-------------|

| Critical | 24 hours | 72 hours | 1 week | 2 weeks |

| High | 1 week | 2 weeks | 1 month | 2 months |

| Medium | 1 month | 2 months | 3 months | 6 months |

| Low | Next release | Next release | Next release | Next release |

โšก Dynamic Application Security Testing (DAST)

Runtime Security Testing:

๐Ÿ” Secret Scanning (CONTINUOUS)
๐Ÿ“‹ Test Data Protection (MANDATORY)

๐ŸŽฏ Unit Test Coverage & Quality

๐Ÿ“Š Testing Standards

Minimum Thresholds:

๐Ÿ“š Required Documentation

Every repository MUST have:

๐Ÿ“Š Reference Implementation Examples

๐Ÿ›๏ธ Citizen Intelligence Agency (Java/Spring):

![Unit Test Coverage](https://hack23.github.io/cia/jacoco/)

![Unit Tests](https://hack23.github.io/cia/surefire.html)

![Test Plan](https://github.com/Hack23/cia/blob/master/UnitTestPlan.md)

๐ŸŽฎ Black Trigram (TypeScript/Phaser):

![Coverage](https://blacktrigram.com/coverage/)

![Unit Tests](https://blacktrigram.com/test-results/)

![Test Plan](https://github.com/Hack23/blacktrigram/blob/main/UnitTestPlan.md)

๐Ÿ“Š CIA Compliance Manager (TypeScript/Vite):

![Coverage](https://ciacompliancemanager.com/coverage/)

![Unit Tests](https://ciacompliancemanager.com/test-results/)

![Test Plan](https://github.com/Hack23/cia-compliance-manager/blob/main/docs/UnitTestPlan.md)

๐ŸŒ End-to-End Testing Strategy

๐ŸŽฏ E2E Testing Requirements

Coverage Areas:

๐Ÿ“š Required Documentation

Every repository MUST have:

๐Ÿ“Š Reference Implementation Examples

๐Ÿ›๏ธ Citizen Intelligence Agency:

![E2E Tests](https://hack23.github.io/cia/jacoco/)

![E2E Plan](https://github.com/Hack23/cia/blob/master/E2ETestPlan.md)

๐ŸŽฎ Black Trigram:

![E2E Tests](https://blacktrigram.com/cypress/mochawesome/)

![E2E Plan](https://github.com/Hack23/blacktrigram/blob/main/E2ETestPlan.md)

๐Ÿ“Š CIA Compliance Manager:

![E2E Tests](https://ciacompliancemanager.com/cypress/mochawesome/)

![E2E Plan](https://github.com/Hack23/cia-compliance-manager/blob/main/docs/E2ETestPlan.md)

๐Ÿค– AI-Augmented Development Controls

๐Ÿ” AI as Proposal Generator, Not Authority

Core Principles:

๐Ÿ“‹ PR Review Requirements

Mandatory Controls:

๐Ÿ”ง Curator-Agent Configuration Management

Change Control:

๐Ÿ›ก๏ธ Security Requirements

Tool Governance:

๐Ÿš€ Phase 4: Deployment

๐Ÿค– Automated CI/CD Pipelines

Security Gates:

โœ… Manual Approval Gates

Classification-Based Approvals:

| Classification | Approval Required | Approvers | Change Window |

|----------------|------------------|-----------|---------------|

| Critical | Production deploy | CEO + Security Architect | Scheduled only |

| High | Production deploy | Tech Lead + Reviewer | Standard window |

| Medium | Production deploy | Automated + monitoring | Anytime |

| Low | Production deploy | Automated | Anytime |

๐Ÿ“‹ Deployment Checklists

Pre-Deployment Verification:

๐Ÿ“Š Security Metrics

Real-Time Monitoring:

๐Ÿ”ง Phase 5: Maintenance & Operations

๐Ÿ†˜ Vulnerability Management

Classification-Based Remediation:

Per Vulnerability Management:

| Severity | Critical Project | High Project | Medium Project | Low Project |

|----------|-----------------|-------------|----------------|-------------|

| Critical | 24 hours | 72 hours | 1 week | 2 weeks |

| High | 1 week | 2 weeks | 1 month | 2 months |

| Medium | 1 month | 2 months | 3 months | 6 months |

| Low | Next release | Next release | Next release | Next release |

๐Ÿ“ˆ Performance Monitoring

Security Metrics Integration:

Per Security Metrics:

๐Ÿ”„ Regular Updates

Patch Management:

๐Ÿ“‹ Incident Response

Integration:

Per Incident Response Plan:

๐Ÿ“Š SDLC Security Maturity Levels

Level 1: Basic (Minimum Viable Security)

Level 2: Intermediate (Standard Security)

Level 3: Advanced (Enhanced Security)

Level 4: Mature (Security Excellence)

โœ… SDLC Security Checklist

Planning & Design Phase

Development Phase

Testing Phase

Deployment Phase

Maintenance Phase

๐Ÿ“š References

Hack23 ISMS Core Policies

Example Implementations

External Frameworks

๐ŸŽฏ Remember


Last Updated: 2026-02-10 (Continuous)

Version: Based on Hack23 Secure Development Policy v2.1 & STYLE_GUIDE v2.3

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.