@blamejs/exceptd-skills 0.9.1

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 (136) hide show
  1. package/AGENTS.md +232 -0
  2. package/ARCHITECTURE.md +267 -0
  3. package/CHANGELOG.md +616 -0
  4. package/CONTEXT.md +203 -0
  5. package/LICENSE +200 -0
  6. package/NOTICE +82 -0
  7. package/README.md +307 -0
  8. package/SECURITY.md +73 -0
  9. package/agents/README.md +81 -0
  10. package/agents/report-generator.md +156 -0
  11. package/agents/skill-updater.md +102 -0
  12. package/agents/source-validator.md +119 -0
  13. package/agents/threat-researcher.md +149 -0
  14. package/bin/exceptd.js +183 -0
  15. package/data/_indexes/_meta.json +88 -0
  16. package/data/_indexes/activity-feed.json +362 -0
  17. package/data/_indexes/catalog-summaries.json +229 -0
  18. package/data/_indexes/chains.json +7135 -0
  19. package/data/_indexes/currency.json +359 -0
  20. package/data/_indexes/did-ladders.json +451 -0
  21. package/data/_indexes/frequency.json +2072 -0
  22. package/data/_indexes/handoff-dag.json +476 -0
  23. package/data/_indexes/jurisdiction-clocks.json +967 -0
  24. package/data/_indexes/jurisdiction-map.json +536 -0
  25. package/data/_indexes/recipes.json +319 -0
  26. package/data/_indexes/section-offsets.json +3656 -0
  27. package/data/_indexes/stale-content.json +14 -0
  28. package/data/_indexes/summary-cards.json +1736 -0
  29. package/data/_indexes/theater-fingerprints.json +381 -0
  30. package/data/_indexes/token-budget.json +2137 -0
  31. package/data/_indexes/trigger-table.json +1374 -0
  32. package/data/_indexes/xref.json +818 -0
  33. package/data/atlas-ttps.json +282 -0
  34. package/data/cve-catalog.json +496 -0
  35. package/data/cwe-catalog.json +1017 -0
  36. package/data/d3fend-catalog.json +738 -0
  37. package/data/dlp-controls.json +1039 -0
  38. package/data/exploit-availability.json +67 -0
  39. package/data/framework-control-gaps.json +1255 -0
  40. package/data/global-frameworks.json +2913 -0
  41. package/data/rfc-references.json +324 -0
  42. package/data/zeroday-lessons.json +377 -0
  43. package/keys/public.pem +3 -0
  44. package/lib/framework-gap.js +328 -0
  45. package/lib/job-queue.js +195 -0
  46. package/lib/lint-skills.js +536 -0
  47. package/lib/prefetch.js +372 -0
  48. package/lib/refresh-external.js +713 -0
  49. package/lib/schemas/cve-catalog.schema.json +151 -0
  50. package/lib/schemas/manifest.schema.json +106 -0
  51. package/lib/schemas/skill-frontmatter.schema.json +113 -0
  52. package/lib/scoring.js +149 -0
  53. package/lib/sign.js +197 -0
  54. package/lib/ttp-mapper.js +80 -0
  55. package/lib/validate-catalog-meta.js +198 -0
  56. package/lib/validate-cve-catalog.js +213 -0
  57. package/lib/validate-indexes.js +83 -0
  58. package/lib/validate-package.js +162 -0
  59. package/lib/validate-vendor.js +85 -0
  60. package/lib/verify.js +216 -0
  61. package/lib/worker-pool.js +84 -0
  62. package/manifest-snapshot.json +1833 -0
  63. package/manifest.json +2108 -0
  64. package/orchestrator/README.md +124 -0
  65. package/orchestrator/dispatcher.js +140 -0
  66. package/orchestrator/event-bus.js +146 -0
  67. package/orchestrator/index.js +874 -0
  68. package/orchestrator/pipeline.js +201 -0
  69. package/orchestrator/scanner.js +327 -0
  70. package/orchestrator/scheduler.js +137 -0
  71. package/package.json +113 -0
  72. package/sbom.cdx.json +158 -0
  73. package/scripts/audit-cross-skill.js +261 -0
  74. package/scripts/audit-perf.js +160 -0
  75. package/scripts/bootstrap.js +205 -0
  76. package/scripts/build-indexes.js +721 -0
  77. package/scripts/builders/activity-feed.js +79 -0
  78. package/scripts/builders/catalog-summaries.js +67 -0
  79. package/scripts/builders/currency.js +109 -0
  80. package/scripts/builders/cwe-chains.js +105 -0
  81. package/scripts/builders/did-ladders.js +149 -0
  82. package/scripts/builders/frequency.js +89 -0
  83. package/scripts/builders/jurisdiction-clocks.js +126 -0
  84. package/scripts/builders/recipes.js +159 -0
  85. package/scripts/builders/section-offsets.js +162 -0
  86. package/scripts/builders/stale-content.js +171 -0
  87. package/scripts/builders/summary-cards.js +166 -0
  88. package/scripts/builders/theater-fingerprints.js +198 -0
  89. package/scripts/builders/token-budget.js +96 -0
  90. package/scripts/check-manifest-snapshot.js +217 -0
  91. package/scripts/predeploy.js +267 -0
  92. package/scripts/refresh-manifest-snapshot.js +57 -0
  93. package/scripts/refresh-sbom.js +222 -0
  94. package/skills/age-gates-child-safety/skill.md +456 -0
  95. package/skills/ai-attack-surface/skill.md +282 -0
  96. package/skills/ai-c2-detection/skill.md +440 -0
  97. package/skills/ai-risk-management/skill.md +311 -0
  98. package/skills/api-security/skill.md +287 -0
  99. package/skills/attack-surface-pentest/skill.md +381 -0
  100. package/skills/cloud-security/skill.md +384 -0
  101. package/skills/compliance-theater/skill.md +365 -0
  102. package/skills/container-runtime-security/skill.md +379 -0
  103. package/skills/coordinated-vuln-disclosure/skill.md +473 -0
  104. package/skills/defensive-countermeasure-mapping/skill.md +300 -0
  105. package/skills/dlp-gap-analysis/skill.md +337 -0
  106. package/skills/email-security-anti-phishing/skill.md +206 -0
  107. package/skills/exploit-scoring/skill.md +331 -0
  108. package/skills/framework-gap-analysis/skill.md +374 -0
  109. package/skills/fuzz-testing-strategy/skill.md +313 -0
  110. package/skills/global-grc/skill.md +564 -0
  111. package/skills/identity-assurance/skill.md +272 -0
  112. package/skills/incident-response-playbook/skill.md +546 -0
  113. package/skills/kernel-lpe-triage/skill.md +303 -0
  114. package/skills/mcp-agent-trust/skill.md +326 -0
  115. package/skills/mlops-security/skill.md +325 -0
  116. package/skills/ot-ics-security/skill.md +340 -0
  117. package/skills/policy-exception-gen/skill.md +437 -0
  118. package/skills/pqc-first/skill.md +546 -0
  119. package/skills/rag-pipeline-security/skill.md +294 -0
  120. package/skills/researcher/skill.md +310 -0
  121. package/skills/sector-energy/skill.md +409 -0
  122. package/skills/sector-federal-government/skill.md +302 -0
  123. package/skills/sector-financial/skill.md +398 -0
  124. package/skills/sector-healthcare/skill.md +373 -0
  125. package/skills/security-maturity-tiers/skill.md +464 -0
  126. package/skills/skill-update-loop/skill.md +463 -0
  127. package/skills/supply-chain-integrity/skill.md +318 -0
  128. package/skills/threat-model-currency/skill.md +404 -0
  129. package/skills/threat-modeling-methodology/skill.md +312 -0
  130. package/skills/webapp-security/skill.md +281 -0
  131. package/skills/zeroday-gap-learn/skill.md +350 -0
  132. package/vendor/blamejs/LICENSE +201 -0
  133. package/vendor/blamejs/README.md +54 -0
  134. package/vendor/blamejs/_PROVENANCE.json +54 -0
  135. package/vendor/blamejs/retry.js +335 -0
  136. package/vendor/blamejs/worker-pool.js +418 -0
