Secure development policy

From Hack23/riksdagsmonitor · View interactive version

Secure development policy is an AI agent skill from the GitHub repository Hack23/riksdagsmonitor. Comprehensive secure development lifecycle covering all SDLC phases, AI controls, testing, and security requirements per Hack23 ISMS

How to use this skill

Skill file

๐Ÿ›ก๏ธ 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:

Deliverables Checklist:


๐Ÿ’ป Phase 2: Development

Clear Requirements:

Code Review Security Checklist:


๐Ÿงช Phase 3: Security Testing

Clear Requirements:

๐Ÿ”ฌ SAST (Static Application Security Testing)
๐Ÿ“ฆ SCA (Software Composition Analysis)
โšก DAST (Dynamic Application Security Testing)
๐Ÿ” Secret Scanning
๐Ÿ”’ Test Data Protection

๐Ÿš€ Phase 4: Deployment

Clear Requirements:

GitHub Actions Security Pattern:

permissions:
  contents: read  # Least privilege default

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: step-security/harden-runner@<SHA>
        with:
          egress-policy: audit
      
      - uses: actions/checkout@<SHA>
      
      # Pin ALL actions to SHA, not tags

๐Ÿ”ง Phase 5: Maintenance & Operations

Clear Requirements:

Monitoring Requirements:


๐Ÿค– AI-Augmented Development Controls

Clear Requirements for ALL AI-assisted development:

๐Ÿ” AI as Proposal Generator Only

๐Ÿ“‹ Mandatory PR Review Process

๐Ÿ”ง Curator-Agent Governance

๐Ÿ›ก๏ธ Security & Audit Requirements


๐ŸŽฏ Unit Test Coverage Requirements

Clear Requirements:

Reference Implementations:


๐ŸŒ End-to-End Testing Requirements

Clear Requirements:

Reference Implementations:


๐Ÿ•ท๏ธ Threat Modeling Requirements

Clear Requirements per Threat Modeling Policy:

๐Ÿ“‹ Required Documentation

๐Ÿ”„ Maintenance Requirements

Reference Implementations:


๐ŸŽ–๏ธ Public Evidence Requirements

Clear Requirements per STYLE_GUIDE.md:

Required Badges in README.md

Example Badge Configuration:

[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/ORG/REPO/badge)](https://scorecard.dev/viewer/?uri=github.com/ORG/REPO)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/ID/badge)](https://bestpractices.coreinfrastructure.org/projects/ID)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=ORG_REPO&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=ORG_REPO)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=ORG_REPO&metric=coverage)](https://sonarcloud.io/summary/new_code?id=ORG_REPO)
[![Threat Model](https://img.shields.io/badge/Threat_Model-Documentation-blue)](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

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

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.