| name | secure-development-policy |
| description | Comprehensive secure development lifecycle covering all SDLC phases, AI controls, testing, and security requirements per Hack23 ISMS |
| license | Apache-2.0 |
๐ก๏ธ Secure Development Policy 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 Statement
Apply Hack23 AB's Secure Development Policy to demonstrate how security-by-design creates competitive advantages through systematic DevSecOps implementation.
Reference: Hack23 Secure Development Policy
This skill provides comprehensive guidance for implementing all phases of the secure development lifecycle with clear, actionable requirements following STYLE_GUIDE.md icon standards.
๐ Secure Development Lifecycle (SDLC) - All Phases
๐ Phase 1: Planning & Design
Clear Requirements:
- โ
Complete project classification per Classification Framework
- โ
Document CIA triad levels (Confidentiality, Integrity, Availability)
- โ
Define RTO/RPO aligned with business impact
- โ
Create SECURITY_ARCHITECTURE.md with Mermaid C4 diagrams
- โ
Perform STRIDE threat modeling documented in THREAT_MODEL.md
- โ
Complete risk assessment integrated with Risk Register
- โ
Calculate security investment ROI based on classification
Deliverables Checklist:
๐ป Phase 2: Development
Clear Requirements:
- โ
Follow OWASP Top 10 secure coding standards
- โ
Implement language-specific security best practices
- โ
Require security-focused code review for all changes
- โ
Apply data classification to all code assets
- โ
Use GitHub secrets, never hardcode credentials
- โ
Implement secret rotation procedures
- โ
Use parameterized queries (no SQL injection)
- โ
Validate and sanitize all inputs
- โ
Encode outputs appropriately for context
- โ
Implement proper error handling (no information disclosure)
Code Review Security Checklist:
๐งช Phase 3: Security Testing
Clear Requirements:
๐ฌ SAST (Static Application Security Testing)
- โ
SonarCloud integration on every commit
- โ
Quality gate must pass (no Critical/High vulnerabilities)
- โ
Security hotspots reviewed and resolved
- โ
Code coverage โฅ80% lines, โฅ70% branches
๐ฆ SCA (Software Composition Analysis)
- โ
Automated dependency scanning (Dependabot/Renovate)
- โ
SBOM generation (CycloneDX or SPDX format)
- โ
License compliance via FOSSA scanning
- โ
Vulnerability remediation per classification SLAs:
- Critical: 24 hours
- High: 7 days
- Medium: 30 days
- Low: 90 days
โก DAST (Dynamic Application Security Testing)
- โ
OWASP ZAP scanning in staging environment
- โ
API security testing (authentication, authorization, input validation)
- โ
Annual penetration testing for High/Critical projects
๐ Secret Scanning
- โ
GitHub secret scanning enabled
- โ
Pre-commit hooks prevent secret commits
- โ
Immediate rotation for any exposed secrets
๐ Test Data Protection
- โ
NEVER use production data in test environments
- โ
Anonymize/pseudonymize/mask all test data
- โ
Securely delete test data after use
- โ
Restrict test environment access (least privilege)
๐ Phase 4: Deployment
Clear Requirements:
- โ
Automated CI/CD with security gates
- โ
All GitHub Actions pinned to SHA commits
- โ
Harden-runner enabled with egress auditing
- โ
Least privilege permissions in workflows
- โ
Manual approval required for production
- โ
Deployment checklist completed
- โ
Security metrics and monitoring configured
- โ
Rollback plan documented and tested
GitHub Actions Security Pattern:
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@<SHA>
with:
egress-policy: audit
- uses: actions/checkout@<SHA>
๐ง Phase 5: Maintenance & Operations
Clear Requirements:
- โ
Active vulnerability management per Vulnerability Management
- โ
Security metrics tracked per Security Metrics
- โ
Regular dependency updates (automated via Dependabot)
- โ
Security patches applied per classification SLAs
- โ
Incident response integration per Incident Response Plan
- โ
Annual security review and threat model update
- โ
Quarterly dependency and license audits
- โ
Continuous monitoring and alerting
Monitoring Requirements:
๐ค AI-Augmented Development Controls
Clear Requirements for ALL AI-assisted development:
๐ AI as Proposal Generator Only
- โ
All AI outputs require human review and approval
- โ
AI cannot bypass CI/CD, security gates, or approvals
- โ
Human developer retains accountability for all changes
- โ
AI cannot weaken security controls
- โ
AI cannot autonomously deploy to production
๐ Mandatory PR Review Process
- โ
All AI-assisted code goes through standard PR workflow
- โ
PR description documents AI assistance used
- โ
Security gates enforced (no exceptions for AI)
- โ
Human reviewer verifies security controls intact
- โ
Testing requirements unchanged (80%+ coverage)
๐ง Curator-Agent Governance
- โ
Changes to
.github/agents/*.md require CEO approval
- โ
Changes to
.github/copilot-mcp*.json require CEO approval
- โ
Changes to
.github/workflows/copilot-setup-steps.yml require CEO approval
- โ
Treat as Normal Changes per Change Management
- โ
Document risk assessment for capability expansion
- โ
All new integrations require security review
๐ก๏ธ Security & Audit Requirements
- โ
Agents operate with least-privilege tool access
- โ
MCP configurations under change control
- โ
All agent activities logged and auditable
- โ
Capability expansion requires security review
- โ
Quarterly agent ecosystem security audit
๐ฏ Unit Test Coverage Requirements
Clear Requirements:
- โ
Minimum 80% line coverage
- โ
Minimum 70% branch coverage
- โ
Tests run on every commit and PR
- โ
UnitTestPlan.md documented in repository
- โ
Public coverage reports via badges
- โ
Historical coverage tracking (no regression)
- โ
Coverage reports published to public URL
Reference Implementations:
๐ End-to-End Testing Requirements
Clear Requirements:
- โ
All critical user journeys covered
- โ
E2ETestPlan.md documented in repository
- โ
Public Mochawesome/Cypress reports
- โ
Cross-browser testing (Chrome, Firefox, Safari)
- โ
Performance assertions within tests
- โ
Authentication/authorization flows tested
- โ
Error handling and edge cases covered
Reference Implementations:
๐ท๏ธ Threat Modeling Requirements
Clear Requirements per Threat Modeling Policy:
๐ Required Documentation
- โ
THREAT_MODEL.md in repository root
- โ
STRIDE framework application (all 6 categories)
- โ
MITRE ATT&CK technique mapping
- โ
Attack tree analysis with probability/impact
- โ
Threat agent classification (external/internal/supply chain)
- โ
Quantitative risk assessment with business impact
- โ
Security control mapping with effectiveness validation
๐ Maintenance Requirements
- โ
Threat model created during design phase
- โ
Updated for all architectural changes
- โ
Annual comprehensive review
- โ
Quarterly update cycle
- โ
Incident-driven updates after security events
Reference Implementations:
๐๏ธ Public Evidence Requirements
Clear Requirements per STYLE_GUIDE.md:
Required Badges in README.md
- โ
OpenSSF Scorecard (target: โฅ7.0)
- โ
CII Best Practices (minimum: Passing)
- โ
SLSA Level 3 attestation
- โ
SonarCloud Quality Gate (must be "Passed")
- โ
Code Coverage badge (โฅ80%)
- โ
License badge (OSI-approved)
- โ
Threat Model link badge
Example Badge Configuration:
[](https://scorecard.dev/viewer/?uri=github.com/ORG/REPO)
[](https://bestpractices.coreinfrastructure.org/projects/ID)
[](https://sonarcloud.io/summary/new_code?id=ORG_REPO)
[](https://sonarcloud.io/summary/new_code?id=ORG_REPO)
[](https://github.com/ORG/REPO/blob/main/THREAT_MODEL.md)
๐ Master Verification Checklist
Use this comprehensive checklist before ANY deployment:
Phase 1: Planning & Design โ
Phase 2: Development โ
Phase 3: Testing โ
Phase 4: Deployment โ
Phase 5: Operations โ
AI Controls โ
Documentation โ
Public Evidence โ
๐ Authoritative References
- Primary Policy: Secure Development Policy
- Governance umbrella: Information Security Policy โ sets scope, roles, risk management and accountability for everything below
- Related Policies:
- Open Source Policy โ licensing, SBOM, supply-chain rules (applies to every dependency added during SDLC)
- AI Policy โ AI-assisted development, human-in-the-loop, agent-activity logging
- Threat Modeling โ STRIDE/MITRE ATT&CK integrated into Phase 1โ2
- Vulnerability Management โ SLAs: Critical 24h / High 7d / Medium 30d / Low 90d (drives Phase 4โ5)
- Classification Framework โ CIA triad & RTO/RPO drive required controls per phase
- Change Management โ Normal / Standard / Emergency change process for every deployment
- Incident Response Plan โ SDLC feedback loop on post-incident lessons learned
- Access Control Policy โ least privilege in CI/CD, GitHub, deployment environments
- Cryptography Policy โ TLS 1.3, approved algorithms, key management
- Security Metrics โ KPIs (MTTD, MTTR, vuln-SLA, audit-finding closure)
- Standards: STYLE_GUIDE.md
Policy Interaction Map (SDLC phase โ policies)
| SDLC Phase | Primary Policies |
|---|
| ๐ Planning & Design | Info Sec ยท Classification ยท Threat Modeling ยท AI Policy |
| ๐ป Development | Secure Dev ยท Open Source ยท AI Policy ยท Access Control |
| ๐งช Testing | Secure Dev ยท Vulnerability Management ยท Threat Modeling |
| ๐ Deployment | Change Management ยท Access Control ยท Cryptography |
| ๐ง Operations | Vulnerability Management ยท Incident Response ยท Security Metrics |
Framework Mapping
Every SDLC control maps to ISO 27001:2022 Annex A (A.5, A.8.25โA.8.34), NIST CSF 2.0 (GOVERN, PROTECT, DETECT), CIS Controls v8.1 (IG1 #16 Application Software Security, IG2 #7 Vulnerability Management), GDPR (Art. 25 privacy-by-design), NIS2 (supply-chain & incident reporting), EU CRA (secure-by-design for software products).
๐ก Key Takeaways
- ๐ก๏ธ Security by Design: Build security in from the start, not bolt on later
- ๐ Transparency: Public evidence through badges and documentation
- ๐ท๏ธ Classification-Driven: All decisions aligned with project classification
- ๐ Continuous Improvement: Regular reviews, updates, and learning from incidents
- ๐ค Human Accountability: AI assists, humans decide and approve
- ๐ Evidence-Based: Every security claim backed by public, verifiable proof
- โ
Comprehensive Coverage: ALL 5 SDLC phases with clear, actionable requirements