agentleFS
jaskaranhundaljaskaranhundal/usap-skills/risk-compliance/CLAUDE.md

usap-skills / risk-compliance

CLAUDE.md4 starsChanged 2 months agoApache-2.0View on GitHub

The Risk & Compliance domain contains skills for quantifying enterprise risk, modeling threats at the design and architecture level, mapping security controls to regulatory frameworks, tracking emerging regulatory obligations, conducting privacy impact assessments, evaluating cyber insurance adequacy, gathering internal audit evidence, and assessing organizational readiness for post-quantum cryptography standards. Risk and compliance skills are advisory and analytical. They produce structured risk registers, heat maps, compliance gap reports, DPIA outputs, and readiness assessments. These payloads are consumed by the governance domain…

The file

We split this CLAUDE.md into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All skill paths are relative from the repository root as risk-compliance/<slug>/.

    line 35
  2. Very specific:

    If a privacy-related regulation is in scope (GDPR, CCPA, HIPAA), privacy-dpia is invoked between compliance-mapping and …

    line 221
  3. Very specific:

    All skill paths in this domain are relative from the repository root using the convention risk-compliance/<slug>/.

    line 255

≈ “Common” is an estimate: at least 1 in 5 of the 27,641 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Risk & Compliance Domain — CLAUDE.md

Purpose

The Risk & Compliance domain contains skills for quantifying enterprise risk, modeling threats at the design and architecture level, mapping security controls to regulatory frameworks, tracking emerging regulatory obligations, conducting privacy impact assessments, evaluating cyber insurance adequacy, gathering internal audit evidence, and assessing organizational readiness for post-quantum cryptography standards.

Risk and compliance skills are advisory and analytical. They produce structured risk registers, heat maps, compliance gap reports, DPIA outputs, and readiness assessments. These payloads are consumed by the governance domain for posture scoring and executive reporting, by the detection domain for risk-contextualized finding prioritization, and by security and legal stakeholders for regulatory decision-making. Mutating actions — enforcing controls, modifying data processing activities, renegotiating insurance policies — require explicit human approval and are executed by the relevant operational functions.

Subdomains covered by this domain:

  • Enterprise risk quantification and board risk heat map generation
  • Threat modeling using STRIDE, PASTA, and LINDDUN methodologies
  • Multi-framework compliance mapping and control cross-walk
  • Regulatory horizon scanning (NIS2, DORA, state privacy laws, sector-specific rules)
  • GDPR Data Protection Impact Assessment (DPIA) and Privacy Impact Assessment (PIA)
  • Cyber insurance coverage adequacy analysis against incident scenario libraries
  • Internal audit evidence collection and controls testing for SOC 2, ISO 27001, SOX, and FedRAMP
  • Post-quantum cryptography readiness assessment against NIST PQC standards

Skills Catalog

SkillSlugPrimary ToolCoverage
enterprise-risk-assessmentrisk-compliance/enterprise-risk-assessmententerprise-risk-assessment_tool.pyBoard risk, heat maps
risk-threat-modelingrisk-compliance/risk-threat-modelingrisk-threat-modeling_tool.pySTRIDE, PASTA, LINDDUN
compliance-mappingrisk-compliance/compliance-mappingcompliance-mapping_tool.pyMulti-framework mapping
regulatory-horizonrisk-compliance/regulatory-horizonregulatory-horizon_tool.pyRegulatory watch, NIS2, DORA
privacy-dpiarisk-compliance/privacy-dpiaprivacy-dpia_tool.pyGDPR DPIA, PIA
cyber-insurancerisk-compliance/cyber-insurancecyber-insurance_tool.pyCoverage adequacy
internal-audit-assurancerisk-compliance/internal-audit-assuranceinternal-audit-assurance_tool.pyAudit evidence, controls testing
quantum-security-readinessrisk-compliance/quantum-security-readinessquantum-security-readiness_tool.pyPQC readiness, NIST PQC standards

All skill paths are relative from the repository root as risk-compliance/<slug>/. For example, the compliance-mapping skill lives at risk-compliance/compliance-mapping/.


Python Tools Reference

