audit-compliance — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited audit-compliance (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Audit code against regulatory compliance frameworks. Score each changed or specified file against 7 compliance dimensions, map findings to specific regulatory clauses, and write a report with line-number evidence. Works on any web, backend, or data-handling project.
Default behavior: audit-only. Fixes are opt-in via --fix. Writing to _local/reports/ is opt-in via --report.
/audit:all --tier=enterprise or on its own when compliance is the concernNot a substitute for a human DPO, legal counsel, or accredited auditor. This skill finds code-level gaps; it does not certify compliance.
$ARGUMENTS — optional flags:
--framework=<list> — comma-separated target frameworks. Valid: gdpr, iso27001, iso9001, hipaa, soc2, pci. Default: gdpr,iso27001,iso9001 (the free/global core trio).--scope=<path> — limit to a specific directory (default: entire project, excluding node_modules, dist, build, .next, __pycache__, vendor, target).--files=<glob> — audit only files matching a glob (e.g., src/api/**/*.ts). Useful for reviewing a PR diff.--fix — propose and apply code-level fixes for findings where the remediation is mechanical (missing validators, unsanitized log calls, missing error handling). Architectural findings stay as report items.--audit-only — explicitly report only (DEFAULT if no fix flag given).--report — save full report to _local/reports/compliance-audit-<YYYY-MM-DD>.md.--report=<path> — save to a specific path.--strict — treat every PARTIALLY COMPLIANT rating as a failure and warnings as findings. Use for enterprise / certification contexts.Read project files to identify stack. This drives which patterns to search for and which evidence counts as "protection."
| Signal | How | Record |
|---|---|---|
| Language | package.json → Node/TS, pyproject.toml/requirements.txt → Python, go.mod → Go, Cargo.toml → Rust, Gemfile → Ruby, pom.xml/build.gradle → JVM | Primary language(s) |
| Framework | next/express/fastify/hono/nestjs → Node; django/flask/fastapi/starlette → Python; gin/echo/fiber → Go; rails/sinatra → Ruby | Framework + version |
| Database | Grep deps for prisma, typeorm, sequelize, drizzle, mongoose, pg, mysql2, sqlalchemy, psycopg, redis, sqlite3 | DB type(s) or "none" |
| Auth | Grep deps for next-auth, passport, clerk, auth0, supabase, firebase-auth, django.contrib.auth, devise, lucia | Auth library or "custom" / "none" |
| Has user data | Grep for user-scoped tables/models, user_id, email, phone, ssn, dob, address | true/false |
| Has file uploads | Grep for multer, formidable, multipart, request.files, UploadFile | true/false |
| Has logging | Grep for winston, pino, bunyan, logging.getLogger, logrus, zap, structured logger | logger name or "console" / "none" |
| Has analytics/telemetry | Grep for segment, mixpanel, amplitude, ga4, sentry, datadog, opentelemetry | list or "none" |
| Deployment target | Dockerfile, vercel.json, netlify.toml, serverless.yml, k8s/, cloudformation/ | target or "unknown" |
If any of these exist in the project, read them once and use as ground truth:
DATA_MAP.md, data-map.md, docs/data-map.md — storage locations, PII classificationsdpia.md, docs/dpia.md, _project/reports/dpia.md — existing DPIAcompliance-strategy.md, compliance/, _project/compliance*.md — existing strategy docsPRIVACY.md, privacy-policy.md, public/privacy*.html — privacy policyROPA.md, records-of-processing.md — GDPR Article 30 recordsSECURITY.md — security policyCHANGELOG.md — recent security/privacy-relevant changesIf a previous compliance-audit-report.md exists, read its "Known Open Findings" section and do not re-flag resolved or deferred items unless the code has regressed.
--files=<glob> → audit exactly those files.--scope=<path> → audit source files under that path.full → audit all source files in the default source roots (src/, app/, lib/, api/, pkg/, internal/).main (git diff --name-only main...HEAD). If not a git repo or no diff, fall back to full with a warning printed to the user.Print the resolved file list count before starting: Auditing N files under frameworks: [list].
Every audited file gets rated on all 7 dimensions. Rating scale: C (compliant), PC (partially compliant), NC (non-compliant), N/A (dimension does not apply to this file).
Frameworks: GDPR Art. 5 (data minimization, storage limitation, purpose limitation); ISO 27001 A.8.10 (information deletion), A.8.12 (data leakage prevention); HIPAA §164.312(a)(2)(iv); PCI DSS 3.x; SOC 2 CC6.5.
Checks:
SELECT *, .findAll() without projection, wildcard spreads into storage.fields / projection / select parameters exposed to callers so they can minimize what they retrieve?limit, max_records, upload max_size)?PASS evidence: explicit fields/projection param, hard limits, retention/TTL config, cleanup in finally blocks. FAIL evidence: unbounded queries, no size caps, PII written to persistent storage with no retention policy.
Frameworks: GDPR Art. 32 (security of processing); ISO 27001 A.5.15 (access control), A.5.18 (access rights), A.8.2 (privileged access); HIPAA §164.312(a)(1); SOC 2 CC6.1-CC6.3; PCI DSS 7.x.
Checks:
owner_id === user.id checks, RBAC lookups, policy engines.PASS evidence: auth middleware wraps the file's handlers, per-resource ownership checks, tenant-scoped queries at the ORM/DB layer. FAIL evidence: handlers that read user_id from the request body, missing @auth_required decorators, where clauses that skip tenant scoping.
Frameworks: ISO 27001 A.8.28 (secure coding); OWASP ASVS 5.x; PCI DSS 6.2.4; HIPAA §164.312(c)(1).
Checks:
parseInt(x) without a range check.JSON.parse(req.body) on unbounded input)?PASS evidence: every public entry point has schema validation on its inputs, allowlist checks on enum-ish params. FAIL evidence: raw req.body fields flow into queries, regex-only email validation, missing size caps on JSON parsing.
Frameworks: GDPR Art. 32 (pseudonymization, encryption); ISO 27001 A.8.24 (cryptography), A.8.11 (data masking); HIPAA §164.312(e); PCI DSS 3.4, 4.1.
Checks:
http:// URLs for API calls)?PASS evidence: structured logger with field allowlist, masking middleware applied globally, HTTPS-only config, log scrubbing in strict mode. FAIL evidence: logger.info(req.body), stack traces returned to clients, http:// base URLs, PII in error responses.
Frameworks: GDPR Art. 30 (records of processing), Art. 33 (breach notification requires logs); ISO 27001 A.8.15 (logging), A.8.16 (monitoring); HIPAA §164.312(b); PCI DSS 10.x; SOC 2 CC7.
Checks:
PASS evidence: structured logger with correlation IDs, auth/access/delete events logged, log shipping configured, retention set. FAIL evidence: print() / console.log for important actions, no correlation IDs, free-form strings, no log retention config.
Frameworks: GDPR Art. 32 (confidentiality — no info leakage); ISO 27001 A.5.24 (incident management), A.8.29 (security testing); OWASP ASVS 7.x.
Checks:
PASS evidence: global error handler, typed error classes converted to safe client messages, full context in server logs. FAIL evidence: res.status(500).send(err.stack), bare raise in handlers, unhandled async errors, sensitive data in error messages.
Frameworks: GDPR Art. 12-14 (transparency), Art. 30 (ROPA), Art. 35 (DPIA); ISO 9001 7.5 (documented information); ISO 27001 A.5.1 (policies), A.5.10 (acceptable use); HIPAA §164.316.
Checks:
x-pii, Prisma /// PII)?CHANGELOG.md?PASS evidence: docstrings on public surface, PII annotations, changelog entries for security fixes, DATA_MAP entry for new storage. FAIL evidence: undocumented public handlers, new storage location not in DATA_MAP, new PII field with no classification.
Every finding uses this format. The identifier F-{XX} is sequential within this audit run (start at F-01).
### F-{XX} ({severity}) — {framework}: {title}
**Dimension:** D{N} — {dimension name}
**Description:** {one or two sentences describing the gap}
**Regulatory Requirement:** {specific clause, e.g., "GDPR Art. 32(1)(a) — pseudonymization of personal data"}
**Affected Files:**
- `path/to/file.ts:42` — {what was found}
- `path/to/other.ts:118` — {what was found}
**Evidence:** {actual code snippet or grep hit}
**Mitigation:** {concrete remediation — code-level where possible}
**Status:** OPENSeverity levels:
Framework tag format: GDPR, ISO27001, ISO9001, HIPAA, SOC2, PCI. If a finding spans multiple frameworks, use the strictest (e.g., GDPR+HIPAA).
--framework (default: gdpr, iso27001, iso9001). Compliance Audit
Frameworks: GDPR, ISO 27001:2022, ISO 9001:2015
Stack: Next.js 14 + TypeScript + Prisma/Postgres + NextAuth
Files: 12 files under src/api/**
Mode: audit-onlyFor every target file:
N/A (e.g., D2 on a pure utility file with no handlers, D4 on a file with no outputs) or "applicable."For large audits, delegate each file (or group of files) to an Agent tool call with a self-contained prompt, so per-file context doesn't bloat the main conversation. The agent prompt should include: the file path, the framework list, the 7 dimensions from this skill, and the finding format. Run agents sequentially, not in parallel, so you can feed each one context from the previous (for example, resolved findings that should not be re-flagged).
Print the summary to the conversation. Save the full report only if --report is set.
Report location logic (same as other audit-* skills):
_local/reports/ exists → save there_local/ exists → create _local/reports/ and save there.gitignore contains _local → create _local/reports/ and save therecompliance-audit-<YYYY-MM-DD>.md and warn the user it's tracked by gitFilename format: compliance-audit-<YYYY-MM-DD>.md. If running multiple times per day, append -N.
Report format:
# Compliance Audit Report — [Project Name]
**Date:** YYYY-MM-DD | **Frameworks:** [list] | **Scope:** [path]
**Stack:** [detected] | **Mode:** [audit-only | fix] | **Strict:** [yes/no]
## Executive Summary
| Framework | Grade | HIGH | MEDIUM | LOW | INFO |
|-----------|-------|------|--------|-----|------|
| GDPR | B | 0 | 3 | 2 | 1 |
| ISO 27001:2022 | B | 0 | 2 | 1 | 0 |
| ISO 9001:2015 | A | 0 | 0 | 1 | 0 |
| **Overall** | **B** | **0** | **5** | **4** | **1** |
## Dimension Scores
| Dimension | Files C | Files PC | Files NC | N/A |
|-----------|---------|----------|----------|-----|
| D1 — Data Handling | 8 | 3 | 0 | 1 |
| D2 — Access Control | 9 | 2 | 1 | 0 |
| D3 — Input Validation | 7 | 4 | 1 | 0 |
| D4 — Output Sanitization | 10 | 1 | 0 | 1 |
| D5 — Audit Trail | 6 | 5 | 1 | 0 |
| D6 — Error Handling | 8 | 3 | 0 | 1 |
| D7 — Documentation | 5 | 6 | 1 | 0 |
## Known Open Findings (from prior audits)
- {list any carried over, with status}
## New Findings
### HIGH
{F-01, F-02, ... with full detail}
### MEDIUM
{F-03, F-04, ...}
### LOW
{F-05, F-06, ...}
### INFO
{F-07, ...}
## Priority Actions
1. {top 5-10 most impactful findings with file:line}
## Artifacts Updated
- `DATA_MAP.md` — [updated / no change / not present]
- `_project/reports/dpia.md` — [updated / no change / not present]
- `_project/reports/compliance-audit-report.md` — [this file]
---AUDIT-SUMMARY---
audit: compliance
critical: 0
high: N
medium: N
low: N
score: [A-F grade]
skipped: false
skip_reason:
---END-SUMMARY---The ---AUDIT-SUMMARY--- block must appear at the end of the report, formatted exactly as above, so audit-all can parse it. In this skill, critical maps to HIGH findings that are also regulatory non-compliance (i.e., HIGH + framework citation).
After writing the report, inspect findings for the following triggers:
DATA_MAP.md (or create one at project root if missing)dpia.mdCHANGELOG.md under [Unreleased] with ### Security categoryREADME.md or project config docsOnly modify these files if they already exist or the finding clearly justifies creating one. Never create compliance boilerplate that isn't backed by a specific finding.
If --fix is the active flag, apply mechanical fixes only:
logger.info(req.body) with a field-allowlisted log call, or remove the call.Never auto-fix:
After fixing: run the project's build/lint/test commands (if detected) and fix any breakage. Append a ## Fixes Applied section to the report.
These are non-negotiable:
compliance-audit-report.md and respect its "Resolved" / "Deferred" sections unless the code has regressed.INFO — requires infrastructure review, not as findings.When invoked via /audit:all, this skill receives a condensed instruction from the orchestrator and writes its report to a numbered file (e.g., mega-audit-9-compliance-YYYY-MM-DD.md). It must end with the ---AUDIT-SUMMARY--- block so the orchestrator can parse counts.
Default framework list when invoked from audit-all is gdpr,iso27001,iso9001. Tier enterprise adds hipaa,soc2,pci if the project's stack suggests they apply (HIPAA if health data signals; PCI if payment processing; SOC 2 always in enterprise tier).
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.