Agent Skillsphuc-nt/my-translator › ck:security

ck:security

GitHub

基于STRIDE和OWASP标准的安全审计技能,支持代码漏洞扫描、严重性分级报告及迭代自动修复,适用于发布前审查或合规检查。

.opencode/skills/ck-security/SKILL.md phuc-nt/my-translator

Trigger Scenarios

发布或重大部署前的安全检查 涉及认证、支付或数据处理功能的新增后审查 定期安全审计(月度/季度) 合规性检查准备(如SOC 2, GDPR)

Install

npx skills add phuc-nt/my-translator --skill ck:security -g -y
More Options

Non-standard path

npx skills add https://github.com/phuc-nt/my-translator/tree/main/.opencode/skills/ck-security -g -y

Use without installing

npx skills use phuc-nt/my-translator@ck:security

指定 Agent (Claude Code)

npx skills add phuc-nt/my-translator --skill ck:security -a claude-code -g -y

安装 repo 全部 skill

npx skills add phuc-nt/my-translator --all -g -y

预览 repo 内 skill

npx skills add phuc-nt/my-translator --list

SKILL.md

Frontmatter
{
    "name": "ck:security",
    "metadata": {
        "author": "claudekit",
        "license": "MIT",
        "version": "1.0.0",
        "attribution": "Security audit pattern adapted from autoresearch by Udit Goenka (MIT)"
    },
    "description": "STRIDE + OWASP-based security audit with optional auto-fix. Scans code for vulnerabilities, categorizes by severity, and can iteratively fix findings using ck:autoresearch pattern.",
    "argument-hint": "<scope glob or 'full'> [--fix] [--iterations N]"
}

ck:security — Security Audit

Runs a structured STRIDE + OWASP security audit on a given scope. Produces a severity-ranked findings report. With --fix, applies fixes iteratively using the ck:autoresearch guard pattern.

When to Use

  • Before a release or major deployment
  • After adding auth, payment, or data-handling features
  • Periodic security review (monthly/quarterly)
  • Compliance check (SOC 2, GDPR, PCI-DSS prep)

When NOT to Use

  • Purely cosmetic changes (CSS, copy edits)
  • No user-facing code or data handling involved

Modes

Mode Invocation Behavior
Audit only /ck:security <scope> Scan → categorize → report
Audit + Fix /ck:security <scope> --fix Scan → categorize → fix iteratively
Bounded fix /ck:security <scope> --fix --iterations N Limit fix iterations to N

Audit Methodology

1. Scope Resolution

Expand the provided glob or full keyword into a file list. Read all in-scope files before analysis.

2. STRIDE Analysis

Evaluate each threat category systematically:

  • Spoofing — identity/authentication weaknesses
  • Tampering — input validation, integrity controls
  • Repudiation — audit logging gaps
  • Information Disclosure — data leakage, secret exposure
  • Denial of Service — rate limits, resource exhaustion
  • Elevation of Privilege — broken access control, RBAC gaps

3. OWASP Top 10 Check

Map findings to OWASP categories (A01–A10). See references/stride-owasp-checklist.md for per-category checks.

4. Dependency Audit

Run the appropriate package audit tool for the detected stack:

  • Node.js: npm audit
  • Python: pip-audit
  • Go: govulncheck
  • Ruby: bundle audit

5. Secret Detection

Scan for hardcoded API keys, passwords, tokens, and private keys using regex patterns. See references/stride-owasp-checklist.md → Secret Patterns.

6. Finding Categorization

Assign each finding a severity level (see Severity Definitions below).


Output Format

## Security Audit Report

### Summary
- Files scanned: N
- Findings: X critical, Y high, Z medium, W low, V info

### Findings

| # | Severity | Category | File:Line | Description | Fix Recommendation |
|---|----------|----------|-----------|-------------|-------------------|
| 1 | Critical  | Injection | api/users.ts:45 | SQL string concatenation | Use parameterized queries |
| 2 | High      | Auth      | auth/login.ts:12 | No rate limiting | Add express-rate-limit |

Fix Mode (--fix)