ToolPathPurposeKey Args
enterprise-risk-assessment_tool.pyrisk-compliance/enterprise-risk-assessment/scripts/enterprise-risk-assessment_tool.pyAggregates risk scenarios into board-level heat maps; scores by Likelihood × Impact; aligns to risk appetite--scope, --risk-appetite, --output
risk-threat-modeling_tool.pyrisk-compliance/risk-threat-modeling/scripts/risk-threat-modeling_tool.pyRuns STRIDE, PASTA, or LINDDUN threat modeling on DFDs; scores threat scenarios; maps to MITRE ATT&CK--model, --methodology, --output
compliance-mapping_tool.pyrisk-compliance/compliance-mapping/scripts/compliance-mapping_tool.pyMaps implemented controls to multiple regulatory frameworks; identifies gaps; produces cross-walk tables--frameworks, --control-inventory, --output
regulatory-horizon_tool.pyrisk-compliance/regulatory-horizon/scripts/regulatory-horizon_tool.pyTracks emerging and enacted regulations; maps new requirements to existing control gaps; produces deadline register--region, --sector, --lookahead-days, --output
privacy-dpia_tool.pyrisk-compliance/privacy-dpia/scripts/privacy-dpia_tool.pyConducts GDPR-aligned DPIA and PIA for data processing activities; scores residual risk; identifies consultation triggers--processing-activity, --data-categories, --output
cyber-insurance_tool.pyrisk-compliance/cyber-insurance/scripts/cyber-insurance_tool.pyEvaluates insurance coverage adequacy against incident scenario library; identifies coverage gaps and sublimit risks--policy, --scenario-set, --output
internal-audit-assurance_tool.pyrisk-compliance/internal-audit-assurance/scripts/internal-audit-assurance_tool.pyCollects and organizes controls evidence for audit; tests control operating effectiveness; identifies exceptions--framework, --control-domain, --period, --output
quantum-security-readiness_tool.pyrisk-compliance/quantum-security-readiness/scripts/quantum-security-readiness_tool.pyAssesses current cryptographic asset inventory against NIST PQC standards; scores migration readiness; prioritizes migration paths--scope, --nist-pqc-set, --output

Regulatory Framework Coverage

The following matrix shows which skills contribute to each supported regulatory framework, where gap identification occurs, and whether deadline tracking is maintained.

FrameworkContributing SkillsGap IdentificationDeadline Tracking
GDPRcompliance-mapping, privacy-dpia, regulatory-horizoncompliance-mapping (control gaps), privacy-dpia (residual risk)regulatory-horizon (enforcement deadlines)
PCI DSScompliance-mapping, internal-audit-assurancecompliance-mapping (requirement gaps), internal-audit-assurance (control exceptions)regulatory-horizon (version transition deadlines)
HIPAAcompliance-mapping, internal-audit-assurance, privacy-dpiacompliance-mapping, privacy-dpia (PHI processing)regulatory-horizon
SOC 2internal-audit-assurance, compliance-mappinginternal-audit-assurance (control exceptions), compliance-mapping (TSC gap mapping)internal-audit-assurance (audit window tracking)
ISO 27001compliance-mapping, internal-audit-assurance, enterprise-risk-assessmentcompliance-mapping (Annex A gaps), internal-audit-assurance (evidence gaps)regulatory-horizon (certification renewal)
NIST CSFcompliance-mapping, enterprise-risk-assessmentcompliance-mapping (function/category gaps)regulatory-horizon
NIS2compliance-mapping, regulatory-horizon, enterprise-risk-assessmentregulatory-horizon (new requirement identification), compliance-mapping (control gaps)regulatory-horizon (national transposition deadlines)
DORAcompliance-mapping, regulatory-horizon, internal-audit-assuranceregulatory-horizon, compliance-mapping (ICT risk management gaps)regulatory-horizon (phased compliance deadlines)
CCPA / CPRAcompliance-mapping, privacy-dpia, regulatory-horizoncompliance-mapping (data rights gaps), privacy-dpia (processing risk)regulatory-horizon (amendment deadlines)
SOXinternal-audit-assurance, enterprise-risk-assessmentinternal-audit-assurance (IT general controls exceptions)internal-audit-assurance (reporting period tracking)
FedRAMPinternal-audit-assurance, compliance-mappinginternal-audit-assurance (control evidence gaps), compliance-mapping (NIST 800-53 gaps)regulatory-horizon (authorization renewal)

Risk Quantification Methods

The enterprise-risk-assessment skill supports three risk quantification approaches. Select the appropriate method based on the audience and decision context.

MethodDescriptionOutput FormatBest Used For
Qualitative (Likelihood x Impact)5x5 matrix; both axes scored 1–5; product gives risk score 1–25Heat map with risk zone overlayBoard-level briefings, initial risk triage, risk appetite alignment
Semi-quantitative (FAIR-lite)Maps qualitative scores to frequency and magnitude ranges; produces annualized loss exposure bandsRisk register with ALE ranges (Low / Medium / High / Very High)Risk treatment prioritization, investment justification, insurance sizing
Quantitative (FAIR)Full Factor Analysis of Information Risk; produces annualized loss expectancy in monetary termsMonte Carlo simulation range with 10th/50th/90th percentile ALECyber insurance benchmarking, board risk committee reporting, M&A due diligence

