mesh-security
Analyze Istio, Consul, and Linkerd service mesh configurations for security vulnerabilities with NIST 800-53 control mappings. Use when users need to audit mesh security, identify misconfigurations, check mTLS settings, review ACL policies, or prepare for FedRAMP assessments. Triggers on keywords like "mesh config", "istio security", "consul ACL", "linkerd policy", "service mesh audit", or "NIST compliance".
What this skill does
# Service Mesh Security Analyzer
Comprehensive security analysis for Istio, Consul, and Linkerd service mesh configurations with NIST 800-53 Rev 5 control mappings.
## Quick Start
### Analyze a Configuration File
```bash
# Run the analyzer wrapper directly
node ~/.codex/skills/mesh-security/lib/analyzer-wrapper.js <config-file>
# Examples
node ~/.codex/skills/mesh-security/lib/analyzer-wrapper.js ./istio-meshconfig.yaml
node ~/.codex/skills/mesh-security/lib/analyzer-wrapper.js ./consul-config.json
node ~/.codex/skills/mesh-security/lib/analyzer-wrapper.js ./linkerd-config.yaml --json
```
### Sample Configurations
Test configs are available in the `samples/` directory:
- Istio: `samples/sample-meshconfig.yaml`
- Consul: `samples/sample-consul-config.json`
- Linkerd: `samples/sample-linkerd-config.yaml`
## Supported Mesh Types
### Istio
**Auto-detection:** Files with `kind: MeshConfig` and `apiVersion` containing `istio.io`
**Security Checks:**
| Category | What It Checks |
|----------|----------------|
| mTLS | Enabled status, STRICT mode enforcement |
| Certificates | CA provider, validity duration (optimal 90 days) |
| Peer Authentication | Default peer auth, STRICT mode |
| Proxy Config | Privileged mode, image versioning, holdApplicationUntilProxyStarts |
| Secret Discovery | SDS enabled for certificate management |
| Trust Domain | Explicitly configured, not using default |
| Authorization | Default deny policies |
| Telemetry | Enabled collection, access logging |
| RBAC | Role-based access control enforcement |
| Traffic Policy | Outbound traffic restricted to REGISTRY_ONLY |
### Consul
**Auto-detection:** Files with `mesh_type: "consul"` or containing `connect`, `tls`, and `acl` fields
**Security Checks:**
| Category | What It Checks |
|----------|----------------|
| Service Mesh | Connect enabled |
| Proxy Security | No privileged mode |
| TLS Security | verify_incoming, verify_outgoing, hostname verification |
| Access Control | ACL enabled, default deny policy, agent tokens |
| Telemetry | Service metrics enabled |
| Auto-Encryption | TLS auto-encrypt feature |
| Gossip Encryption | Key configured, proper length, verification |
| FedRAMP Compliance | TLS 1.2+, FIPS ciphers, strong encryption |
### Linkerd
**Auto-detection:** Files with `mesh_type: "linkerd"` or containing `identity`, `proxy`, and `policy` fields
**Security Checks:**
| Category | What It Checks |
|----------|----------------|
| TLS Security | Enabled, enforced, cipher suites, min version 1.2 |
| Service Identity | Enabled, certificate issuer, validity period |
| Proxy Config | Non-privileged, versioning, timeouts, resource limits |
| Authorization | Policy enforcement, default deny, specific rules |
| Authentication | Strict mode enforcement |
| Observability | Tracing enabled, sampling, collector config |
| Metrics | Enabled, Prometheus integration, retention |
| Traffic Rules | TLS in destination rules, system namespace protection |
## Severity Levels
| Level | Meaning | Example Issues |
|-------|---------|----------------|
| **Critical** | Immediate security risk | RBAC/ACL disabled, mTLS not enforced, gossip encryption missing |
| **High** | Significant vulnerability | Permissive auth modes, privileged containers, missing hostname verification |
| **Medium** | Security weakness | Default trust domains, long certificate validity, missing telemetry |
| **Low** | Best practice violation | Non-pinned images, missing timeouts, default CA providers |
## NIST 800-53 Control Mappings
Findings are mapped to these NIST 800-53 Rev 5 controls:
| Control | Title | Relevant Checks |
|---------|-------|-----------------|
| AC-3 | Access Enforcement | RBAC, ACL, Authorization policies |
| AC-4 | Information Flow Enforcement | Outbound traffic policy, Policy enforcement |
| AC-17 | Remote Access | mTLS, TLS configuration |
| AU-2 | Audit Events | Telemetry, Access logging |
| AU-3 | Content of Audit Records | Logging configuration |
| AU-12 | Audit Generation | Metrics, Tracing |
| CA-3 | System Interconnections | Trust domain, Peer authentication |
| CM-2 | Baseline Configuration | Proxy config, Default settings |
| CM-6 | Configuration Settings | Security hardening |
| CM-7 | Least Functionality | Privileged mode, Outbound restrictions |
| IA-2 | Identification and Authentication | Service identity, Authentication |
| IA-5 | Authenticator Management | Certificate management, SDS |
| SC-7 | Boundary Protection | Traffic policy, Network segmentation |
| SC-8 | Transmission Confidentiality | mTLS, TLS settings |
| SC-12 | Cryptographic Key Management | Certificate validity, CA settings |
| SC-13 | Cryptographic Protection | Cipher suites, TLS versions |
| SC-23 | Session Authenticity | Peer authentication, Trust chain |
| SI-4 | System Monitoring | Telemetry, Metrics, Tracing |
## Workflow: Analyze a Mesh Configuration
1. **Read the configuration file** to understand its structure
2. **Run the analyzer** using the wrapper script
3. **Review findings** by severity (Critical first)
4. **Check NIST mappings** for compliance requirements
5. **Generate remediation** recommendations if needed
### Example Analysis Session
```
User: Analyze my Istio mesh configuration at ./istio-config.yaml
Steps:
1. Read the file to understand the mesh configuration
2. Run: node ~/.codex/skills/mesh-security/lib/analyzer-wrapper.js ./istio-config.yaml
3. Present findings grouped by severity
4. Highlight critical/high severity issues first
5. Include NIST control mappings for compliance context
6. Offer to generate fixes or compliance report
```
## Output Format
### Markdown (Default)
```markdown
## Security Analysis Results
**Mesh Type:** Istio
**File:** ./istio-config.yaml
**Total Findings:** 5
| Severity | Count |
|----------|-------|
| Critical | 1 |
| High | 2 |
| Medium | 2 |
| Low | 0 |
### Critical Findings
#### 1. mTLS Configuration
**Issue:** mTLS is not set to STRICT mode
**Location:** `spec.mtls.mode`
**Recommendation:** Set mTLS mode to STRICT to enforce mutual TLS
**NIST Controls:** SC-8, SC-13
```
### JSON (--json flag)
```json
{
"success": true,
"meshType": "istio",
"findings": [...],
"summary": { "critical": 1, "high": 2, "medium": 2, "low": 0, "total": 5 }
}
```
## Related Skills
- **mesh-remediation** - Generate and apply security fixes
- **mesh-compliance-reporter** - Generate FedRAMP/NIST compliance reports
## Programmatic Usage
```javascript
const { analyzeConfig, formatFindings } = require('~/.codex/skills/mesh-security/lib/analyzer-wrapper.js');
// Analyze a config file
const results = analyzeConfig('./istio-config.yaml');
console.log(formatFindings(results));
// Or specify mesh type explicitly
const consulResults = analyzeConfig('./config.json', 'consul');
```
Related in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.