iris-security-core 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. iris_security_core-0.1.0/PKG-INFO +26 -0
  2. iris_security_core-0.1.0/README.md +5 -0
  3. iris_security_core-0.1.0/iris_core/__init__.py +33 -0
  4. iris_security_core-0.1.0/iris_core/compliance/__init__.py +0 -0
  5. iris_security_core-0.1.0/iris_core/compliance/bundles/__init__.py +0 -0
  6. iris_security_core-0.1.0/iris_core/compliance/bundles/colorado_ai_act.py +162 -0
  7. iris_security_core-0.1.0/iris_core/compliance/bundles/gdpr.py +168 -0
  8. iris_security_core-0.1.0/iris_core/compliance/bundles/hipaa.py +156 -0
  9. iris_security_core-0.1.0/iris_core/compliance/bundles/soc2.py +156 -0
  10. iris_security_core-0.1.0/iris_core/compliance/license.py +144 -0
  11. iris_security_core-0.1.0/iris_core/compliance/registry.py +111 -0
  12. iris_security_core-0.1.0/iris_core/discovery/__init__.py +15 -0
  13. iris_security_core-0.1.0/iris_core/discovery/scanner.py +527 -0
  14. iris_security_core-0.1.0/iris_core/engine/__init__.py +0 -0
  15. iris_security_core-0.1.0/iris_core/engine/cedar.py +340 -0
  16. iris_security_core-0.1.0/iris_core/engine/compiler.py +283 -0
  17. iris_security_core-0.1.0/iris_core/evidence/__init__.py +0 -0
  18. iris_security_core-0.1.0/iris_core/evidence/vault.py +350 -0
  19. iris_security_core-0.1.0/iris_core/models/__init__.py +0 -0
  20. iris_security_core-0.1.0/iris_core/models/passport.py +181 -0
  21. iris_security_core-0.1.0/iris_core/models/policy.py +57 -0
  22. iris_security_core-0.1.0/iris_core/models/region.py +34 -0
  23. iris_security_core-0.1.0/iris_security_core.egg-info/PKG-INFO +26 -0
  24. iris_security_core-0.1.0/iris_security_core.egg-info/SOURCES.txt +31 -0
  25. iris_security_core-0.1.0/iris_security_core.egg-info/dependency_links.txt +1 -0
  26. iris_security_core-0.1.0/iris_security_core.egg-info/requires.txt +2 -0
  27. iris_security_core-0.1.0/iris_security_core.egg-info/top_level.txt +3 -0
  28. iris_security_core-0.1.0/pyproject.toml +38 -0
  29. iris_security_core-0.1.0/setup.cfg +4 -0
  30. iris_security_core-0.1.0/tests/test_colorado_compliance.py +213 -0
  31. iris_security_core-0.1.0/tests/test_license_gate.py +136 -0
  32. iris_security_core-0.1.0/tests/test_scanner.py +229 -0
  33. iris_security_core-0.1.0/tests/test_vault_retention.py +231 -0