For organizations without a mature FAIR data model, semi-quantitative is the recommended default. The enterprise-risk-assessment tool accepts --method qualitative, --method semi-quantitative, or --method fair to select the appropriate model.


DPIA Trigger Criteria

The privacy-dpia skill applies the following GDPR Article 35(3) mandatory trigger criteria. If any trigger is met, a full DPIA is legally required and must be completed before processing commences.

TriggerDescriptionAssessment RequiredSupervisory Authority Consultation
Systematic evaluation / profilingAutomated processing to evaluate personal aspects, including profiling that produces legal or similarly significant effectsFull DPIAIf residual risk remains high after mitigation
Large-scale special category dataProcessing special categories (health, biometric, racial origin, political opinion, etc.) at scaleFull DPIAIf residual risk remains high after mitigation
Systematic public area monitoringLarge-scale monitoring of publicly accessible areas (CCTV, location tracking)Full DPIAIf residual risk remains high after mitigation
Innovative technologyNew technology whose privacy impact is not yet well understoodDPIA recommendedIf residual risk remains high after mitigation
Automated decision-making with legal effectSolely automated processing producing legal or similarly significant effectsFull DPIARequired in all cases
Cross-border transfer to high-risk third countryTransfer without an adequacy decision and without standard contractual clausesTransfer Impact Assessment + DPIA if special categories involvedIf transfer involves high-risk country

The privacy-dpia tool evaluates the processing activity description against all six trigger criteria and produces a trigger verdict before proceeding to the full DPIA methodology. A negative trigger verdict (no DPIA required) is documented as a PIA record with the rationale for the negative determination.


Threat Modeling Methodology Reference

The risk-threat-modeling skill supports three structured threat modeling methodologies. Select based on the system type and the primary threat concerns.

MethodologyPrimary FocusSuitable ForKey Outputs
STRIDESpoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of PrivilegeGeneral software systems, APIs, microservices, data pipelinesThreat scenario list, per-component STRIDE matrix, mitigation register
PASTAProcess for Attack Simulation and Threat Analysis — business-impact-aligned, attacker-centricBusiness-critical applications, payment systems, high-value targetsAttack tree, business impact alignment, risk-ranked threat scenarios
LINDDUNLinkability, Identifiability, Non-repudiation, Detectability, Disclosure of information, Unawareness, Non-compliancePrivacy-sensitive systems, health data, consumer data processingPrivacy threat matrix, DFD-annotated findings, GDPR compliance implications

All three methodologies produce outputs mapped to MITRE ATT&CK techniques for integration with detection/detection-engineering coverage analysis. Threat models must be re-run when any of the following changes occur: a new trust boundary is introduced, a new data store or data flow is added, a third-party integration is modified, or a prior threat scenario's stated mitigation is removed or downgraded.