When --fix is provided, apply fixes iteratively after the audit:

  1. Sort all findings by severity (Critical → High → Medium → Low)
  2. For each finding: a. Apply one targeted fix b. Run guard (tests or lint) to verify no regression c. Commit: security(fix-N): <short description> d. Advance to next finding
  3. Stop early if guard fails — report the failure instead of proceeding
  4. Uses ck:autoresearch guard pattern for regression prevention

Tip: Use --iterations N to cap total fix iterations when scope is large.


Severity Definitions

Severity Description Fix Priority
Critical Exploitable now, data breach or RCE risk Immediate — block release
High Exploitable with moderate effort, significant impact This sprint
Medium Limited exploitability or impact Next sprint
Low Theoretical risk, defense-in-depth improvement Backlog
Info Best practice suggestion, no direct risk Optional

Integration with Other Skills

  • Run after ck:predict when the security persona flags concerns
  • Feed Critical/High findings into ck:autoresearch --fix for automated remediation
  • Use ck:scenario with --focus authorization for deeper auth flow testing
  • Pair with ck:plan to schedule Medium/Low findings as sprint tasks

Example Invocations

# Audit API layer only
/ck:security src/api/**/*.ts

# Audit entire src/ and auto-fix, max 15 iterations
/ck:security src/ --fix --iterations 15

# Full codebase audit (no fix)
/ck:security full

See references/stride-owasp-checklist.md for the detailed per-category checklist and secret detection regex patterns.

Version History

  • 3495f99 Current 2026-07-25 07:19

Same Skill Collection

.opencode/skills/agent-browser/SKILL.md
.opencode/skills/ai-artist/SKILL.md
.opencode/skills/ai-multimodal/SKILL.md
.opencode/skills/ask/SKILL.md
.opencode/skills/backend-development/SKILL.md
.opencode/skills/better-auth/SKILL.md
.opencode/skills/bootstrap/SKILL.md
.opencode/skills/brainstorm/SKILL.md
.opencode/skills/chrome-devtools/SKILL.md
.opencode/skills/ck-autoresearch/SKILL.md
.opencode/skills/ck-debug/SKILL.md
.opencode/skills/ck-loop/SKILL.md
.opencode/skills/ck-plan/SKILL.md
.opencode/skills/ck-predict/SKILL.md
.opencode/skills/ck-scenario/SKILL.md
.opencode/skills/code-review/SKILL.md
.opencode/skills/coding-level/SKILL.md
.opencode/skills/context-engineering/SKILL.md
.opencode/skills/cook/SKILL.md
.opencode/skills/copywriting/SKILL.md
.opencode/skills/databases/SKILL.md
.opencode/skills/deploy/SKILL.md
.opencode/skills/devops/SKILL.md
.opencode/skills/docs-seeker/SKILL.md
.opencode/skills/docs/SKILL.md
.opencode/skills/fix/SKILL.md
.opencode/skills/frontend-design/SKILL.md
.opencode/skills/frontend-development/SKILL.md
.opencode/skills/git/SKILL.md
.opencode/skills/gkg/SKILL.md
.opencode/skills/google-adk-python/SKILL.md
.opencode/skills/journal/SKILL.md
.opencode/skills/kanban/SKILL.md
.opencode/skills/llms/SKILL.md
.opencode/skills/markdown-novel-viewer/SKILL.md
.opencode/skills/mcp-builder/SKILL.md
.opencode/skills/mcp-management/SKILL.md
.opencode/skills/media-processing/SKILL.md
.opencode/skills/mermaidjs-v11/SKILL.md
.opencode/skills/mobile-development/SKILL.md
.opencode/skills/payment-integration/SKILL.md
.opencode/skills/plans-kanban/SKILL.md
.opencode/skills/preview/SKILL.md
.opencode/skills/problem-solving/SKILL.md
.opencode/skills/project-management/SKILL.md
.opencode/skills/project-organization/SKILL.md
.opencode/skills/react-best-practices/SKILL.md
.opencode/skills/remotion/SKILL.md
.opencode/skills/repomix/SKILL.md

Metadata

Files
0
Version
3495f99
Hash
2d01dd0b
Indexed
2026-07-25 07:19

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 19:08
浙ICP备14020137号-1 $방문자$