@@ -0,0 +1,26 @@
1
+ Metadata-Version: 2.4
2
+ Name: iris-security-core
3
+ Version: 0.1.0
4
+ Summary: IRIS core — Cedar engine, policy models, compliance bundles
5
+ License: Apache-2.0
6
+ Project-URL: Homepage, https://github.com/gimartinb/iris-sdk
7
+ Project-URL: Repository, https://github.com/gimartinb/iris-sdk
8
+ Keywords: ai-governance,ai-agents,cedar-policy,compliance
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Topic :: Security
12
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Requires-Python: >=3.10
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: pyyaml>=6.0
20
+ Requires-Dist: pydantic>=2.0
21
+
22
+ # iris-core
23
+
24
+ IRIS core — Cedar engine, policy models, compliance bundles.
25
+
26
+ Part of the [IRIS SDK](https://github.com/gimartinb/iris-sdk).
@@ -0,0 +1,5 @@
1
+ # iris-core
2
+
3
+ IRIS core — Cedar engine, policy models, compliance bundles.
4
+
5
+ Part of the [IRIS SDK](https://github.com/gimartinb/iris-sdk).
@@ -0,0 +1,33 @@
1
+ """
2
+ iris-core: shared Cedar evaluation engine, policy types, and CRD schemas.
3
+ This package is the foundation for all IRIS SDKs and runs fully local.
4
+ No network access required. Cedar evaluation is in-process.
5
+ """
6
+
7
+ # ── Package version ────────────────────────────────────────────────────────────
8
+ __version__ = "0.1.0"
9
+
10
+ # ── Public API ─────────────────────────────────────────────────────────────────
11
+ from iris_core.models.passport import AgentPassport, DataClassification, Environment
12
+ from iris_core.models.policy import PolicyResult, Violation, Severity
13
+ from iris_core.models.region import RegionPolicy, EndpointRegionMap, TransferRule
14
+ from iris_core.engine.cedar import CedarEngine
15
+ from iris_core.engine.compiler import PolicyCompiler
16
+ from iris_core.compliance.registry import ComplianceRegistry
17
+ from iris_core.evidence.vault import EvidenceVault
18
+
19
+ __all__ = [
20
+ "AgentPassport",
21
+ "DataClassification",
22
+ "Environment",
23
+ "PolicyResult",
24
+ "Violation",
25
+ "Severity",
26
+ "RegionPolicy",
27
+ "EndpointRegionMap",
28
+ "TransferRule",
29
+ "CedarEngine",
30
+ "PolicyCompiler",
31
+ "ComplianceRegistry",
32
+ "EvidenceVault",
33
+ ]
@@ -0,0 +1,162 @@
1
+ """
2
+ Colorado AI Act (SB 24-205) Compliance Bundle.
3
+ Effective: July 1, 2026.
4
+
5
+ This is the IRIS launch headline compliance bundle. Colorado SB 24-205
6
+ is the first US state law specifically governing high-risk AI systems.
7
+ IRIS is the first developer tool that ships Colorado AI Act compliance
8
+ out of the box.
9
+
10
+ Key obligations for high-risk AI developers:
11
+ 1. Inventory: know what high-risk AI systems you are deploying
12
+ → Satisfied by: AgentPassport with is_high_risk_ai=True
13
+ 2. Impact assessment: assess risk before deployment
14
+ → Satisfied by: Evidence Vault impact assessment entry
15
+ 3. Transparency: disclose AI use to affected consumers
16
+ → Satisfied by: policy-intent.md transparency disclosure
17
+ 4. Opt-out: allow consumers to opt out of consequential decisions
18
+ → Satisfied by: user_consent_logged context field
19
+ 5. Non-discrimination: AI must not discriminate on protected characteristics
20
+ → Satisfied by: Dynamic Guardrail Engine (Phase 2)
21
+ 6. Annual review: high-risk systems must be reviewed annually
22
+ → Satisfied by: Evidence Vault review schedule
23
+
24
+ What counts as "high-risk" under the Act:
25
+ - Consequential decisions in: education, employment, financial services,
26
+ government, healthcare, housing, insurance, legal services
27
+ - Systems that make or substantially assist in decisions affecting these domains
28
+ """
29
+
30
+ from __future__ import annotations
31
+ from typing import List, Dict, Any
32
+
33
+
34
+ COLORADO_AI_ACT_RULES: Dict[str, Any] = {
35
+ "bundle_id": "colorado-ai-act",
36
+ "full_name": "Colorado AI Act (SB 24-205)",
37
+ "effective_date": "2026-07-01",
38
+ "jurisdiction": "Colorado, USA",
39
+ "iris_version": "0.1.0",
40
+ "rules": [
41
+ {
42
+ "rule_id": "CO-001",
43
+ "name": "High-risk AI inventory",
44
+ "severity": "CRITICAL",
45
+ "description": (
46
+ "Developers of high-risk AI systems must maintain an inventory "
47
+ "of all deployed systems."
48
+ ),
49
+ "iris_control": "AgentPassport.is_high_risk_ai = True",
50
+ "how_iris_satisfies": (
51
+ "Every agent with is_high_risk_ai=True is automatically inventoried "
52
+ "in the IRIS agent registry with full provenance."
53
+ ),
54
+ "check": "passport.is_high_risk_ai == True and passport.agent_id is not None",
55
+ },
56
+ {
57
+ "rule_id": "CO-002",
58
+ "name": "Impact assessment required",
59
+ "severity": "CRITICAL",
60
+ "description": (
61
+ "High-risk AI systems must have a completed impact assessment "
62
+ "before production deployment."
63
+ ),
64
+ "iris_control": "EvidenceVault.impact_assessment entry",
65
+ "how_iris_satisfies": (
66
+ "IRIS generates and records impact assessments in the Evidence Vault. "
67
+ "Production deployment is blocked until the assessment is complete."
68
+ ),
69
+ "check": "passport.evidence_vault_id is not None",
70
+ },
71
+ {
72
+ "rule_id": "CO-003",
73
+ "name": "Transparency disclosure",
74
+ "severity": "HIGH",
75
+ "description": (
76
+ "Consumers must be informed when AI systems make or substantially "
77
+ "assist in consequential decisions affecting them."
78
+ ),
79
+ "iris_control": "policy-intent.md transparency disclosure",
80
+ "how_iris_satisfies": (
81
+ "IRIS auto-generates a policy-intent.md for every agent that serves "
82
+ "as the Colorado AI Act transparency disclosure. "
83
+ "It is committed to the GitOps repo and versioned."
84
+ ),
85
+ "check": "passport.intent_ref is not None",
86
+ },
87
+ {
88
+ "rule_id": "CO-004",
89
+ "name": "Consumer opt-out",
90
+ "severity": "HIGH",
91
+ "description": (
92
+ "Consumers must be able to opt out of consequential AI decisions "
93
+ "and request human review."
94
+ ),
95
+ "iris_control": "context.user_consent_logged = True + HITL gate",
96
+ "how_iris_satisfies": (
97
+ "IRIS enforces user_consent_logged context for agents handling "
98
+ "consequential decisions. The HITL gate provides the human review path."
99
+ ),
100
+ "check": "context.user_consent_logged == True for consequential actions",
101
+ },
102
+ {
103
+ "rule_id": "CO-005",
104
+ "name": "Non-discrimination",
105
+ "severity": "CRITICAL",
106
+ "description": (
107
+ "High-risk AI systems must not discriminate against consumers "
108
+ "based on protected characteristics."
109
+ ),
110
+ "iris_control": "Dynamic Guardrail Engine (Phase 2)",
111
+ "how_iris_satisfies": (
112
+ "Phase 2: IRIS Dynamic Guardrail Engine monitors agent outputs "
113
+ "for discriminatory patterns and blocks non-compliant responses."
114
+ ),
115
+ "check": "dynamic_guardrail.discrimination_check == PASS",
116
+ "phase": 2,
117
+ },
118
+ {
119
+ "rule_id": "CO-006",
120
+ "name": "Annual review",
121
+ "severity": "MEDIUM",
122
+ "description": (
123
+ "High-risk AI systems must be reviewed and re-assessed annually."
124
+ ),
125
+ "iris_control": "EvidenceVault.review_schedule",
126
+ "how_iris_satisfies": (
127
+ "IRIS tracks the last_reviewed_at date on the AgentPassport and "
128
+ "alerts the security engineer when an annual review is due."
129
+ ),
130
+ "check": "passport.last_reviewed_at within 365 days",
131
+ },
132
+ ],
133
+ "high_risk_domains": [
134
+ "education",
135
+ "employment",
136
+ "financial_services",
137
+ "government",
138
+ "healthcare",
139
+ "housing",
140
+ "insurance",
141
+ "legal_services",
142
+ ],
143
+ "iris_coverage": {
144
+ "phase_1": ["CO-001", "CO-002", "CO-003", "CO-004", "CO-006"],
145
+ "phase_2": ["CO-005"],
146
+ "coverage_percent_phase_1": 83,
147
+ "coverage_percent_phase_2": 100,
148
+ }
149
+ }
150
+
151
+
152
+ def get_colorado_rules() -> Dict[str, Any]:
153
+ return COLORADO_AI_ACT_RULES
154
+
155
+
156
+ def get_phase_1_rules() -> List[Dict[str, Any]]:
157
+ phase_1_ids = COLORADO_AI_ACT_RULES["iris_coverage"]["phase_1"]
158
+ return [r for r in COLORADO_AI_ACT_RULES["rules"] if r["rule_id"] in phase_1_ids]
159
+
160
+
161
+ def is_high_risk_domain(domain: str) -> bool:
162
+ return domain.lower().replace(" ", "_") in COLORADO_AI_ACT_RULES["high_risk_domains"]
@@ -0,0 +1,168 @@
1
+ """
2
+ GDPR compliance bundle — full rule set (IRIS Pro).
3
+
4
+ General Data Protection Regulation (EU) 2016/679.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from typing import Any, Dict, List
10
+
11
+ from iris_core.compliance.license import require_license
12
+ from iris_core.models.passport import AgentPassport
13
+ from iris_core.models.policy import Severity, Violation
14
+
15
+
16
+ GDPR_RULES: List[Dict[str, Any]] = [
17
+ {
18
+ "rule_id": "GDPR-001",
19
+ "name": "Lawful basis for processing",
20
+ "severity": "CRITICAL",
21
+ "description": (
22
+ "Personal data processing requires a lawful basis such as "
23
+ "consent or legitimate interest."
24
+ ),
25
+ "iris_control": "context.user_consent_logged + passport.consent_basis",
26
+ "how_iris_satisfies": (
27
+ "IRIS enforces user_consent_logged for consequential processing and "
28
+ "records the declared lawful basis on the AgentPassport."
29
+ ),
30
+ "check": "context.user_consent_logged == True or passport.consent_basis is declared",
31
+ "article_reference": "Article 6",
32
+ },
33
+ {
34
+ "rule_id": "GDPR-002",
35
+ "name": "Data minimization",
36
+ "severity": "HIGH",
37
+ "description": "Only collect and process personal data that is necessary.",
38
+ "iris_control": "ToolPermission.data_classifications_allowed",
39
+ "how_iris_satisfies": (
40
+ "IRIS scopes tool permissions to declared data classifications "
41
+ "and blocks undeclared data access at runtime."
42
+ ),
43
+ "check": "len(passport.tool_permissions) > 0 and all tools have scoped classifications",
44
+ "article_reference": "Article 5(1)(c)",
45
+ },
46
+ {
47
+ "rule_id": "GDPR-003",
48
+ "name": "Purpose limitation",
49
+ "severity": "HIGH",
50
+ "description": "Data must be used only for the declared processing purpose.",
51
+ "iris_control": "policy-intent.md processing purpose",
52
+ "how_iris_satisfies": (
53
+ "IRIS binds policy-intent.md as the declared purpose and flags Cedar "
54
+ "drift when runtime actions exceed that purpose."
55
+ ),
56
+ "check": "passport.intent_ref is not None",
57
+ "article_reference": "Article 5(1)(b)",
58
+ },
59
+ {
60
+ "rule_id": "GDPR-004",
61
+ "name": "Storage limitation",
62
+ "severity": "MEDIUM",
63
+ "description": "A retention period must be declared for personal data.",
64
+ "iris_control": "EvidenceVault.retention_policy",
65
+ "how_iris_satisfies": (
66
+ "IRIS requires a retention policy entry in the Evidence Vault before "
67
+ "production deployment for agents processing personal data."
68
+ ),
69
+ "check": "passport.evidence_vault_id is not None",
70
+ "article_reference": "Article 5(1)(e)",
71
+ },
72
+ {
73
+ "rule_id": "GDPR-005",
74
+ "name": "Cross-border transfer restrictions",
75
+ "severity": "CRITICAL",
76
+ "description": (
77
+ "Transfers of personal data outside the EU require adequacy, SCCs, "
78
+ "or another Chapter 5 mechanism."
79
+ ),
80
+ "iris_control": "RegionPolicy.restricted_transfers",
81
+ "how_iris_satisfies": (
82
+ "IRIS RegionPolicy blocks EU→China and EU→non-adequacy destinations; "
83
+ "allows EU→US (SCCs), EU→UK, EU→Canada."
84
+ ),
85
+ "check": "cross_region_transfer complies with adequacy/SCC rules",
86
+ "article_reference": "Chapter V (Articles 44–49)",
87
+ "restricted_transfers": ["EU→China", "EU→non-adequacy"],
88
+ "allowed_transfers": ["EU→US (SCCs)", "EU→UK", "EU→Canada"],
89
+ },
90
+ {
91
+ "rule_id": "GDPR-006",
92
+ "name": "Right to erasure",
93
+ "severity": "HIGH",
94
+ "description": "Agents must support data deletion requests (right to be forgotten).",
95
+ "iris_control": "AgentPassport.supports_data_deletion",
96
+ "how_iris_satisfies": (
97
+ "IRIS requires agents handling personal data to declare deletion "
98
+ "capability and routes erasure requests through the Evidence Vault."
99
+ ),
100
+ "check": "passport supports data deletion workflow",
101
+ "article_reference": "Article 17",
102
+ },
103
+ {
104
+ "rule_id": "GDPR-007",
105
+ "name": "Data breach notification",
106
+ "severity": "CRITICAL",
107
+ "description": "An incident response plan is required for personal data breaches.",
108
+ "iris_control": "EvidenceVault.incident_response_plan",
109
+ "how_iris_satisfies": (
110
+ "IRIS links each governed agent to an incident response plan in the "
111
+ "Evidence Vault and alerts on breach indicators."
112
+ ),
113
+ "check": "passport.evidence_vault_id is not None",
114
+ "article_reference": "Articles 33–34",
115
+ },
116
+ {
117
+ "rule_id": "GDPR-008",
118
+ "name": "Privacy by design",
119
+ "severity": "HIGH",
120
+ "description": "Data classification must be declared before processing personal data.",
121
+ "iris_control": "AgentPassport.data_classification",
122
+ "how_iris_satisfies": (
123
+ "IRIS requires an explicit data_classification on every AgentPassport "
124
+ "and enforces classification-appropriate controls at runtime."
125
+ ),
126
+ "check": "passport.data_classification is declared (not default-only for PII agents)",
127
+ "article_reference": "Article 25",
128
+ },
129
+ ]
130
+
131
+ GDPR_BUNDLE: Dict[str, Any] = {
132
+ "bundle_id": "gdpr",
133
+ "full_name": "General Data Protection Regulation (GDPR)",
134
+ "jurisdiction": "European Union",
135
+ "iris_version": "0.1.0",
136
+ "rules": GDPR_RULES,
137
+ }
138
+
139
+
140
+ def get_gdpr_rules() -> Dict[str, Any]:
141
+ require_license("gdpr")
142
+ return GDPR_BUNDLE
143
+
144
+
145
+ def check_gdpr_passport(passport: AgentPassport) -> List[Violation]:
146
+ """Runtime passport checks for GDPR rules (Phase 1)."""
147
+ violations: List[Violation] = []
148
+ if passport.intent_ref is None:
149
+ violations.append(
150
+ Violation(
151
+ rule_id="GDPR-003",
152
+ severity=Severity.HIGH,
153
+ message=f"Agent '{passport.name}' has no declared processing purpose (policy-intent.md).",
154
+ compliance_refs=["gdpr:article-5-purpose-limitation"],
155
+ remediation=f"Run: iris policy compile --agent {passport.name}",
156
+ )
157
+ )
158
+ if passport.evidence_vault_id is None:
159
+ violations.append(
160
+ Violation(
161
+ rule_id="GDPR-004",
162
+ severity=Severity.MEDIUM,
163
+ message=f"Agent '{passport.name}' has no retention policy in the Evidence Vault.",
164
+ compliance_refs=["gdpr:article-5-storage-limitation"],
165
+ remediation=f"Run: iris evidence init --agent {passport.name}",
166
+ )
167
+ )
168
+ return violations
@@ -0,0 +1,156 @@
1
+ """
2
+ HIPAA compliance bundle — full rule set (IRIS Pro).
3
+
4
+ Health Insurance Portability and Accountability Act (US).
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from typing import Any, Dict, List
10
+
11
+ from iris_core.compliance.license import require_license
12
+ from iris_core.models.passport import AgentPassport, DataClassification
13
+ from iris_core.models.policy import Severity, Violation
14
+
15
+
16
+ HIPAA_RULES: List[Dict[str, Any]] = [
17
+ {
18
+ "rule_id": "HIPAA-001",
19
+ "name": "PHI access controls",
20
+ "severity": "CRITICAL",
21
+ "description": "Only authorized agents may access protected health information (PHI).",
22
+ "iris_control": "AgentPassport.tool_permissions + data_classification=phi",
23
+ "how_iris_satisfies": (
24
+ "IRIS blocks any agent without PHI classification and declared tool "
25
+ "permissions from accessing PHI-classified resources."
26
+ ),
27
+ "check": "passport.data_classification == phi and tool_permissions declared",
28
+ "article_reference": "45 CFR §164.312(a)(1)",
29
+ },
30
+ {
31
+ "rule_id": "HIPAA-002",
32
+ "name": "Audit controls",
33
+ "severity": "CRITICAL",
34
+ "description": "All PHI access must be logged.",
35
+ "iris_control": "EvidenceVault.audit_log",
36
+ "how_iris_satisfies": (
37
+ "IRIS records every PHI access attempt in the Evidence Vault audit trail "
38
+ "with agent identity, action, and timestamp."
39
+ ),
40
+ "check": "passport.evidence_vault_id is not None",
41
+ "article_reference": "45 CFR §164.312(b)",
42
+ },
43
+ {
44
+ "rule_id": "HIPAA-003",
45
+ "name": "Transmission security",
46
+ "severity": "CRITICAL",
47
+ "description": "PHI must not leave approved geographic regions.",
48
+ "iris_control": "RegionPolicy + passport.allowed_regions",
49
+ "how_iris_satisfies": (
50
+ "IRIS RegionPolicy enforces approved regions for PHI and blocks "
51
+ "cross-region transfers outside the declared allowlist."
52
+ ),
53
+ "check": "destination_region in passport.allowed_regions",
54
+ "article_reference": "45 CFR §164.312(e)(1)",
55
+ },
56
+ {
57
+ "rule_id": "HIPAA-004",
58
+ "name": "Minimum necessary",
59
+ "severity": "HIGH",
60
+ "description": "Agents may access only the minimum PHI required for the task.",
61
+ "iris_control": "ToolPermission.allowed_actions scoped to minimum",
62
+ "how_iris_satisfies": (
63
+ "IRIS enforces least-privilege tool permissions so agents cannot "
64
+ "access PHI fields beyond their declared scope."
65
+ ),
66
+ "check": "len(passport.tool_permissions) > 0",
67
+ "article_reference": "45 CFR §164.502(b)",
68
+ },
69
+ {
70
+ "rule_id": "HIPAA-005",
71
+ "name": "Business Associate Agreement",
72
+ "severity": "CRITICAL",
73
+ "description": "A BAA is required for any processor handling PHI on your behalf.",
74
+ "iris_control": "EvidenceVault.baa_on_file",
75
+ "how_iris_satisfies": (
76
+ "IRIS tracks BAA status in the Evidence Vault and blocks production "
77
+ "deployment until a signed BAA is recorded for PHI processors."
78
+ ),
79
+ "check": "passport.evidence_vault_id is not None",
80
+ "article_reference": "45 CFR §164.502(e)",
81
+ },
82
+ {
83
+ "rule_id": "HIPAA-006",
84
+ "name": "Breach notification",
85
+ "severity": "CRITICAL",
86
+ "description": "PHI breaches must be reported within 60 days.",
87
+ "iris_control": "EvidenceVault.breach_notification_plan",
88
+ "how_iris_satisfies": (
89
+ "IRIS links PHI agents to a breach notification plan and triggers "
90
+ "alerts when breach indicators are detected."
91
+ ),
92
+ "check": "passport.evidence_vault_id is not None",
93
+ "article_reference": "45 CFR §164.410",
94
+ },
95
+ {
96
+ "rule_id": "HIPAA-007",
97
+ "name": "De-identification",
98
+ "severity": "HIGH",
99
+ "description": "PHI must be de-identified when full identifiers are not required.",
100
+ "iris_control": "policy de-identification requirement in policy-intent.md",
101
+ "how_iris_satisfies": (
102
+ "IRIS policy compiler flags intents that retain full PHI identifiers "
103
+ "when de-identified data would suffice."
104
+ ),
105
+ "check": "passport.intent_ref is not None",
106
+ "article_reference": "45 CFR §164.514",
107
+ },
108
+ ]
109
+
110
+ HIPAA_BUNDLE: Dict[str, Any] = {
111
+ "bundle_id": "hipaa",
112
+ "full_name": "HIPAA Security & Privacy Rule",
113
+ "jurisdiction": "United States",
114
+ "iris_version": "0.1.0",
115
+ "rules": HIPAA_RULES,
116
+ }
117
+
118
+
119
+ def get_hipaa_rules() -> Dict[str, Any]:
120
+ require_license("hipaa")
121
+ return HIPAA_BUNDLE
122
+
123
+
124
+ def check_hipaa_passport(passport: AgentPassport) -> List[Violation]:
125
+ violations: List[Violation] = []
126
+ if passport.data_classification != DataClassification.PHI:
127
+ violations.append(
128
+ Violation(
129
+ rule_id="HIPAA-001",
130
+ severity=Severity.CRITICAL,
131
+ message=f"Agent '{passport.name}' handles health data but is not classified as PHI.",
132
+ compliance_refs=["hipaa:164.312-access-control"],
133
+ remediation="Set data_classification: phi on passport.yaml",
134
+ )
135
+ )
136
+ if passport.evidence_vault_id is None:
137
+ violations.append(
138
+ Violation(
139
+ rule_id="HIPAA-002",
140
+ severity=Severity.CRITICAL,
141
+ message=f"Agent '{passport.name}' has no audit log (Evidence Vault).",
142
+ compliance_refs=["hipaa:164.312-audit"],
143
+ remediation=f"Run: iris evidence init --agent {passport.name}",
144
+ )
145
+ )
146
+ if not passport.tool_permissions:
147
+ violations.append(
148
+ Violation(
149
+ rule_id="HIPAA-004",
150
+ severity=Severity.HIGH,
151
+ message=f"Agent '{passport.name}' has no minimum-necessary tool permissions declared.",
152
+ compliance_refs=["hipaa:164.502-minimum-necessary"],
153
+ remediation="Declare tool_permissions in passport.yaml",
154
+ )
155
+ )
156
+ return violations