Domain Best Practices

  1. Risk heat maps require a calibrated risk appetite statement. A heat map without an explicit risk appetite boundary is decorative. Before generating a heat map with enterprise-risk-assessment, obtain a signed risk appetite statement from the board or executive risk committee. Risk scenarios that fall within appetite are tracked; those that exceed appetite require immediate treatment plan assignment.
  2. Threat models must be anchored to a specific system boundary and version. A threat model produced without a scoped data flow diagram and a system version identifier cannot be reused or updated. Every invocation of risk-threat-modeling must specify the DFD revision, the system version, and the date of the model. Generic threat models are not valid inputs to compliance or risk evidence packages.
  3. Compliance mapping is a point-in-time snapshot. A compliance map produced from a control inventory that is 90 days or older is unreliable for audit purposes. The compliance-mapping tool must be re-run within 30 days before any audit evidence submission. Control inventory inputs must be timestamped and sourced from an authoritative configuration management or GRC system.
  4. DPIA triggers are non-negotiable. Under GDPR Article 35, a DPIA is legally required before processing that is likely to result in a high risk to data subjects. The privacy-dpia skill embeds GDPR Article 35(3) trigger criteria. If the skill flags a mandatory DPIA trigger, processing must not commence until the DPIA is complete and, where required, prior consultation with the supervisory authority is obtained. This is a legal obligation, not a recommendation.
  5. Regulatory horizon outputs require a named owner for each tracked obligation. A regulatory deadline without an assigned owner is an unmanaged risk. Every obligation produced by regulatory-horizon must be assigned to a named function (Legal, CISO, CTO, DPO) within five business days of identification. Unassigned obligations are flagged as governance exceptions in the next posture score computation.
  6. Cyber insurance gap analysis must use scenario-based assessment. Coverage adequacy cannot be assessed by comparing policy limits to revenue figures alone. The cyber-insurance tool evaluates coverage against a library of incident scenarios (ransomware with business interruption, data breach with regulatory fine, SWIFT fraud, cloud outage) and identifies sublimit exposures and exclusion risks. Scenario-based assessments must be refreshed after every material change to the organization's technology footprint.
  7. Quantum readiness is a multi-year program, not a one-time assessment. The quantum-security-readiness assessment establishes a cryptographic asset inventory baseline and maps current algorithms to NIST PQC standards (FIPS 203 ML-KEM, FIPS 204 ML-DSA, FIPS 205 SLH-DSA). The output is a migration priority register, not a pass/fail verdict. Reassess annually as NIST guidance evolves and as harvest-now-decrypt-later threat intelligence develops.
  8. Internal audit evidence must meet admissibility standards. Evidence collected by internal-audit-assurance for SOC 2, ISO 27001, or FedRAMP audits must include: the control identifier, the evidence artifact, the collection timestamp, the collection method, and the name of the individual or automated process that produced the evidence. Evidence without complete provenance metadata will be rejected by external auditors as inadmissible.

Audit Evidence Standards

The internal-audit-assurance skill enforces evidence quality standards aligned to the requirements of external auditors across the supported frameworks. The following table defines the minimum metadata requirements for each evidence artifact class.

Evidence ClassRequired MetadataAdmissibility StandardFrameworks
System-generated logTimestamp, system ID, log source, hash or checksumUnaltered export with chain of custody statementSOC 2, FedRAMP, SOX
ScreenshotTimestamp visible in screenshot, URL or system path visible, preparer nameAcceptable for supplemental only; not standalone for operating effectivenessSOC 2, ISO 27001
Policy documentVersion number, approval date, approver name, effective dateMust be the version in force during the audit periodAll frameworks
Configuration exportExport timestamp, system name, tool used for export, preparer nameMust be exported directly from the authoritative system; manual transcriptions are not acceptablePCI DSS, FedRAMP, SOC 2
Interview recordInterviewee name, role, date, interviewer name, questions askedSigned by interviewee or recorded with consentISO 27001, SOC 2
Test resultTest ID, test date, tester name, expected outcome, actual outcome, pass/fail verdictMust include both expected and actual outcomesSOC 2, FedRAMP
Third-party reportReport date, issuing firm, report type (SOC 2, pen test, etc.), scope statementMust be within validity period; SOC 2 reports expire after 12 monthsAll frameworks

Evidence gaps identified by internal-audit-assurance are automatically registered in the governance domain's findings-tracker with the audit framework, the control reference, the gap description, and a 14-day default remediation deadline before audit submission.

Controls Testing Sampling Standards

For operating effectiveness testing, the internal-audit-assurance tool applies the following sample size guidance aligned to AICPA and ISO audit practice:

Population SizeMinimum Sample SizeSampling Method
1–5100% (all items)Census
6–255 itemsHaphazard selection
26–6515 itemsRandom selection
66–25025 itemsRandom selection
251+40 itemsRandom or systematic selection

For automated controls that execute identically for every transaction, one or two examples are sufficient to demonstrate design effectiveness. Operating effectiveness for automated controls is demonstrated through evidence that the control was enabled and functioning throughout the entire audit period rather than through population sampling.


Workflow Patterns

Quarterly Risk Review

A structured quarterly cadence that produces the enterprise risk posture for board consumption and feeds governance reporting.

risk-threat-modeling         (update threat models for material system changes in the quarter)
       |
       v
enterprise-risk-assessment   (aggregate risk scenarios; update heat map; check against risk appetite)
       |
       v
compliance-mapping           (refresh control-to-framework mapping; identify new gaps)
       |
       v
regulatory-horizon           (scan for new or amended regulations; update obligation register)
       |
       v
cyber-insurance              (validate coverage adequacy against current risk profile)
       |
       v
[outputs feed governance/security-posture-score and governance/ciso-brief-generator]

The quarterly risk review produces: an updated risk heat map, a control gap register by framework, a regulatory obligation register with deadlines and owners, and a coverage adequacy report. All outputs are structured JSON payloads formatted for direct consumption by governance skills.


