Audit Expert
Expert guidance for security auditing, compliance assessments, code reviews, vulnerability assessments, and regulatory compliance (SOC 2, GDPR, HIPAA, PCI-DSS).
Core Concepts
Audit Types
- Security Audit: Vulnerability assessment, penetration testing
- Code Audit: Code review, static analysis, security patterns
- Compliance Audit: SOC 2, GDPR, HIPAA, PCI-DSS, ISO 27001
- Infrastructure Audit: Configuration review, access control
- Process Audit: SDLC, change management, incident response
Audit Frameworks
- OWASP ASVS (Application Security Verification Standard)
- NIST Cybersecurity Framework
- CIS Controls
- ISO 27001/27002
- SOC 2 Trust Service Criteria
Audit Process
- Planning and scoping
- Information gathering
- Vulnerability identification
- Risk assessment
- Reporting
- Remediation tracking
- Follow-up verification
Audit Reporting
Security Audit Report Template
class SecurityAuditReport {
constructor() {
this.findings = [];
this.summary = {
critical: 0,
high: 0,
medium: 0,
low: 0,
info: 0,
};
}
addFinding(finding) {
this.findings.push({
id: this.findings.length + 1,
severity: finding.severity,
title: finding.title,
description: finding.description,
location: finding.location,
recommendation: finding.recommendation,
references: finding.references || [],
cvssScore: finding.cvssScore,
status: 'open',
discoveredAt: new Date(),
});
this.summary[finding.severity]++;
}
generateReport() {
return {
reportDate: new Date(),
auditor: 'Security Team',
scope: this.scope,
summary: this.summary,
findings: this.findings.sort(
(a, b) =>
this.severityWeight(b.severity) - this.severityWeight(a.severity)
),
recommendations: this.generateRecommendations(),
};
}
severityWeight(severity) {
const weights = { critical: 5, high: 4, medium: 3, low: 2, info: 1 };
return weights[severity] || 0;
}
generateRecommendations() {
return [
'Address all critical and high severity findings immediately',
'Implement security code review process',
'Conduct regular penetration testing',
'Provide security training for developers',
'Establish vulnerability disclosure program',
];
}
}
// Usage
const audit = new SecurityAuditReport();
audit.addFinding({
severity: 'critical',
title: 'SQL Injection in User Search',
description: 'User search endpoint concatenates user input into SQL query',
location: 'src/controllers/users.js:45',
recommendation: 'Use parameterized queries or ORM with proper escaping',
references: ['CWE-89', 'OWASP A03:2021'],
cvssScore: 9.8,
});
const report = audit.generateReport();
Best Practices
Audit Preparation
- Define scope and objectives
- Gather documentation
- Review previous audit findings
- Prepare audit checklist
- Schedule with stakeholders
During Audit
- Follow systematic approach
- Document all findings
- Collect evidence
- Maintain objectivity
- Communicate preliminary findings
Post-Audit
- Prepare detailed report
- Present findings to stakeholders
- Develop remediation plan
- Track remediation progress
- Schedule follow-up audit
Anti-Patterns to Avoid
❌ Auditing own code: Use independent reviewers
❌ Incomplete scope: Define clear boundaries
❌ No follow-up: Track remediation to completion
❌ Generic findings: Provide specific, actionable recommendations
❌ Ignoring context: Consider business requirements
❌ No prioritization: Rank findings by risk and impact
Reference Documentation
Detailed material lives alongside this skill and is read on demand:
- Compliance Auditing — GDPR Compliance Checklist, SOC 2 Compliance Audit, PCI-DSS Compliance
Reference Documentation
Detailed material lives alongside this skill and is read on demand:
- Security Code Review — Authentication Review, SQL Injection Review, Authorization Review, XSS and Output Encoding Review
Resources
1---
2name: audit-expert
3version: 1.1.0
4description: >-
5 Expert-level security auditing, compliance, code review, and vulnerability assessment.
6 Use when the user mentions compliance, security review, code review, vulnerability
7 assessment, SOC 2, or GDPR, or when the task involves Audit Types, Audit Frameworks,
8 Audit Process, or Authentication Review.
9category: security
10tags:
11 [
12 audit,
13 compliance,
14 security-review,
15 code-review,
16 vulnerability-assessment,
17 soc2,
18 gdpr,
19 ]
20allowed-tools:
21 - Read
22 - Write
23 - Edit
24 - Bash(git:*, grep:*, find:*)
25metadata:
26 source: https://skillmd.com/skills/personamanagmentlayer/audit-expert
27---
28
29# Audit Expert
30
31Expert guidance for security auditing, compliance assessments, code reviews, vulnerability assessments, and regulatory compliance (SOC 2, GDPR, HIPAA, PCI-DSS).
32
33## Core Concepts
34
35### Audit Types
36
37- **Security Audit**: Vulnerability assessment, penetration testing
38- **Code Audit**: Code review, static analysis, security patterns
39- **Compliance Audit**: SOC 2, GDPR, HIPAA, PCI-DSS, ISO 27001
40- **Infrastructure Audit**: Configuration review, access control
41- **Process Audit**: SDLC, change management, incident response
42
43### Audit Frameworks
44
45- OWASP ASVS (Application Security Verification Standard)
46- NIST Cybersecurity Framework
47- CIS Controls
48- ISO 27001/27002
49- SOC 2 Trust Service Criteria
50
51### Audit Process
52
531. Planning and scoping
542. Information gathering
553. Vulnerability identification
564. Risk assessment
575. Reporting
586. Remediation tracking
597. Follow-up verification
60
61## Audit Reporting
62
63### Security Audit Report Template
64
65```javascript
66class SecurityAuditReport {
67 constructor() {
68 this.findings = [];
69 this.summary = {
70 critical: 0,
71 high: 0,
72 medium: 0,
73 low: 0,
74 info: 0,
75 };
76 }
77
78 addFinding(finding) {
79 this.findings.push({
80 id: this.findings.length + 1,
81 severity: finding.severity,
82 title: finding.title,
83 description: finding.description,
84 location: finding.location,
85 recommendation: finding.recommendation,
86 references: finding.references || [],
87 cvssScore: finding.cvssScore,
88 status: 'open',
89 discoveredAt: new Date(),
90 });
91
92 this.summary[finding.severity]++;
93 }
94
95 generateReport() {
96 return {
97 reportDate: new Date(),
98 auditor: 'Security Team',
99 scope: this.scope,
100 summary: this.summary,
101 findings: this.findings.sort(
102 (a, b) =>
103 this.severityWeight(b.severity) - this.severityWeight(a.severity)
104 ),
105 recommendations: this.generateRecommendations(),
106 };
107 }
108
109 severityWeight(severity) {
110 const weights = { critical: 5, high: 4, medium: 3, low: 2, info: 1 };
111 return weights[severity] || 0;
112 }
113
114 generateRecommendations() {
115 return [
116 'Address all critical and high severity findings immediately',
117 'Implement security code review process',
118 'Conduct regular penetration testing',
119 'Provide security training for developers',
120 'Establish vulnerability disclosure program',
121 ];
122 }
123}
124
125// Usage
126const audit = new SecurityAuditReport();
127
128audit.addFinding({
129 severity: 'critical',
130 title: 'SQL Injection in User Search',
131 description: 'User search endpoint concatenates user input into SQL query',
132 location: 'src/controllers/users.js:45',
133 recommendation: 'Use parameterized queries or ORM with proper escaping',
134 references: ['CWE-89', 'OWASP A03:2021'],
135 cvssScore: 9.8,
136});
137
138const report = audit.generateReport();
139```
140
141## Best Practices
142
143### Audit Preparation
144
1451. Define scope and objectives
1462. Gather documentation
1473. Review previous audit findings
1484. Prepare audit checklist
1495. Schedule with stakeholders
150
151### During Audit
152
1531. Follow systematic approach
1542. Document all findings
1553. Collect evidence
1564. Maintain objectivity
1575. Communicate preliminary findings
158
159### Post-Audit
160
1611. Prepare detailed report
1622. Present findings to stakeholders
1633. Develop remediation plan
1644. Track remediation progress
1655. Schedule follow-up audit
166
167## Anti-Patterns to Avoid
168
169❌ **Auditing own code**: Use independent reviewers
170❌ **Incomplete scope**: Define clear boundaries
171❌ **No follow-up**: Track remediation to completion
172❌ **Generic findings**: Provide specific, actionable recommendations
173❌ **Ignoring context**: Consider business requirements
174❌ **No prioritization**: Rank findings by risk and impact
175
176## Reference Documentation
177
178Detailed material lives alongside this skill and is read on demand:
179
180- [Compliance Auditing](references/COMPLIANCE_AUDITING.md) — GDPR Compliance Checklist, SOC 2 Compliance Audit, PCI-DSS Compliance
181
182## Reference Documentation
183
184Detailed material lives alongside this skill and is read on demand:
185
186- [Security Code Review](references/SECURITY_CODE_REVIEW.md) — Authentication Review, SQL Injection Review, Authorization Review, XSS and Output Encoding Review
187
188## Resources
189
190- OWASP ASVS: https://owasp.org/www-project-application-security-verification-standard/
191- NIST Framework: https://www.nist.gov/cyberframework
192- CIS Controls: https://www.cisecurity.org/controls/
193- SOC 2: https://www.aicpa.org/interestareas/frc/assuranceadvisoryservices/aicpasoc2report.html
194- GDPR: https://gdpr.eu/
195- PCI-DSS: https://www.pcisecuritystandards.org/