compliance-testing
关于
This skill automates regulatory compliance testing for standards like GDPR, HIPAA, and PCI-DSS. It validates data rights, encryption, and access controls to prepare for audits. Use it when handling sensitive data or needing audit-ready evidence reports.
快速安装
Claude Code
推荐/plugin add https://github.com/proffesor-for-testing/agentic-qegit clone https://github.com/proffesor-for-testing/agentic-qe.git ~/.claude/skills/compliance-testing在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
Compliance Testing
<default_to_action> When validating regulatory compliance:
- IDENTIFY applicable regulations (GDPR, HIPAA, PCI-DSS, etc.)
- MAP requirements to testable controls
- TEST data rights (access, erasure, portability)
- VERIFY encryption and access logging
- GENERATE audit-ready reports with evidence
Quick Compliance Checklist:
- Data subject rights work (access, delete, export)
- PII is encrypted at rest and in transit
- Access to sensitive data is logged
- Consent is tracked with timestamps
- Payment card data not stored (only tokenized)
Critical Success Factors:
- Non-compliance = €20M or 4% revenue (GDPR)
- Audit trail everything
- Test continuously, not just before audits </default_to_action>
Quick Reference Card
When to Use
- Legal compliance requirements
- Before security audits
- Handling PII/PHI/PCI data
- Entering new markets (EU, CA, healthcare)
Major Regulations
| Regulation | Scope | Key Focus |
|---|---|---|
| GDPR | EU data | Privacy rights, consent |
| CCPA | California | Consumer data rights |
| HIPAA | Healthcare | PHI protection |
| PCI-DSS | Payments | Card data security |
| SOC2 | SaaS | Security controls |
Penalties
| Regulation | Maximum Fine |
|---|---|
| GDPR | €20M or 4% revenue |
| HIPAA | $1.5M per violation |
| PCI-DSS | $100k/month |
| CCPA | $7,500 per violation |
GDPR Compliance Testing
// Test data subject rights
test('user can request their data', async () => {
const response = await api.post('/data-export', { userId });
expect(response.status).toBe(200);
expect(response.data.downloadUrl).toBeDefined();
const data = await downloadFile(response.data.downloadUrl);
expect(data).toHaveProperty('profile');
expect(data).toHaveProperty('orders');
});
test('user can delete their account', async () => {
await api.delete(`/users/${userId}`);
// All personal data deleted
expect(await db.users.findOne({ id: userId })).toBeNull();
expect(await db.orders.find({ userId })).toHaveLength(0);
// Audit log retained (legal requirement)
expect(await db.auditLogs.find({ userId })).toBeDefined();
});
test('consent is tracked', async () => {
await api.post('/consent', {
userId, type: 'marketing', granted: true,
timestamp: new Date(), ipAddress: '192.168.1.1'
});
const consent = await db.consents.findOne({ userId, type: 'marketing' });
expect(consent.timestamp).toBeDefined();
expect(consent.ipAddress).toBeDefined();
});
HIPAA Compliance Testing
// Test PHI security
test('PHI is encrypted at rest', async () => {
const patient = await db.patients.create({
ssn: '123-45-6789',
medicalHistory: 'Diabetes'
});
const raw = await db.raw('SELECT * FROM patients WHERE id = ?', patient.id);
expect(raw.ssn).not.toBe('123-45-6789'); // Should be encrypted
});
test('access to PHI is logged', async () => {
await api.get('/patients/123', {
headers: { 'User-Id': 'doctor456' }
});
const auditLog = await db.auditLogs.findOne({
resourceType: 'patient',
resourceId: '123',
userId: 'doctor456'
});
expect(auditLog.action).toBe('read');
expect(auditLog.timestamp).toBeDefined();
});
PCI-DSS Compliance Testing
// Test payment card handling
test('credit card numbers not stored', async () => {
await api.post('/payment', {
cardNumber: '4242424242424242',
expiry: '12/25', cvv: '123'
});
const payment = await db.payments.findOne({ /* ... */ });
expect(payment.cardNumber).toBeUndefined();
expect(payment.last4).toBe('4242'); // Only last 4
expect(payment.tokenId).toBeDefined(); // Token from gateway
});
test('CVV never stored', async () => {
const payments = await db.raw('SELECT * FROM payments');
const hasCVV = payments.some(p =>
JSON.stringify(p).toLowerCase().includes('cvv')
);
expect(hasCVV).toBe(false);
});
Agent-Driven Compliance
// Comprehensive compliance validation
await Task("Compliance Validation", {
regulations: ['GDPR', 'PCI-DSS'],
scope: 'full-application',
generateAuditReport: true
}, "qe-security-scanner");
// Returns:
// {
// gdpr: { compliant: true, controls: 12, passed: 12 },
// pciDss: { compliant: false, controls: 8, passed: 7 },
// violations: [{ control: 'card-storage', severity: 'critical' }],
// auditReport: 'compliance-audit-2025-12-02.pdf'
// }
Agent Coordination Hints
Memory Namespace
aqe/compliance-testing/
├── regulations/* - Regulation requirements
├── controls/* - Control test results
├── audit-reports/* - Generated audit reports
└── violations/* - Compliance violations
Fleet Coordination
const complianceFleet = await FleetManager.coordinate({
strategy: 'compliance-validation',
agents: [
'qe-security-scanner', // Scan for vulnerabilities
'qe-test-executor', // Execute compliance tests
'qe-quality-gate' // Block non-compliant releases
],
topology: 'sequential'
});
Related Skills
- security-testing - Security vulnerabilities
- test-data-management - PII handling
- accessibility-testing - Legal requirements
Remember
Compliance is mandatory, not optional. Fines are severe: GDPR up to €20M or 4% of revenue, HIPAA up to $1.5M per violation. But beyond fines, non-compliance damages reputation and user trust.
Audit trail everything. Every access to sensitive data, every consent, every deletion must be logged with timestamps and user IDs.
With Agents: Agents validate compliance requirements continuously, detect violations early, and generate audit-ready reports. Catch compliance issues in development, not in audits.
GitHub 仓库
相关推荐技能
test-data-management
其他此Skill为开发者提供战略性的测试数据生成与管理方案,特别关注隐私合规。它能帮助你在创建测试数据时,自动生成合成数据、匿名化处理PII,并确保符合GDPR/CCPA等法规要求。其核心能力包括使用Faker库生成数据、对生产数据进行掩码/哈希处理,以及为单元测试到大规模集成测试等不同场景提供可扩展的数据生成策略。
security-checklist
元该Skill为开发者提供安全审计和防护实施的一站式指导,包含OWASP Top 10防护、身份验证模式和输入验证策略等关键内容。适用于进行安全评审、处理敏感数据或确保合规要求时快速获取最佳实践。帮助开发者在构建和审计应用时系统性地防范常见漏洞。
compliance-dev
开发该Skill帮助开发者在Ëtrid区块链中快速构建合规治理功能,支持创建KYC/AML钩子、监管切换模块和DAO审计日志。它能自动集成制裁名单API并生成合规代码框架,让开发者轻松满足金融科技和去中心化应用的监管要求。
audit-dev
开发audit-dev是为Ëtrid治理审计优化的AI开发工具,能够自动检查提案与章程的合规性并生成争议解决钩子。它使用Rust和Python构建,可创建链下审计报告来增强治理透明度。开发者可通过scripts/audit_engine.rs快速部署自动化审计流程。