Regulatory Gap Assessment

An event-driven workflow triggered by a new regulation, a regulatory amendment, or a notification from regulatory-horizon that a compliance deadline is within 90 days.

regulatory-horizon           (identify specific new requirements; map to affected control domains)
       |
       v
compliance-mapping           (map new requirements to existing control inventory; identify gaps)
       |
       v
enterprise-risk-assessment   (score residual risk from identified compliance gaps)
       |
       v
internal-audit-assurance     (identify evidence gaps for the new requirements)
       |
       +--> [gaps identified]     --> create remediation plan with named owners and deadlines
       |
       +--> [no gaps identified]  --> document compliance attestation; archive evidence package

If a privacy-related regulation is in scope (GDPR, CCPA, HIPAA), privacy-dpia is invoked between compliance-mapping and enterprise-risk-assessment to assess data subject risk for any new processing requirements introduced by the regulation.


Related Domains

governance/

The governance/ domain is the primary downstream consumer of risk-compliance outputs. Posture scores, compliance gap reports, and regulatory obligation registers produced in this domain feed directly into governance reporting and executive brief generation.

Key integration points:

  • risk-compliance/enterprise-risk-assessment heat maps are included in the threat-landscape section of governance/ciso-brief-generator briefs
  • risk-compliance/compliance-mapping gap registers feed governance/security-policy-control policy adequacy reviews and governance/findings-tracker for SLA assignment
  • risk-compliance/regulatory-horizon obligation registers trigger governance/security-architecture architecture reviews when new requirements impose control design changes
  • risk-compliance/quantum-security-readiness migration priority registers are surfaced in governance/ciso-brief-generator as a strategic risk section

Full domain reference: governance/CLAUDE.md

detection/

The detection/ domain provides operational finding data that informs risk quantification and compliance evidence in this domain.

Key integration points:

  • detection/attack-surface-management and detection/network-exposure findings feed risk-compliance/enterprise-risk-assessment as external exposure risk scenarios
  • detection/threat-intelligence actor attribution informs risk-compliance/risk-threat-modeling threat scenario calibration
  • detection/behavioral-analytics insider threat risk scores are consumed by risk-compliance/enterprise-risk-assessment for people-risk heat map contributions
  • Confirmed hunt findings from detection/threat-hunting register in risk-compliance/compliance-mapping as evidence of incident for frameworks requiring breach reporting (GDPR 72-hour notification, NIS2 Article 23)

Full domain reference: detection/CLAUDE.md


Path Reference

All skill paths in this domain are relative from the repository root using the convention risk-compliance/<slug>/. Sub-paths within each skill follow the standard USAP skill layout:

risk-compliance/<slug>/
  README.md          -- skill overview and quick commands
  SKILL.md           -- full skill specification and methodology
  scripts/           -- executable Python tools
  references/        -- supporting documentation
  expected_outputs/  -- representative tool outputs for validation
  assets/            -- supporting data files

To invoke any tool directly from the repository root:

python risk-compliance/<slug>/scripts/<tool>.py --help

Example invocations:

python risk-compliance/enterprise-risk-assessment/scripts/enterprise-risk-assessment_tool.py --scope enterprise --risk-appetite board-approved-2024 --output json
python risk-compliance/compliance-mapping/scripts/compliance-mapping_tool.py --frameworks gdpr,pci-dss,iso27001 --control-inventory current --output json
python risk-compliance/regulatory-horizon/scripts/regulatory-horizon_tool.py --region eu,us --sector financial --lookahead-days 180 --output json
python risk-compliance/privacy-dpia/scripts/privacy-dpia_tool.py --processing-activity customer-analytics --data-categories personal,behavioral --output json
python risk-compliance/cyber-insurance/scripts/cyber-insurance_tool.py --policy current --scenario-set ransomware,data-breach,cloud-outage --output json
python risk-compliance/quantum-security-readiness/scripts/quantum-security-readiness_tool.py --scope enterprise --nist-pqc-set fips203,fips204,fips205 --output json
python risk-compliance/internal-audit-assurance/scripts/internal-audit-assurance_tool.py --framework soc2 --control-domain security --period 2024-q4 --output json
python risk-compliance/risk-threat-modeling/scripts/risk-threat-modeling_tool.py --model payment-service-dfd-v3 --methodology stride --output json
python risk-compliance/enterprise-risk-assessment/scripts/enterprise-risk-assessment_tool.py --scope enterprise --method semi-quantitative --risk-appetite board-approved-2024 --output json

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.