abridge-security-basics
Apply HIPAA-compliant security practices for Abridge clinical AI integrations. Use when securing PHI in transit/at rest, configuring access controls, implementing audit logging, or preparing for HIPAA security audits. Trigger: "abridge security", "abridge HIPAA", "abridge PHI protection", "abridge access control", "abridge audit logging".
What this skill does
# Abridge Security Basics
## Overview
HIPAA-compliant security configuration for Abridge clinical AI integrations. Abridge handles PHI (Protected Health Information) — security is not optional. This skill covers encryption, access control, audit logging, and BAA requirements.
## HIPAA Security Checklist
| Requirement | Implementation | Status |
|-------------|---------------|--------|
| Encryption in transit | TLS 1.3 enforced | Required |
| Encryption at rest | AES-256 for stored PHI | Required |
| Access control | Role-based with MFA | Required |
| Audit logging | All PHI access logged | Required |
| BAA signed | Business Associate Agreement | Required |
| Minimum necessary | Only access needed PHI | Required |
| Breach notification | 60-day notification plan | Required |
## Instructions
### Step 1: Enforce TLS and Certificate Pinning
```typescript
// src/security/tls-config.ts
import https from 'https';
import axios from 'axios';
const abridgeHttpsAgent = new https.Agent({
minVersion: 'TLSv1.3', // Enforce TLS 1.3 minimum
rejectUnauthorized: true, // Never disable cert validation
// Optional: certificate pinning for Abridge API
// ca: fs.readFileSync('./certs/abridge-ca.pem'),
});
const secureClient = axios.create({
baseURL: process.env.ABRIDGE_BASE_URL,
httpsAgent: abridgeHttpsAgent,
headers: {
'Authorization': `Bearer ${process.env.ABRIDGE_CLIENT_SECRET}`,
'X-Org-Id': process.env.ABRIDGE_ORG_ID!,
'Strict-Transport-Security': 'max-age=31536000; includeSubDomains',
},
});
```
### Step 2: PHI-Safe Audit Logger
```typescript
// src/security/audit-logger.ts
interface AuditEntry {
timestamp: string;
action: 'create' | 'read' | 'update' | 'delete' | 'access';
resource_type: 'session' | 'note' | 'transcript' | 'patient_summary';
resource_id: string; // Session/note ID (not PHI)
actor: string; // Provider NPI or system ID
ip_address: string;
success: boolean;
// NEVER include: patient name, DOB, SSN, MRN, diagnosis, note content
}
class HipaaAuditLogger {
private entries: AuditEntry[] = [];
log(entry: Omit<AuditEntry, 'timestamp'>): void {
const fullEntry: AuditEntry = {
...entry,
timestamp: new Date().toISOString(),
};
// Validate no PHI leaked into audit log
const serialized = JSON.stringify(fullEntry);
if (this.containsPhi(serialized)) {
console.error('CRITICAL: PHI detected in audit entry — entry blocked');
return;
}
this.entries.push(fullEntry);
// In production: write to HIPAA-compliant log store (CloudWatch, Splunk, etc.)
console.log(`AUDIT: ${JSON.stringify(fullEntry)}`);
}
private containsPhi(text: string): boolean {
const phiPatterns = [
/\b\d{3}-\d{2}-\d{4}\b/, // SSN
/\b[A-Z]\d{8}\b/, // MRN pattern
/\b\d{1,2}\/\d{1,2}\/\d{4}\b/, // DOB
];
return phiPatterns.some(p => p.test(text));
}
getRetentionPolicy(): { minYears: number; note: string } {
return {
minYears: 6,
note: 'HIPAA requires audit logs retained for minimum 6 years',
};
}
}
export { HipaaAuditLogger, AuditEntry };
```
### Step 3: Role-Based Access Control
```typescript
// src/security/rbac.ts
type AbridgeRole = 'clinician' | 'nurse' | 'admin' | 'billing' | 'integration_service';
interface AbridgePermissions {
canCreateSession: boolean;
canViewNotes: boolean;
canViewPatientSummary: boolean;
canExportData: boolean;
canManageProviders: boolean;
canAccessBilling: boolean;
}
const ROLE_PERMISSIONS: Record<AbridgeRole, AbridgePermissions> = {
clinician: {
canCreateSession: true, canViewNotes: true, canViewPatientSummary: true,
canExportData: false, canManageProviders: false, canAccessBilling: false,
},
nurse: {
canCreateSession: true, canViewNotes: true, canViewPatientSummary: true,
canExportData: false, canManageProviders: false, canAccessBilling: false,
},
admin: {
canCreateSession: false, canViewNotes: false, canViewPatientSummary: false,
canExportData: true, canManageProviders: true, canAccessBilling: true,
},
billing: {
canCreateSession: false, canViewNotes: false, canViewPatientSummary: false,
canExportData: false, canManageProviders: false, canAccessBilling: true,
},
integration_service: {
canCreateSession: true, canViewNotes: true, canViewPatientSummary: false,
canExportData: false, canManageProviders: false, canAccessBilling: false,
},
};
function checkPermission(role: AbridgeRole, action: keyof AbridgePermissions): boolean {
return ROLE_PERMISSIONS[role]?.[action] ?? false;
}
```
### Step 4: Secrets Management
```typescript
// src/security/secrets.ts
// Never hardcode credentials — use environment or secret manager
async function loadAbridgeSecrets(): Promise<Record<string, string>> {
// Option 1: Environment variables (minimum viable)
// Option 2: AWS Secrets Manager / GCP Secret Manager (recommended)
// Option 3: HashiCorp Vault (enterprise)
// Example: GCP Secret Manager
const { SecretManagerServiceClient } = await import('@google-cloud/secret-manager');
const client = new SecretManagerServiceClient();
const secrets: Record<string, string> = {};
const secretNames = ['abridge-client-secret', 'abridge-org-id', 'epic-client-secret'];
for (const name of secretNames) {
const [version] = await client.accessSecretVersion({
name: `projects/${process.env.GCP_PROJECT}/secrets/${name}/versions/latest`,
});
secrets[name] = version.payload?.data?.toString() || '';
}
return secrets;
}
```
## Output
- TLS 1.3 enforcement with optional cert pinning
- HIPAA-compliant audit logger with PHI leak detection
- Role-based access control matrix
- Secrets loaded from cloud secret manager
## Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| TLS handshake failure | Server doesn't support TLS 1.3 | Verify Abridge endpoint; check proxy |
| PHI in logs | Audit logger bypass | Add PHI detection to all log paths |
| Permission denied | Wrong role | Check RBAC matrix for required role |
## Resources
- [HIPAA Security Rule](https://www.hhs.gov/hipaa/for-professionals/security/)
- Abridge Security
- [SMART on FHIR Security](https://hl7.org/fhir/smart-app-launch/scopes-and-launch-context.html)
## Next Steps
For production deployment checklist, see `abridge-prod-checklist`.
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.