@@ -0,0 +1,272 @@
1
+ ---
2
+ name: identity-assurance
3
+ version: "1.0.0"
4
+ description: Identity assurance for mid-2026 — NIST 800-63 AAL/IAL/FAL, FIDO2/WebAuthn passkeys, OIDC/SAML/SCIM, agent-as-principal identity, short-lived workload tokens, OAuth 2.0 + RFC 9700 BCP
5
+ triggers:
6
+ - identity assurance
7
+ - aal
8
+ - ial
9
+ - fal
10
+ - nist 800-63
11
+ - fido2
12
+ - webauthn
13
+ - passkey
14
+ - oidc
15
+ - saml
16
+ - scim
17
+ - agent identity
18
+ - workload identity
19
+ - service account
20
+ - federation
21
+ - phishing-resistant
22
+ data_deps:
23
+ - cve-catalog.json
24
+ - atlas-ttps.json
25
+ - framework-control-gaps.json
26
+ - cwe-catalog.json
27
+ - d3fend-catalog.json
28
+ - rfc-references.json
29
+ atlas_refs:
30
+ - AML.T0051
31
+ attack_refs:
32
+ - T1078
33
+ - T1556
34
+ - T1110
35
+ framework_gaps:
36
+ - NIST-800-63B-rev4
37
+ - NIST-800-53-AC-2
38
+ - ISO-27001-2022-A.8.30
39
+ - SOC2-CC6-logical-access
40
+ - PSD2-RTS-SCA
41
+ rfc_refs:
42
+ - RFC-7519
43
+ - RFC-8725
44
+ - RFC-6749
45
+ - RFC-9700
46
+ - RFC-8032
47
+ cwe_refs:
48
+ - CWE-269
49
+ - CWE-287
50
+ - CWE-306
51
+ - CWE-732
52
+ - CWE-798
53
+ - CWE-862
54
+ - CWE-863
55
+ d3fend_refs: []
56
+ last_threat_review: "2026-05-11"
57
+ ---
58
+
59
+ # Identity Assurance Assessment
60
+
61
+ ## Threat Context (mid-2026)
62
+
63
+ Identity is the new perimeter, and the perimeter expanded. The 2026 principal population is no longer "humans + service accounts" — it now includes AI agents acting on behalf of users, MCP servers exchanging short-lived tokens, and ephemeral workload identities minted per function invocation. Each of these is a principal that authenticates, holds scopes, and shows up in audit logs — and each was outside the design envelope of every identity standard in production use before NIST 800-63 rev 4 (Q4 2025).
64
+
65
+ **Agent-as-principal is operational reality.** When an AI coding assistant calls an MCP tool, it does so under the IDE user's OAuth session by default. The agent inherits the user's scopes wholesale — not because anyone designed it that way, but because no current identity standard defines an agent-as-principal model. CVE-2026-30615 (Windsurf MCP zero-interaction RCE, CVSS 9.8) hinged in part on this implicit inheritance: tool calls executed under the IDE user's privileges with no separate authentication challenge for the agent's actions. The principal who authenticated (the human) is not the principal who took the action (the agent), and the audit trail does not distinguish them.
66
+
67
+ **Phishing-resistant authentication is now table-stakes.** FIDO2 / WebAuthn synced passkeys are the only widely deployed authenticator class that survives credential phishing, AiTM proxy phishing (evilginx-class), and push-notification fatigue attacks. Orgs still standing on TOTP / SMS / push-MFA in 2026 are shipping password-equivalent risk forward, and the framework gap analysis must say so. AI-assisted phishing kit development means the time-to-weaponize a new bypass technique is hours, not weeks (per DR-5: AI acceleration is current operational reality, not a future consideration).
68
+
69
+ **Workload identity is short-lived or it is broken.** Static service-account keys and long-lived OAuth refresh tokens are credential-theft jackpots. RFC 9700 (OAuth 2.0 Security Best Current Practice, January 2025) replaces the original RFC 6749 threat model and assumes short-lived access tokens, sender-constrained tokens (DPoP / mTLS), and rotated refresh tokens. Skills that cite RFC 6749 without RFC 9700 are citing the wrong threat model.
70
+
71
+ **Federation is the blast radius.** A single OIDC / SAML IdP compromise reaches every downstream SaaS. The SaaS-vs-IdP authority question — who is the source of truth for "this user has access" — must be answered explicitly. If a SaaS app silently provisions users on first-login without SCIM, the IdP is not actually the authority and offboarding is theater.
72
+
73
+ ---
74
+
75
+ ## Framework Lag Declaration
76
+
77
+ | Framework | Control | Why It Fails in mid-2026 |
78
+ |---|---|---|
79
+ | NIST 800-63B rev 4 (Q4 2025) | AAL / IAL / FAL definitions | rev 4 modernises authenticator types (passkey-first, phishing-resistance explicit at AAL3) and updates remote IAL2 proofing. It does **not** operationalise agent-as-principal identity: the model assumes a human subscriber holds an authenticator. An AI agent acting under a user's session is neither a subscriber nor a separate principal in 800-63 rev 4's vocabulary. Tracked in `data/framework-control-gaps.json` as NIST-800-63B-rev4. |
80
+ | NIST 800-53 | AC-2 (Account Management) | AC-2 enumerates account types (individual, group, service, system) but has no category for agent-mediated principals. Audit-log requirements assume the principal in the log is the principal that took the action — false when an AI agent acts on a user's session. |
81
+ | NIST 800-207 | Zero Trust Architecture | ZTA assumes subject = device + user. The "AI agent as subject" case is not in the published model; current ZTA deployments treat agent traffic as user traffic and miss the privilege step-up requirement. |
82
+ | ISO 27001:2022 | A.8.30 (Outsourced development) and A.5.16 (Identity management) | A.5.16 covers human and "automated entities" identity lifecycle but is silent on agent SDKs that act with user-bound tokens. A.8.30 was already flagged as silent on MCP-class tool providers; the same gap applies to agent identity. |
83
+ | SOC 2 | CC6 (Logical Access) | CC6.1 / CC6.2 / CC6.3 assume a human-or-service-account access model. Auditor evidence templates do not distinguish "user logged in" from "agent acted under user's token". Paper-MFA passes the auditor without phishing-resistance scrutiny. |
84
+ | EU NIS2 | Article 21(2)(g)-(j) — access management, MFA, secure authentication | Mandates "appropriate access management" and "use of multi-factor authentication where appropriate" without specifying AAL targets, phishing-resistance, or agent-principal scope. National transpositions vary; EU-CyCLONe coordination cases in 2025 cited identity controls as the most-divergent area. |
85
+ | EU DORA | RTS on ICT risk management, identity & access | Financial-entity scope. Mandates strong authentication for privileged access but defines it in terms of multi-factor, not phishing-resistance. AI-agent access to in-scope ICT systems is not addressed. |
86
+ | EU AI Act | Art. 14 (human oversight), Art. 15 (accuracy, robustness, cybersecurity) | High-risk AI systems must support human oversight. The Act does not specify identity assurance for the agent acting under human oversight, leaving the principal-of-record question open. |
87
+ | UK NCSC CAF | Objective B2 (Identity and access management), B2.a/B2.b/B2.c | CAF B2 is outcome-based and explicitly references phishing-resistant authentication for privileged access (good). It does not address agent-principal identity. |
88
+ | AU ISM | Controls 0974, 1173, 1546, 1559 (identity, authentication, MFA) | Mandates MFA for privileged users and phishing-resistant MFA for "highly privileged" users (good). Service-account guidance does not cover AI-agent acting-under-user. |
89
+ | AU Essential 8 | ML2/ML3 MFA controls | Maturity Model Level 3 requires phishing-resistant MFA for privileged users. Same agent-principal gap. |
90
+ | Singapore MAS TRM | §11 (Access Control), §14.2 (Authentication) | Privileged access multi-factor mandate; does not specify phishing-resistance and does not address agent-principal identity in MAS-regulated FI AI deployments. |
91
+ | Israel INCD identity directives (Doctrine 2.0 + Cyber Defense Methodology 2024) | Identity and access controls under Tier 1 critical infrastructure scope | Doctrine 2.0 elevates identity to a primary control plane but predates the agent-as-principal operational pattern. Tier 1 entities (critical infra, finance, healthcare) must apply MFA broadly; phishing-resistance is recommended, not mandated. |
92
+ | Switzerland FINMA Circ. 2023/1 (Operational risks and resilience — banks) | Strong customer authentication and privileged-access controls | Mandates strong authentication; defers technical specifics to industry practice. Does not address agent-principal identity in AI-enabled banking workflows. |
93
+ | Japan FISC Security Guidelines v9 | Identity baseline (Chapter on access management) | v9 baseline mandates MFA for privileged access in FI sector. Does not specify phishing-resistance. Agent-principal identity is silent. |
94
+ | Indonesia BSSN Reg. 8/2020 (electronic system security) | Identity controls under the Reg.'s access-management requirements | Strong-authentication for ESPs; does not specify AAL targets, phishing-resistance, or agent principals. |
95
+ | India CERT-In (SBOM + identity directives, 2022 + 2024 amendments) | Identity controls referenced alongside SBOM and incident-reporting | CERT-In Directions mandate accurate logging tied to identity (180-day retention). Does not specify AAL targets, phishing-resistance, or agent principals. |
96
+ | NY DFS 23 NYCRR Part 500 (amended Nov 2023) | §500.12 (Multi-Factor Authentication), §500.7 (Access Privileges) | Mandates MFA for any individual accessing the covered entity's information systems — explicit phishing-resistance not required (a documented gap). Agent-principal identity not addressed. |
97
+ | ISO/IEC 27001:2022 / 27002:2022 | A.5.16, A.5.17, A.5.18, A.8.5 (identity, authentication info, access rights, secure authentication) | The 2022 revision improves on 2013 but predates the agent-principal pattern and does not mandate phishing-resistance. |
98
+ | EU PSD2 RTS on Strong Customer Authentication (Reg. 2018/389) | SCA — two-factor authentication for payment initiation, account access, and remote transactions in scope of PSD2 | The canonical EU mandate for two-factor authentication in retail payments. RTS-SCA does not specify phishing-resistance (TOTP and SMS-OTP remain commonly deployed and accepted by NCAs) and predates the agent-principal pattern — an AI agent initiating a payment under a user's strongly-authenticated session is not contemplated. PSD3 / PSR revisions in progress; until then, SCA-compliant flows can still be defeated by AiTM relay against non-phishing-resistant factors. |
99
+
100
+ **Fundamental gap:** every framework above either pre-dates the agent-as-principal pattern or treats AI-agent acting-under-user as a service-account, which it is not. The cross-jurisdiction picture also shows that phishing-resistance is recommended-not-mandated almost everywhere — paper-MFA still passes most audits.
101
+
102
+ **Underlying RFC stack and its gaps.** Identity tokens ride on RFC 7519 (JWT) and MUST follow RFC 8725 (BCP 225) to avoid `alg=none`, key confusion, audience confusion, and `kid` traversal attack classes. OAuth 2.0 is RFC 6749, but the threat model has been superseded by RFC 9700 (Security Best Current Practice, January 2025) — operators citing only RFC 6749 are operating against a 2012 threat model. Signing primitives for federation assertions and passkey attestations rely on Ed25519 (RFC 8032) among others; the algorithm itself is robust, but PQC migration timelines from the `pqc-first` skill apply to long-lived federation trust roots. Reference `data/rfc-references.json` rather than restating content here.
103
+
104
+ ---
105
+
106
+ ## TTP Mapping
107
+
108
+ | ID | Technique | Identity-Assurance Relevance | Failing AAL/IAL/FAL Level | Gap |
109
+ |---|---|---|---|---|
110
+ | T1078 | Valid Accounts | Compromised credential reuse defeats AAL1 / AAL2 password-or-TOTP authenticators; survives most session controls until step-up. | Bypasses AAL1, AAL2. AAL3 phishing-resistant authenticators resist. | NIST-800-53-AC-2 has no agent-principal account category; valid-account abuse via inherited agent token is unattributable in standard audit pipelines. |
111
+ | T1556 | Modify Authentication Process | Adversary tampers with auth flow (golden SAML, federation-trust manipulation, conditional-access bypass). Defeats FAL1 / FAL2 federation assurance when assertion integrity is not cryptographically bound. | Bypasses FAL1, FAL2. FAL3 (cryptographic key-bound assertions) resists. | ISO-27001-2022-A.8.30 silent on federation trust-root tamper; SOC2-CC6 does not test FAL level. |
112
+ | T1110 | Brute Force (and sub-techniques: 1110.001 password guessing, 1110.003 password spraying, 1110.004 credential stuffing) | Defeats AAL1 password authenticators at scale; mitigated by rate-limiting, account lockout, and phishing-resistant AAL3. | Bypasses AAL1. AAL2 with rate-limit and AAL3 resist. | NIST-800-63B-rev4 contemplates rate-limit; no framework operationalises detection thresholds tied to AAL. |
113
+ | AML.T0051 | LLM Prompt Injection | An injected prompt makes the model exfiltrate or misuse a held credential (OAuth token in tool-call argument, API key in context). The compromised principal is the user-on-behalf-of-whom the agent acts — not a service account. | All AAL/IAL/FAL levels fail because the credential is *already authenticated*; the misuse is post-auth. Mitigation is scope minimisation and short-lived tokens (RFC 9700). | No identity framework addresses post-auth credential misuse by an inherited agent principal. |
114
+
115
+ ---
116
+
117
+ ## Exploit Availability Matrix
118
+
119
+ Sourced from `data/cve-catalog.json` and `data/exploit-availability.json` as of 2026-05-11.
120
+
121
+ | Threat | CVSS | RWEP | PoC Public? | CISA KEV? | AI-Accelerated Weaponization? | Patch / Mitigation? |
122
+ |---|---|---|---|---|---|---|
123
+ | CVE-2026-30615 (Windsurf MCP zero-interaction RCE — implicit identity inheritance) | 9.8 | 35 | Partial — conceptual exploit demonstrated | No (architectural class) | No direct AI-assisted weaponization recorded; the attack rides on agent tool-call autonomy under the user's inherited session | Vendor IDE update; identity-layer mitigation is scoped agent token + tool allowlist (see mcp-agent-trust). |
124
+ | AiTM passkey-relay / FIDO2-bypass phishing kits | N/A (kit class, not vendor CVE) | N/A | Public research and limited in-the-wild observations; nothing fully bypasses **synced** passkeys without endpoint compromise (the device-bound private key remains in the secure enclave). Bypasses against TOTP / push-MFA / SMS are commodity. | Technique class | Yes — AI-assisted kit configuration and target-tailored lure generation are documented capabilities. | Mitigation: enforce phishing-resistant authenticators (passkey or hardware-token AAL3) for privileged roles; endpoint-binding (D3-CBAN) for highly-privileged roles. |
125
+ | OAuth refresh-token theft + replay (RFC 9700 BCP §2.2.2) | N/A (technique) | N/A | Yes — public research; commodity in adversary toolkits. | No (technique) | Yes — credential-theft → automated replay is well-AI-assisted. | Mitigation: short-lived access tokens, sender-constrained tokens (DPoP / mTLS per RFC 9700), rotated refresh tokens, refresh-token-reuse detection. |
126
+ | JWT validation-bypass class (RFC 8725 BCP failures: `alg=none`, key confusion, audience confusion, `kid` traversal) | Class-level — multiple vendor CVEs over time, current high-RWEP entries vary | N/A (class) | Yes — generic class with library-specific PoCs. | No (class) | Yes — AI-assisted scanning for vulnerable verifier configurations. | Mitigation: pin allowed algorithms server-side, validate `iss` / `aud` / `exp` / `nbf`, treat `kid` as untrusted input, follow RFC 8725 BCP. |
127
+ | AML.T0051 prompt-injection-driven credential exfiltration via agent | N/A (technique) | N/A | Yes — public research and demonstrated in-the-wild against IDE-resident agents. | No | Yes — adversarial instruction crafting is AI-accelerated. | Mitigation: short-lived per-agent tokens, scope minimisation, tool-arg DLP (see dlp-gap-analysis), no static credentials in agent context. |
128
+
129
+ **Interpretation:** the only vendor CVE in scope (CVE-2026-30615) has a patch path; everything else in this skill is configurational and architectural. Synced FIDO2/WebAuthn passkeys remain the strongest commodity authenticator class — no public technique fully bypasses them without endpoint compromise as of 2026-05-11.
130
+
131
+ ---
132
+
133
+ ## Analysis Procedure
134
+
135
+ This procedure threads the three foundational principles explicitly (per AGENTS.md skill-format requirement).
136
+
137
+ ### Defense in Depth (multi-layer identity controls)
138
+
139
+ Identity is not a single control. The layered model the analysis must verify:
140
+
141
+ 1. **Enrollment** — IAL2 (remote identity proofing) for standard users; IAL3 (in-person or supervised remote) for highly privileged roles. Verify proofing evidence quality and re-proofing cadence.
142
+ 2. **Authentication** — AAL2 minimum for any access to organisational systems; AAL3 (phishing-resistant: FIDO2/WebAuthn passkey or PIV/CAC hardware token) mandatory for privileged roles and any agent-mediated session.
143
+ 3. **Federation** — FAL1 minimum; FAL3 (cryptographic key-bound assertions, holder-of-key) for cross-organisational federation and any federation trust root.
144
+ 4. **Session** — short-lived access tokens (RFC 9700 §4): minutes-to-hours for interactive, seconds-to-minutes for workload. Refresh-token rotation. Sender-constrained tokens (DPoP per RFC 9449 or mTLS per RFC 8705) for high-value scopes.
145
+ 5. **Step-up** — re-authenticate for sensitive actions (PIM/PAM elevation, financial transactions, agent-initiated writes to production). Step-up MUST use phishing-resistant authenticator.
146
+ 6. **Continuous** — signal-based re-evaluation (device-posture change, anomalous geo, agent behaviour drift). Revoke session on signal.
147
+
148
+ ### Least Privilege (per-principal scope)
149
+
150
+ Every principal — including AI agents and MCP servers — gets a least-privilege scope:
151
+
152
+ - Human users: role-based + just-in-time elevation for privileged actions via PIM/PAM.
153
+ - Service accounts: scoped to the single workload they serve; rotated; ideally workload-identity-federated (no static key).
154
+ - **AI agents (this skill's distinct addition)**: agent SHOULD hold its own short-lived token, not the user's OAuth session. Where the agent acts under the user's session (today's default), the analysis MUST flag this as an inherited-principal finding and recommend separate agent tokens with explicit scope. Cross-reference mcp-agent-trust for the trust-tier model.
155
+ - MCP servers / tool providers: scoped to the resources they actually need; no shell unless the tool is explicitly a shell tool.
156
+
157
+ ### Zero Trust (verify-not-assume on every request)
158
+
159
+ NIST 800-207 ZTA posture, extended for agents:
160
+
161
+ - Verify on every request, not just on session start.
162
+ - Never assume network position grants trust.
163
+ - Device posture is a first-class signal.
164
+ - AI agents and MCP servers are zero-trust subjects in their own right — agent-traffic from inside the network is not pre-trusted.
165
+ - Policy decision point (PDP) MUST receive an agent-distinguished signal in the request context.
166
+
167
+ ### Concrete Steps
168
+
169
+ 1. **Inventory all principals.** Pull from IdP (Entra ID / Okta / Auth0 / Google Workspace / Ping), workload-identity providers (Kubernetes service accounts, AWS IAM roles, GCP workload identity federation, SPIFFE/SPIRE registries), and AI-agent / MCP-server configs (`~/.claude/`, `~/.cursor/`, `~/.windsurf/`, `~/.gemini/`, `~/.vscode/`). Classify each as human / service / agent. **If AI agents are not enumerated, the inventory is incomplete and the analysis halts here pending a re-inventory.**
170
+
171
+ 2. **Score each principal against AAL/IAL/FAL targets.** Produce the per-principal scorecard (see Output Format). Target table: standard user → AAL2 / IAL2 / FAL1; privileged user → AAL3 / IAL2 / FAL2; highly privileged (domain admin, IdP admin, financial-control roles) → AAL3 / IAL3 / FAL3; workload → workload-identity-federation with sender-constrained short-lived tokens; AI agent → its own AAL-equivalent scoped token (not inherited user session).
172
+
173
+ 3. **Identify phishing-resistant coverage gap.** Per role-class, what % of users are on FIDO2/WebAuthn passkey or hardware token (PIV/CAC/YubiKey FIDO2)? TOTP and push-MFA and SMS do not count. Targets: 100% for privileged and highly privileged; ≥90% for standard users by EoY 2026.
174
+
175
+ 4. **Map federation surface (OIDC/SAML).** Enumerate every OIDC RP and SAML SP. For each: which IdP is the authority? Is SCIM provisioning enabled, or does the SP silent-provision on first-login? What is the assertion signing algorithm and key rotation cadence? Is the IdP's signing key in an HSM? Cross-walk to RFC-8032 (Ed25519) algorithm choices where applicable.
176
+
177
+ 5. **Audit token lifetimes against RFC 9700 BCP.** For each OAuth client: access-token TTL, refresh-token TTL, refresh-token rotation enabled?, sender-constraining (DPoP/mTLS) enabled for high-value scopes? Flag any access-token TTL > 1 hour for interactive or > 15 minutes for workload as a finding.
178
+
179
+ 6. **Audit JWT validation against RFC 8725 BCP.** For each resource server / API gateway / MCP server validating JWTs: allowed algorithms pinned server-side? `iss`/`aud`/`exp`/`nbf` validated? `kid` treated as untrusted input? `alg=none` explicitly rejected? JWKS endpoint fetch hardened (HTTPS, cache TTL, fallback)?
180
+
181
+ 7. **Audit MCP / agent privilege scopes.** For each MCP server in the inventory (cross-walk to mcp-agent-trust Step 1): does the agent hold its own token or inherit the user's? If inherited, document as a finding. What scopes does the inherited token grant? Where the agent CAN have its own token (e.g., agent-to-agent service-to-service flow), is it short-lived and DPoP-constrained?
182
+
183
+ 8. **Audit SCIM provisioning lifecycle.** For each SaaS in scope: SCIM-provisioned (good — IdP is authority) or first-login-provisioned (bad — SaaS is silently authoritative)? On termination, how long until SaaS account is deactivated? Cite RFC 7644 (SCIM 2.0 protocol) for the lifecycle requirement.
184
+
185
+ 9. **Compliance theater checks.** Execute the four tests in the Compliance Theater section as a final gate before the report goes out.
186
+
187
+ ---
188
+
189
+ ## Output Format
190
+
191
+ ```
192
+ ## Identity Assurance Assessment
193
+
194
+ **Assessment Date:** YYYY-MM-DD
195
+ **Scope:** [org units / IdPs / SaaS apps / workload clusters / AI-agent fleets in scope]
196
+ **Jurisdictions:** [EU NIS2 / DORA, UK CAF, AU ISM, ISO 27001, plus IL INCD / CH FINMA / JP FISC / SG MAS / IN CERT-In / NY DFS where applicable]
197
+
198
+ ### Per-Principal Assurance Scorecard
199
+ | Principal | Class (Human/Service/Agent) | Current AAL | Target AAL | Current IAL | Target IAL | Current FAL | Target FAL | Gap |
200
+ |-----------|----------------------------|-------------|------------|-------------|------------|-------------|------------|-----|
201
+
202
+ ### Phishing-Resistant Coverage Matrix
203
+ | Role Class | Population | On FIDO2/WebAuthn Passkey | On Hardware Token | On TOTP/Push/SMS Only | % Phishing-Resistant | Target % | Gap |
204
+ |------------|-----------|---------------------------|-------------------|----------------------|---------------------|----------|-----|
205
+
206
+ ### Token Lifetime Audit (RFC 9700 BCP)
207
+ | OAuth Client / API | Access TTL | Refresh TTL | Refresh Rotation | Sender-Constrained (DPoP/mTLS) | RFC 9700 §-Compliant | Finding |
208
+ |--------------------|-----------|-------------|------------------|--------------------------------|----------------------|---------|
209
+
210
+ ### JWT Validation Audit (RFC 8725 BCP)
211
+ | Resource Server | Allowed Algs Pinned | iss/aud/exp/nbf Validated | kid Hardened | alg=none Rejected | JWKS Fetch Hardened | Finding |
212
+ |----------------|---------------------|---------------------------|--------------|-------------------|---------------------|---------|
213
+
214
+ ### Federation Surface (OIDC / SAML)
215
+ | RP / SP | IdP | SCIM Provisioned? | First-Login Provisioned? | Assertion Signing Alg | Key Rotation | FAL Level |
216
+ |---------|-----|-------------------|--------------------------|----------------------|--------------|-----------|
217
+
218
+ ### Agent-Principal Inventory
219
+ | Agent / MCP Server | Holds Own Token? | Inherited User Session? | Scopes | Token TTL | Cross-Walk to mcp-agent-trust |
220
+ |--------------------|------------------|-------------------------|--------|-----------|-------------------------------|
221
+
222
+ ### Framework Gap Declaration
223
+ [Per-framework: NIST 800-63B rev 4, NIST 800-53 AC-2, ISO 27001:2022 A.8.30, SOC 2 CC6, EU NIS2 Art 21, EU DORA RTS, UK CAF B2, AU ISM 0974+, plus IL/CH/JP/SG/IN/NY DFS — what the control nominally covers, what it misses for agent-principal and phishing-resistance, what a real control requires.]
224
+
225
+ ### Remediation Roadmap
226
+ | Priority | Finding | Action | Owner | Target Date | Framework Gap Closed |
227
+ |----------|---------|--------|-------|-------------|---------------------|
228
+
229
+ ### Compliance Theater Findings
230
+ [Outcome of the four tests below.]
231
+ ```
232
+
233
+ ---
234
+
235
+ ## Compliance Theater Check
236
+
237
+ Four specific tests distinguish paper compliance from real posture:
238
+
239
+ 1. **Principal inventory completeness.** "Show me the principal inventory, and confirm AI agents and MCP servers are enumerated as distinct principals (not folded into 'service accounts')." If AI agents are not enumerated, the access-control claim is incomplete by construction — every audit log that attributes an agent action to the human user is wrong by design. Failing this test means the SOC 2 CC6 / ISO A.5.16 / NIS2 Art 21 evidence is paper-only for the agent-mediated portion of the attack surface.
240
+
241
+ 2. **Phishing-resistant coverage of privileged users.** "What percentage of your privileged users (any role with admin scope on IdP, finance, prod, source control, AI-agent configuration) are on phishing-resistant authentication — specifically FIDO2/WebAuthn passkey or hardware token (PIV/CAC/YubiKey FIDO2)?" "We use MFA" is theater unless phishing-resistance is specified. TOTP, push notifications, and SMS are not phishing-resistant in mid-2026; AiTM commodity kits defeat them daily. Target: 100% for privileged users.
242
+
243
+ 3. **MCP / agent access token TTL.** "Show me the access-token TTL configured for your MCP server fleet and AI-agent integrations. Show me the refresh-token rotation policy." If access-token TTLs are measured in weeks, or are unconfigured / default-1-year-from-the-SDK, or refresh tokens are never rotated, this is theater against RFC 9700 BCP. The credential-theft blast radius is multiplied by the TTL.
244
+
245
+ 4. **Cross-jurisdiction evidence.** "Show me your jurisdiction-specific identity-control evidence for every jurisdiction you operate in: EU NIS2 Art 21 transposition, DORA RTS, UK CAF B2, AU ISM 0974+, ISO 27001 A.5.16; plus IL INCD Doctrine 2.0 / Cyber Defense Methodology 2024, CH FINMA Circ. 2023/1, JP FISC v9, SG MAS TRM §11/§14.2, IN CERT-In Directions, NY DFS 23 NYCRR 500.12." US-only evidence (or worse, NIST-only evidence) for a multi-jurisdictional org is theater per AGENTS.md rule #5 and DR-4.
246
+
247
+ ---
248
+
249
+ ## Defensive Countermeasure Mapping
250
+
251
+ Maps the identity-assurance gaps above to MITRE D3FEND techniques with explicit defense-in-depth layer position, least-privilege scope, zero-trust posture, and AI-pipeline applicability (per AGENTS.md Hard Rule #9).
252
+
253
+ | D3FEND Technique | Mapping | Defense-in-Depth Layer | Least-Privilege Scope | Zero-Trust Posture | AI-Pipeline Applicability |
254
+ |---|---|---|---|---|---|
255
+ | **D3-MFA** (Multi-factor Authentication) | Counters T1078 (Valid Accounts) and T1110 (Brute Force) at the authentication layer; phishing-resistant variant (FIDO2/WebAuthn passkey) is the only commodity counter to AiTM relay attacks. | Layer 2 (Authentication) of the enrollment → authentication → federation → session → step-up → continuous stack. | Per-principal — each human, agent, and high-value service account authenticates with an MFA factor scoped to its role; AAL3 mandatory for privileged. | Verify on every request, not just session start; re-authenticate for step-up before sensitive actions. | Serverless / ephemeral functions cannot present an interactive MFA factor — substitute workload-identity-federation with sender-constrained short-lived tokens (DPoP/mTLS) and cryptographic device attestation. AI-agent pipelines: agent acts under its own short-lived scoped token, not the user's MFA-authenticated session. |
256
+ | **D3-CBAN** (Certificate-based Authentication) | Counters T1556 (Modify Authentication Process) by binding the authenticator to a cryptographic key; counters credential-theft for workload-to-workload flows via mTLS. | Layer 2 (Authentication) and Layer 4 (Session — sender-constrained tokens per RFC 9700). | Per-workload — each workload presents its own X.509 client cert or SPIFFE/SPIRE SVID; no shared certs across workloads. | Cert is presented on every request; revocation status (OCSP/CRL) checked or short-lived certs used (SPIFFE SVID default ≤ 1 hour). | Native fit for ephemeral / serverless: SPIFFE/SPIRE issues short-lived SVIDs at function startup; AWS IAM Roles Anywhere, GCP Workload Identity Federation, Azure Workload Identity federate to cloud IAM. AI-pipeline: agent-to-agent (A2A) flows MUST be cert-bound; bearer-token-only A2A is a finding. |
257
+ | **D3-CA** (Certificate Analysis) | Counters T1556 by detecting federation-trust-root tamper and rogue certificates (golden-SAML class). | Layer 3 (Federation). | N/A — control plane, not principal scope. | Continuously evaluate cert chain integrity, transparency-log presence, issuance anomalies; alert on out-of-policy issuance. | Applies wherever federation assertions are signed — SaaS-IdP federation, MCP server identity, agent-to-agent identity. Serverless: CT-log monitoring runs out-of-band (Sigstore Rekor / Google CT) — architecturally compatible. |
258
+ | **D3-EAL** (Executable Allowlisting) | Counters T1078 abuse via service-account / agent allowlisting: only allowlisted binaries / agent SDK versions can authenticate as a given service principal. | Layer 2 (Authentication — pre-condition) and Layer 5 (Step-up — agent attestation before privileged action). | Per-binary — only the specific MCP server binary / agent build hash is allowed to present the workload identity. | Verify binary identity on every authentication; reject on hash mismatch. | Ephemeral / serverless: bake allowlist into the function image at build-time (per the mcp-agent-trust ephemeral-context note — runtime fetch is architecturally impossible). AI-agent pipelines: allowlist the agent SDK build hash + MCP server hashes that are authorised to act under a given workload identity. |
259
+
260
+ ---
261
+
262
+ ## Hand-Off / Related Skills
263
+
264
+ After producing the identity assurance assessment output, chain into the following skills. Each entry is specific to a finding class this skill produces.
265
+
266
+ - **`mcp-agent-trust`** — direct agent-identity overlap. Every agent-principal finding in this skill's inventory (agent inherits user's OAuth session, no separate token, no scope minimisation) maps to an mcp-agent-trust trust-tier finding. Run mcp-agent-trust against the same fleet to get the artefact-level (signed manifest, tool allowlist, bearer auth) view that complements this skill's principal-level view.
267
+ - **`dlp-gap-analysis`** — identity-scoped DLP. The principal identity in the audit log is the join key for DLP egress attribution. Where this skill identifies inherited-agent principals (agent acts under user's token), DLP attribution is wrong-by-construction: tool-argument egress will be attributed to the human, not the agent. Run dlp-gap-analysis to verify tool-arg DLP classifiers and SDK-level prompt logging exist and to surface the attribution gap.
268
+ - **`defensive-countermeasure-mapping`** — full D3FEND layering across the identity stack. The four D3FEND techniques mapped above (D3-MFA, D3-CBAN, D3-CA, D3-EAL) are the identity-specific subset; the full defensive-countermeasure-mapping skill produces the cross-layer view (process isolation, network egress, etc.) that an identity-only mapping does not cover.
269
+ - **`supply-chain-integrity`** — signed identity artefacts. Federation assertion signing keys, OIDC discovery documents, JWKS endpoints, agent SDK binaries, and MCP server packages are all supply-chain artefacts. Run supply-chain-integrity to produce SLSA-level attestation, Sigstore signature verification, and in-toto provenance for the identity artefacts in this skill's federation-surface inventory.
270
+ - **`compliance-theater`** — paper-MFA theater. If the phishing-resistant coverage matrix in this skill's output shows < 100% phishing-resistant coverage for privileged users while the org's compliance attestations claim MFA-for-all, run compliance-theater for the full structured theater-vs-real-posture report tied to the specific audit reports (SOC 2, ISO, NIS2 conformity) being misrepresented.
271
+
272
+ For ephemeral / serverless / AI-pipeline contexts (per AGENTS.md rule #9): interactive AAL3 authentication is architecturally impossible inside a serverless function or short-lived container. The scoped alternative is workload-identity-federation (SPIFFE/SPIRE, AWS IAM Roles Anywhere, GCP WIF, Azure Workload Identity) with sender-constrained short-lived tokens (DPoP per RFC 9449 or mTLS per RFC 8705), build-time agent-binary allowlisting baked into the function image, and per-invocation cryptographic device attestation where the platform supports it.