oc-security-auditor — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited oc-security-auditor (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
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.
On first invocation, read `references/orchestrator.md` and follow its welcome protocol.
Practice-level security assessment that operates above oc-code-auditor. Where oc-code-auditor greps for SQL injection and hardcoded secrets, oc-security-auditor asks: What's the threat model? Who are the adversaries? What's exposed? Is the infrastructure hardened? Are we compliant?
Three pillars: Threat Modeling, Compliance Mapping, Runtime Hardening.
For all output formats and report templates, read references/output-templates.md.
SECURITY AUDITOR COMMANDS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
THREAT MODELING
/oc-security threat-model Full STRIDE analysis of the application
/oc-security attack-surface Map all entry points, data flows, trust boundaries
/oc-security adversaries Profile likely threat actors and their capabilities
/oc-security data-flow Trace sensitive data from ingress to storage to egress
COMPLIANCE
/oc-security owasp OWASP Top 10 compliance checklist (current year)
/oc-security posture Full posture assessment (all three pillars)
/oc-security readiness [framework] SOC2 / ISO27001 / HIPAA / PCI-DSS readiness gaps
/oc-security report Regenerate posture report from last checkpoint
RUNTIME HARDENING
/oc-security headers Audit HTTP security headers (CSP, HSTS, X-Frame, etc.)
/oc-security tls TLS/SSL configuration check
/oc-security dns DNS security (DNSSEC, CAA, SPF/DKIM/DMARC)
/oc-security cloudflare Cloudflare-specific: WAF, Bot Management, Page Rules
/oc-security infra Full infrastructure hardening sweep
UTILITIES
/oc-security prioritize Rank all findings by risk × effort matrix
/oc-security compare [before] [after] Compare two posture snapshots
/checkpoint Show checkpoint status
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Type any command to begin. /oc-security to see this again.| Layer | Owner | Examples |
|---|---|---|
| Code-level | oc-code-auditor | SQLi, XSS, hardcoded secrets, auth middleware, dep vulns |
| Architecture-level | oc-security-auditor | Threat models, trust boundaries, data flow, attack surface |
| Compliance-level | oc-security-auditor | OWASP Top 10 mapping, SOC2 gap analysis, policy checklists |
| Infra/runtime-level | oc-security-auditor | CSP headers, TLS config, DNS security, WAF rules |
Chaining rules:
/oc-audit security (oc-code-auditor) → oc-security-auditor takes the architecture + infra layers/oc-security posture step 2 → check if oc-code-auditor checkpoint exists. If not,Invoke the Skill tool with skill "oc-code-auditor" and args "/oc-audit security — <app code, for the threat model>" before proceeding. Threat modeling without code-level findings is incomplete.
/oc-security threat-model)For each component, evaluate all six STRIDE categories:
| Category | Question | Example Finding |
|---|---|---|
| Spoofing | Can an attacker impersonate a user or system? | API-to-API calls use shared secret with no rotation |
| Tampering | Can data be modified in transit or at rest? | No integrity checks on database writes |
| Repudiation | Can a user deny performing an action? | No audit log on data mutation endpoints |
| Information Disclosure | Can sensitive data leak? | Error responses include stack traces; keys enumerable |
| Denial of Service | Can the service be made unavailable? | No rate limiting on public endpoints |
| Elevation of Privilege | Can a user gain unauthorized access? | User ID from client header, not verified session |
If none exists, scan the codebase for: routes, databases, external APIs, auth flows, static assets, scheduled tasks, WebSocket connections.
gets all six STRIDE checks.
RISK = LIKELIHOOD × IMPACT
Likelihood: HIGH (script kiddie, public, no auth) · MEDIUM (insider/chained) · LOW (physical/privileged)
Impact: HIGH (breach, full compromise) · MEDIUM (partial exposure, degradation) · LOW (info leak, cosmetic)
│ Low Impact │ Med Impact │ High Impact
───────────┼────────────┼────────────┼────────────
High Likl. │ MEDIUM │ HIGH │ CRITICAL
Med Likl. │ LOW │ MEDIUM │ HIGH
Low Likl. │ LOW │ LOW │ MEDIUM/oc-security attack-surface)Enumerate every entry point: HTTP endpoints, data stores, external integrations, static assets, trust boundaries. See references/output-templates.md for the table format.
/oc-security adversaries)Define realistic threat actors for the application. Generic starting set:
| Actor | Motivation | Capability | Relevant STRIDE |
|---|---|---|---|
| Opportunist | Curiosity, low-effort gain | Automated scanners, public exploits | S, I, D |
| Disgruntled user | Revenge, disruption | Authenticated access, social engineering | T, R, E |
| Data harvester | PII/PHI for resale | Scripted enumeration, credential stuffing | S, I |
| Competitive actor | IP theft | Targeted recon, API abuse | I, E |
| Supply chain | Backdoor access via deps | Compromised npm/pip package, typosquatting | T, E, I |
Tailor to the specific app. A personal fitness tracker has different adversaries than a multi-tenant SaaS platform. Remove actors that don't apply; add app-specific ones.
/oc-security data-flow)Trace every sensitive data type from ingress to egress. Connective tissue between attack surface mapping and STRIDE — shows exactly where sensitive data is vulnerable.
Process:
| Classification | Description | Examples |
|---|---|---|
| PUBLIC | Intentionally public | Marketing copy, public API docs |
| INTERNAL | Not secret, not public | App config, feature flags |
| CONFIDENTIAL | User/business data needing protection | Email, analytics, preferences |
| RESTRICTED | Regulated or highly sensitive | PHI, PII, financial data, credentials |
validation → processing → storage → retrieval → egress. Flag every trust boundary crossing. See references/output-templates.md for the trace format.
mismatches (RESTRICTED data with INTERNAL-level controls), retention beyond need.
attack surface map, assess:
This is not full vendor management — it's a lightweight exposure check that feeds into STRIDE (Spoofing, Information Disclosure) and the OWASP supply-chain and integrity categories (A06/A08 in the 2021 numbering below).
/oc-security owasp)For each OWASP category, assess the application's posture. Use web search to confirm the current list (it updates every few years; a 2025 edition has superseded 2021). Fallback if search is unavailable — the 2021 edition, labelled as such in the report so nobody mistakes it for the current list:
A01: Broken Access Control · A02: Cryptographic Failures · A03: Injection · A04: Insecure Design · A05: Security Misconfiguration · A06: Vulnerable/Outdated Components · A07: Identification and Authentication Failures · A08: Software and Data Integrity Failures · A09: Security Logging and Monitoring Failures · A10: Server-Side Request Forgery (SSRF)
Status per category: ✅ PASS, ⚠️ PARTIAL, ❌ FAIL. See references/output-templates.md for the assessment format.
/oc-security readiness [framework])Supported: SOC2, ISO27001, HIPAA, PCI-DSS. Generate a gap analysis of applicable controls vs. current state. See references/output-templates.md for format.
Important: This is readiness mapping, not certification. Always note that actual compliance requires formal assessment by qualified auditors.
/oc-security report)Regenerates the posture report from the current checkpoint without re-running assessments. Requires a checkpoint with at least one completed pillar. If no checkpoint exists, redirects to /oc-security posture.
/oc-security headers)Check the deployed application's response headers. If a URL is available, fetch it (WebFetch, or curl -sI <url>). Otherwise, check the code for header-setting logic.
| Header | Secure Value | Why |
|---|---|---|
Content-Security-Policy | Restrictive, no unsafe-inline | XSS mitigation |
Strict-Transport-Security | max-age=31536000; includeSubDomains; preload | Force HTTPS |
X-Content-Type-Options | nosniff | MIME sniffing prevention |
X-Frame-Options | DENY or SAMEORIGIN | Clickjacking prevention |
Referrer-Policy | strict-origin-when-cross-origin | Referrer leakage |
Permissions-Policy | Restrict camera, microphone, geolocation | Feature control |
Cross-Origin-Opener-Policy | same-origin | Spectre mitigation |
Cross-Origin-Resource-Policy | same-origin or same-site | Resource isolation |
Score: X/8 headers configured correctly. Priority fix whichever has highest impact.
Note: X-XSS-Protection is intentionally excluded — it's deprecated and can introduce vulnerabilities in older browsers. If present in a response, don't flag as a finding; CSP supersedes it. If set, recommend X-XSS-Protection: 0 to disable legacy behavior.
/oc-security tls)Check: TLS 1.2+ (1.3 preferred), certificate validity, cipher suite strength, HSTS preload status. For edge-proxied sites (Cloudflare, Vercel), TLS is automatic — focus on the platform-specific TLS settings instead.
/oc-security dns)Check: DNSSEC, CAA records, SPF/DKIM/DMARC (if domain sends email), no dangling CNAMEs (subdomain takeover risk), no unintentional wildcard DNS.
/oc-security cloudflare)Platform routing: The checks below use Cloudflare as the default (matching the opchain stack). For other platforms, adapt the equivalent controls:
| Category | Cloudflare | Vercel | AWS |
|---|---|---|---|
| Edge TLS | SSL/TLS settings | Automatic | ACM + CloudFront |
| WAF | Managed Rules (OWASP Core) | Vercel Firewall | AWS WAF |
| DDoS | Under Attack Mode | Automatic | Shield + CloudFront |
| Bot protection | Bot Management | Bot Protection | Bot Control |
| Rate limiting | Rate Limiting Rules | App-level | API Gateway throttling |
Cloudflare-specific checks (when applicable):
| Setting | Recommended | Why |
|---|---|---|
| SSL/TLS mode | Full (Strict) | Anything less allows MITM |
| Always Use HTTPS | On | Prevents HTTP downgrade |
| Minimum TLS Version | 1.2 | Block legacy clients |
| WAF Managed Rules | On (OWASP Core) | Base protection |
| Bot Fight Mode | On | Bot mitigation |
| Rate Limiting | Per-endpoint rules | DoS protection |
| Browser Integrity Check | On | Basic bot filter |
| Security Level | Medium+ | Challenge threshold |
If Cloudflare MCP is connected: Use it to read actual configuration. If not, check wrangler.toml and advise on dashboard settings.
/oc-security infra)Runs all runtime checks in sequence: headers → TLS → DNS → platform config → detection/response → cross-reference with threat model if one exists.
Pre-deployment projects: If no live URL exists, skip runtime checks (headers, TLS, DNS) and instead audit the code that sets these values — middleware, response headers in source, wrangler.toml/vercel.json config. Flag missing header-setting code as findings rather than testing live responses. Resume runtime checks after first deployment.
Every hardening sweep includes detection/response checks. Prevention fails eventually (Principle 6: Assume Breach).
| Check | What to Look For |
|---|---|
| Audit logging | Auth events, data mutations, admin actions logged? |
| Log integrity | Append-only or shipped to immutable storage? |
| Alerting | Anomalous patterns (brute force, data exfil) alerted? |
| Incident response | Documented IR plan? Who's on-call? |
| Backup & recovery | Backups tested? RPO/RTO defined? |
| Forensic readiness | Can you reconstruct what happened? |
Proportional thresholds:
| Tier | Minimum Detection/Response |
|---|---|
| Lite (personal, non-sensitive) | Audit log on auth; manual backup |
| Standard (multi-user, sensitive) | Full audit log, error alerting, weekly backups |
| Comprehensive (public, regulated) | All six checks, tested IR plan, automated backups |
/oc-security posture)The full-stack assessment. Runs all three pillars and produces an executive report.
Before running checks, determine assessment depth. Ask the user (AskUserQuestion when available, otherwise in chat):
| Factor | Options |
|---|---|
| Data sensitivity | Public only · User PII · PHI/financial · Regulated |
| Exposure | Internal only · Authenticated users · Public-facing |
| User scale | Personal (1-2) · Small team (<50) · Production (50+) |
These determine the assessment tier:
| Tier | Criteria | What Runs |
|---|---|---|
| Lite | Personal, public data, 1-2 users | STRIDE overview, basic headers, skip compliance |
| Standard | User PII, authenticated, small team | Full STRIDE, OWASP Top 10, full hardening |
| Comprehensive | PHI/financial, public-facing, regulated | All pillars + framework readiness + detection/response |
Auto-detect from checkpoints when possible; confirm with user. Don't run Comprehensive on a personal hobby app (Principle 7).
Tier scope is advisory for `/oc-security posture` only. Individual commands (/oc-security owasp, /oc-security headers, etc.) always run at full depth regardless of tier — if the user explicitly asks, deliver.
Monorepo scoping: For multi-app repos (like acme-core), assess per-app — each app has its own data sensitivity, attack surface, and tier. Shared infrastructure (single Cloudflare account, shared D1 instance, common auth) gets assessed once and cross-referenced by each app's report. Write one checkpoint per app, not one per repo: treat each app directory as the project-dir, so each lands at <app-dir>/.checkpoints/oc-security-auditor.checkpoint.json.
oc-code-auditor, oc-deploy-ops — the protocol-public fields only (header, progress, progress_summary, context_primer, blockers, eval_scores), never their skill_state.
/oc-audit security first. Architecture-level assessment without code-level findings is incomplete.
(Its checkpoint carries only grade and counts; individual findings come from its audit report in this session or its HIGH+ PM sub-tickets.) Do hardening gaps align with attack surface exposure? Flag anything in threat model not covered by code or infra controls.
references/output-templates.md for format./oc-security prioritize)Takes all findings across pillars and produces a risk × effort matrix:
│ Small Effort │ Medium Effort │ Large Effort
─────────────────┼──────────────┼───────────────┼─────────────
CRITICAL Risk │ DO NOW │ DO NOW │ PLAN NOW
HIGH Risk │ DO NOW │ PLAN NEXT │ PLAN NEXT
MEDIUM Risk │ QUICK WIN │ BACKLOG │ BACKLOG
LOW Risk │ QUICK WIN │ ACCEPT │ ACCEPTOutput: Findings sorted into buckets with specific next actions.
/oc-security compare)Compares two posture snapshots to track improvement. The checkpoint is a single file that each assessment overwrites, so a "before" snapshot is that tracked file at an earlier revision (git show <rev>:.checkpoints/oc-security-auditor.checkpoint.json) or a copy archived under .checkpoints/history/. Input: two revisions, dates, or checkpoint paths. If one argument, compares it against the current checkpoint. Diffs finding counts, OWASP score, header score. Highlights regressions prominently. See references/output-templates.md for format.
The shared checkpoint schema, write rules and resume protocol live in references/checkpoint-protocol.md, bundled with this skill. This section adds only what is specific to oc-security-auditor.
{project-dir}/.checkpoints/oc-security-auditor.checkpoint.json
| Event | What to Save |
|---|---|
| Assessment started | Scope, tier (Lite/Standard/Comprehensive), project |
| Threat model complete | STRIDE finding counts (the attack surface map and adversary profiles live in the report, not the checkpoint) |
| OWASP check complete | Per-category status, overall score |
| Hardening sweep complete | Header scores, TLS/DNS status, platform config, detection/response |
| Posture report generated | Finding count by risk + remediation-plan flag in skill_state; restate tier and counts in progress_summary and the tier as a context_primer.key_decisions entry ("Tier: standard") — the fields sibling skills read |
| Finding addressed | Finding ID, verification status |
{
"scope": "posture", // posture | threat-model | compliance | hardening
"tier": "standard",
"pillar_status": {
"threat_model": "complete",
"compliance": "complete",
"hardening": "in_progress"
},
"findings_total": 14,
"findings_by_risk": { "CRITICAL": 0, "HIGH": 2, "MEDIUM": 8, "LOW": 4 },
"owasp_score": "7/10",
"header_score": "5/8",
"detection_response_score": "3/6",
"detection_response_applicable": 6,
"remediation_plan_generated": true,
"code_auditor_checkpoint_read": true
}| Reads from | Why |
|---|---|
| oc-reverse-spec | Architecture, component inventory, data flows |
| oc-app-architect | Spec, auth design, data model |
| oc-code-auditor | Grade + counts in progress_summary (trend score in eval_scores); individual findings from its report or PM sub-tickets → cross-reference, don't duplicate |
| oc-deploy-ops | Deployment config, environment variables, platform settings |
| oc-stack-forge | Platform capabilities and limitations |
| oc-rag-forge | Tenant-isolation filter contract (and PII in embeddings) → posture input for retrieval apps |
| Read by | Why | |
|---|---|---|
| oc-deploy-ops | Assessment on record + counts → deployment gate; no assessment on record blocks `/oc-deploy staging\ | prod` unless waived |
| oc-app-architect | Security requirements → inform spec updates | |
| oc-scale-ops | DoS findings → capacity planning input | |
| oc-monitoring-ops | Detection/response requirements from the runtime-hardening sweep → what to monitor and alert on | |
| oc-security-hardening | Tier (context_primer.key_decisions) → baseline depth; findings from the posture report or the PM tickets below → remediation queue (v1.9) | |
| oc-compliance-ops | /oc-security readiness gaps seed the standing control register (v1.9) |
Remediation handoff (v1.9): when an assessment produces actionable findings, invoke the Skill tool with skill "oc-security-hardening" and args "/oc-harden fix — <finding>" per finding, or Invoke the Skill tool with skill "oc-security-hardening" and args "/oc-harden baseline — <fresh project>" — then re-assess the touched pillar (/oc-security posture) and run /oc-security compare to confirm the score moved (compare diffs snapshots; it never re-assesses on its own). This skill assesses; it does not apply fixes.
Security findings have higher impact than code findings: they often require coordinated remediation across teams + a paper trail for audit. v1.2 routes /oc-secaudit output through the PM tool with slightly different rules from oc-code-auditor. See oc-integrations-engineer for the canonical PM-MCP patterns.
After every /oc-secaudit run, post a structured summary on the linked PM ticket (if any):
Security audit: Posture grade {A-F}.
STRIDE findings: {C N, H N, M N, L N}
OWASP Top 10: {N FAIL, N PARTIAL, N PASS}
Top three (by exploitability × impact):
1. {component} — {one-line finding}
...
Compliance lens: {SOC2 / ISO27001 / HIPAA / PCI-DSS mapping summary}
Counts + tier: .checkpoints/oc-security-auditor.checkpoint.jsonCRITICAL findings get the incident issue-type from .opchain/pm.yaml, not bug:
priority: highest tier.labels: security, incident, severity:CRITICAL,compliance:<framework-if-relevant>.
parent: the source PR ticket if invoked from one; otherwiseunparented.
assignee: unassigned, unless remediation_owners.security is set in.opchain/pm.yaml (an optional key — see oc-integrations-engineer's pm.yaml example).
body: full finding + threat-model reference + suggestedremediation + compliance-impact statement.
Why incident-typed: a CRITICAL security finding is treated as an active operational concern, not a backlog bug. Incident-typed tickets in most PM tools route to on-call workflows + status pages.
HIGH findings get filed as bug-typed sub-tickets parent-linked to the source PR ticket, same shape as oc-code-auditor's HIGH+ pattern. Labels include security, severity:HIGH, and the relevant OWASP category.
In regulated runs (the readiness frameworks above; CMMC or FedRAMP only when the user supplies that control catalogue) the crosswalk artifact (mapping findings → compliance controls) is also attached to the ticket as a comment + uploaded as a file attachment if the PM tool supports it. The crosswalk is the auditor-facing artefact; the PM ticket is the engineer-facing surface.
/oc-secaudit re-runs check existing security tickets. A finding that no longer reproduces gets a oc-security-auditor verified clean in {sha} comment + transition to done. Regressions reopen the same ticket rather than create duplicates.
In environments with the broker / redactor / cross-domain rules described in oc-integrations-engineer/references/pm-mcp-protocol.md § Compliance posture, the oc-security-auditor's PM-MCP writes pass through the same broker as every other tool call — same audit log, same scope rules. The Security Lead role typically holds elevated PM-MCP scope by design.
ticket unparented; the gravity warrants a PM record even without context linkage.
audit on PM availability.
the body of compliance findings; only post the grade + count. No config records BAA/DPA status, so ask the user once and record the answer in skill_state.
is still insecure. Start with the threat model.
eyes open rather than creating an infinite backlog.
requireAuth() middleware to /api/admin/* routes" is actionable.
don't re-scan.
is the real assessment; compliance is the paper trail.
A hobby app doesn't need SOC2.
The deploy and sprint gates key on two artifacts this skill's work produces, not on the skill having been invoked. .opchain/hardening.yaml is the baseline /oc-harden baseline writes from these findings; once it exists, oc-deploy-ops' audit-gate row replays it with /oc-harden verify at every deploying SHA, so a repository without the manifest has that row permanently disarmed. security_review_ref is the path of this skill's posture or data-flow report, recorded on the oc-app-architect sprint entry (skill_state.sprints[].security_review_ref) for any sprint that touched auth, secrets or personal data; a sprint with such changes and a null ref is not PASS. A build-phase repository with neither artifact has had no security review, whatever the transcript says — run /oc-security data-flow once against the data-handling surface, commit the report, and let the rows arm.
After completing the existing verification criteria, obtain the source identity with node scripts/lib/release-evidence.mjs --print-candidate --json. Publish a versioned verification.verdict entry in this skill's checkpoint handoffs, using that exact candidate_identity object. This identity excludes checkpoint evidence from the source projection; it does not attest built bytes or ignored environment configuration. Do not manufacture PASS from a prior summary. Missing criteria produce FAIL or INCOMPLETE.
Required fields: a unique handoff id, contract_version: "1.0", type: "verification.verdict", ISO created_at and actual verified_at, producer: { "skill": "oc-security-auditor", "run_id": "<actual-run-id>" }, the printed candidate_identity as candidate, and payload: { "verdict": "PASS|FAIL|INCOMPLETE", "policy": "pre-deploy-security-posture-v1" }. Replace the verdict placeholder with the actual result. Preserve prior run history and write through the checkpoint protocol. If source content changes before evidence is committed, recompute the identity and re-run affected verification before producing a new handoff.
The deployment wrapper consumes this required handoff before building or deploying and blocks if it is missing, invalid, stale, or non-PASS. Executable verification is a separate A receipt, produced in the current checkout; this checkpoint is not a substitute.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.