Hack23 isms compliance

From Hack23/riksdagsmonitor · View interactive version

Hack23 isms compliance is an AI agent skill from the GitHub repository Hack23/riksdagsmonitor. Strategic skill for ensuring all Hack23 repositories comply with ISMS requirements (ISO 27001, NIST CSF 2.0, CIS Controls)

How to use this skill

Skill file

Hack23 ISMS Compliance 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

This skill ensures all code, documentation, and configurations comply with Hack23's Information Security Management System (ISMS) aligned with ISO 27001:2022, NIST CSF 2.0, and CIS Controls v8.1.

📘 Primary Reference — Information Security Policy

The master ISMS document is the Information Security Policy. It defines:

Every other ISMS document derives authority from and must remain consistent with the Information Security Policy.

Strategic Principles

1. Security by Design

2. Compliance as Code

3. Transparency First

4. Risk-Based Approach

Required Documentation Portfolio

Security Documentation (MANDATORY)

Every Hack23 repository MUST have:

\\\`

SECURITY_ARCHITECTURE.md # Current security controls

THREAT_MODEL.md # STRIDE analysis

FUTURE_SECURITY_ARCHITECTURE.md # Security roadmap

\\\`

SECURITY_ARCHITECTURE.md must include:

THREAT_MODEL.md must include:

FUTURE_SECURITY_ARCHITECTURE.md must include:

Architecture Documentation Portfolio (MANDATORY)

Current State

\\\`

ARCHITECTURE.md # C4 models (Context, Container, Component)

DATA_MODEL.md # Data structures and relationships

FLOWCHART.md # Business processes and workflows

STATEDIAGRAM.md # State transitions and lifecycles

MINDMAP.md # Conceptual relationships

SWOT.md # Strategic analysis

\\\`

Future State

\\\`

FUTURE_ARCHITECTURE.md # Architectural evolution

FUTURE_DATA_MODEL.md # Enhanced data architecture

FUTURE_FLOWCHART.md # Improved workflows

FUTURE_STATEDIAGRAM.md # Advanced state management

FUTURE_MINDMAP.md # Capability expansion

FUTURE_SWOT.md # Future opportunities

\\\`

Compliance Framework Mapping

ISO 27001:2022 Annex A Controls

Always map implementations to these controls:

| Control | Focus Area | Implementation Examples |

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

| A.9.2 | User Access Management | MFA, SSH keys, GPG signing |

| A.9.4 | System/App Access Control | RBAC, least privilege |

| A.10.1 | Cryptographic Controls | TLS 1.3, HTTPS-only, encryption at rest |

| A.12.4 | Logging and Monitoring | Audit logs, security monitoring |

| A.13.1 | Network Security | Firewalls, DDoS protection, security headers |

| A.14.2 | Secure Development | SAST, DAST, dependency scanning |

| A.16.1 | Incident Management | Response procedures, forensics |

NIST CSF 2.0 Functions

Map all security measures to functions:

| Function | Purpose | Key Categories |

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

| GOVERN (GV) | Organizational context | Risk management strategy, policies |

| IDENTIFY (ID) | Understand risks | Asset management, risk assessment |

| PROTECT (PR) | Implement safeguards | Access control, data security |

| DETECT (DE) | Find anomalies | Monitoring, threat detection |

| RESPOND (RS) | Take action | Response planning, communications |

| RECOVER (RC) | Restore services | Recovery planning, improvements |

CIS Controls v8.1

Implement applicable controls by Implementation Group:

IG1 (Basic Cyber Hygiene):

IG2 (Enterprise Security):

DevSecOps Requirements

CI/CD Security

All workflows must:

  1. Use step-security/harden-runner for egress auditing
  2. Implement least privilege permissions
  3. Pin actions to SHA commits (not tags)
  4. Scan dependencies with Dependabot
  5. Run CodeQL or equivalent SAST
  6. Enable secret scanning
  7. Implement quality gates (fail on security issues)

Example:

\\\`yaml

permissions:

contents: read # Least privilege

steps:

uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9

with:

egress-policy: audit

\\\`

Security Scanning

Required scans:

Access Control

Threat Modeling (STRIDE)

For every component, analyze:

| Threat | Description | Example Mitigations |

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

| Spoofing | Identity theft | MFA, strong authentication |

| Tampering | Data modification | Input validation, integrity checks |

| Repudiation | Deny actions | Audit logs, digital signatures |

| Information Disclosure | Expose info | Encryption, access control |

| Denial of Service | Disrupt service | Rate limiting, DDoS protection |

| Elevation of Privilege | Gain unauthorized access | Least privilege, RBAC |

Compliance Verification Checklist

Before completing any task, verify:

Audit Evidence

Maintain evidence for:

  1. Control implementation: Configuration files, screenshots
  2. Control effectiveness: Test results, monitoring logs
  3. Control coverage: Mapping matrices, gap analysis
  4. Continuous monitoring: Scan results, alerts
  5. Incident response: Procedures, exercises, post-mortems

Remember

References

Hack23 ISMS Core Policies

Compliance & Classification

Risk & Incident Management

Technical Controls

Supporting Documents

Example Implementations

Compliance Frameworks

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.