[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79ZB9699S0BM22F43M949T7":3,"skill-same:01M79ZB9699S0BM22F43M949T7":55},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":28,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M79ZB9699S0BM22F43M949T7","go-security-audit",null,"kongnakornna\u002Fgolangapi","kongnakornna","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F10528904?v=4","01M79Z5JQPPV5CWQHXS235Q9MD","Kongnakorn Jantakun","01M79Z5JRHJJJ6PR2DGQS4P985",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fgo-agent-skills\u002Fskills\u002F(safety)\u002Fgo-security-audit\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: go-security-audit\ndescription: >\n  Security review for Go applications: input validation, SQL injection,\n  authentication\u002Fauthorization, secrets management, TLS, OWASP Top 10, and\n  secure coding patterns. Use when performing security reviews, checking for\n  vulnerabilities, hardening Go services, or reviewing auth implementations.\n  Trigger examples: \"security review\", \"check vulnerabilities\", \"OWASP\",\n  \"SQL injection\", \"input validation\", \"secrets management\", \"auth review\".\n  Not for: dependency CVEs (go-dependency-audit), concurrency safety\n  (go-concurrency-review).\nuser-invocable: true\nlicense: MIT\ncompatibility: Designed for Claude Code or similar AI coding agents working on Go projects. Requires the Go toolchain. govulncheck, gosec and gitleaks are optional. Read-only: this skill reports findings, it does not edit code.\nallowed-tools: Read Glob Grep Bash(go:*) Bash(gofmt:*) Bash(govulncheck:*) Bash(gosec:*) Bash(gitleaks:*)\nmetadata:\n  author: eduardo-sl\n  version: \"1.4.0\"\n---\n\n# Go Security Audit\n\nSecurity is not a feature — it's a property. Every line of code either\nmaintains it or degrades it.\n\n## Operating Modes\n\nPick the mode that matches the request before starting:\n\n- **Targeted check** — a single concern (\"is this query injectable?\",\n  \"review this auth middleware\"). Apply only the relevant sections.\n- **Diff audit** — audit the changed lines of a PR or working tree for\n  every concern below.\n- **Full audit** (default for \"security review the service\") — sweep the\n  codebase using the parallel passes in \"Auditing Large Codebases\".\n\n## Run the Scanners First\n\nBefore manual review, run the automated scanners and fold their output\ninto the findings (skip any that is not installed and note it):\n\n```bash\ngovulncheck .\u002F...       # known CVEs actually reachable from your code\ngosec .\u002F...             # static analysis for insecure patterns\ngo vet .\u002F...            # includes some security-relevant checks\n```\n\nScanners find the known patterns; the manual passes below find the\nlogic flaws they cannot.\n\n## Auditing Large Codebases\n\nEach numbered section below is an independent audit pass. For codebases\nbeyond ~20 files:\n\n1. Locate the attack surface first: HTTP\u002FgRPC handlers, CLI entry\n   points, queue consumers, and anything parsing external input.\n2. Run one pass per concern: (a) input validation + injection,\n   (b) authentication\u002Fauthorization, (c) secrets + crypto,\n   (d) TLS + security headers + rate limiting, (e) logging hygiene.\n3. If your environment supports delegating work to parallel sub-agents\n   or tasks, assign each pass to one — the passes don't overlap.\n   Otherwise run them sequentially.\n4. Every finding must cite `file.go:line`, the vulnerable input path,\n   and a concrete fix. Aggregate into one report sorted by severity.\n\nDetailed reference material, loaded on demand:\n\n- `references\u002Finjection.md` — boundary validation, sanitization,\n  parameterized and dynamic queries.\n- `references\u002Fauth-and-transport.md` — passwords, JWT, authorization\n  middleware, secrets, TLS, headers, rate limiting.\n\nRead a reference file only when the section below is not enough.\n\n## 1. Input Validation\n\nValidate at the boundary, before the value reaches any business code:\n\n- Cap the request body with `http.MaxBytesReader` — an unbounded decoder is\n  a memory exhaustion vector.\n- Decode into a typed struct, then validate it. A decode that succeeds is not\n  a value that is valid.\n- Reject rather than repair. Reply with the status code, not with the\n  internal error text.\n- Sanitize anything rendered back as HTML (`bluemonday`), parse emails with\n  `net\u002Fmail`, and reject URLs whose scheme is not `http`\u002F`https`.\n\nExamples in `references\u002Finjection.md`.\n\n## 2. SQL Injection Prevention\n\nALWAYS pass values as query parameters. There is no safe amount of string\nconcatenation:\n\n```go\n\u002F\u002F ✅ Good — parameterized\nrow := db.QueryRowContext(ctx, \"SELECT id, name FROM users WHERE email = $1\", email)\n\n\u002F\u002F ❌ CRITICAL — SQL injection\nquery := \"SELECT * FROM users WHERE email = '\" + email + \"'\"\nquery := fmt.Sprintf(\"SELECT * FROM users WHERE id = %s\", id)\n```\n\nDynamic filters are built by appending placeholders (`$1`, `$2`, …) and\ncollecting the values into an `args` slice — never by interpolating the value\nitself. Table and column names cannot be parameterized: allowlist them\nagainst a fixed set.\n\nExamples in `references\u002Finjection.md`.\n\n## 3. Authentication & Authorization\n\n- Hash passwords with `bcrypt` (or argon2id). NEVER store plaintext, NEVER\n  use MD5\u002FSHA — they are fast, which is the wrong property here.\n- Compare with `bcrypt.CompareHashAndPassword`, which is constant-time.\n  Hand-rolled comparisons leak timing.\n- Validate every JWT claim that matters: signature with the expected\n  algorithm, `exp`, `iss`, `aud`. Reject `alg: none` and never hardcode the\n  signing key.\n- Authorize per request in middleware, reading the identity from the request\n  context. An endpoint with no role check is a public endpoint.\n- Check ownership, not only role: a valid token for user A must not read\n  user B's row.\n\nExamples in `references\u002Fauth-and-transport.md`.\n\n## 4. Secrets Management\n\n- 🔴 NEVER hardcode secrets, tokens, or API keys in source code\n- 🔴 NEVER commit secrets to git (even in \"test\" files)\n- 🔴 NEVER log secrets, tokens, or passwords\n\nRead them from the environment or a secrets manager, keep `.env`, `*.pem`,\n`*.key` and `credentials.json` in `.gitignore`, and run `gitleaks detect` in\nCI so a leak fails the build instead of ageing in history.\n\nExamples in `references\u002Fauth-and-transport.md`.\n\n## 5. Transport, Headers and Rate Limiting\n\n- Set `X-Content-Type-Options: nosniff`, `X-Frame-Options: DENY`, a\n  `Content-Security-Policy`, and HSTS on every response.\n- TLS: `MinVersion: tls.VersionTLS12` and an explicit cipher suite list.\n  NEVER `InsecureSkipVerify: true` outside a test.\n- Rate limit auth endpoints, public APIs, and anything expensive, keyed per\n  client rather than globally.\n\nExamples in `references\u002Fauth-and-transport.md`.\n\n## 6. Logging Security\n\nLog the identifier, never the credential:\n\n```go\n\u002F\u002F ❌ CRITICAL\nlog.Printf(\"user login: email=%s password=%s\", email, password)\nlog.Printf(\"request body: %v\", req) \u002F\u002F may contain secrets\n\n\u002F\u002F ✅ Good — redacted\nlogger.Info(\"auth completed\", slog.String(\"user_id\", userID))\n```\n\nWhole-struct logging is the common leak: a `%v` on a request struct prints\nwhatever field someone adds next sprint.\n\n## Security Audit Checklist\n\n### Critical (🔴 BLOCKER)\n- No SQL injection vectors (all queries parameterized)\n- No hardcoded secrets\u002Fkeys\u002Ftokens\n- No plaintext password storage\n- No disabled TLS certificate verification\n- Request body size limited\n- JWT signature verified, `alg: none` rejected\n\n### Important (🟡 WARNING)\n- Input validation on all external data\n- Rate limiting on auth and public endpoints\n- Security headers set on all responses\n- CORS configured restrictively\n- Error messages don't leak internals\n- Audit logging for auth events\n\n### Recommended (🟢 SUGGESTION)\n- `govulncheck` in CI pipeline\n- `gitleaks` for secret scanning\n- Structured logging with redaction\n- Dependency pinning with verified checksums\n","# Go Security Audit\n\nSecurity is not a feature — it's a property. Every line of code either\nmaintains it or degrades it.\n\n## Operating Modes\n\nPick the mode that matches the request before starting:\n\n- **Targeted check** — a single concern (\"is this query injectable?\",\n  \"review this auth middleware\"). Apply only the relevant sections.\n- **Diff audit** — audit the changed lines of a PR or working tree for\n  every concern below.\n- **Full audit** (default for \"security review the service\") — sweep the\n  codebase using the parallel passes in \"Auditing Large Codebases\".\n\n## Run the Scanners First\n\nBefore manual review, run the automated scanners and fold their output\ninto the findings (skip any that is not installed and note it):\n\n```bash\ngovulncheck .\u002F...       # known CVEs actually reachable from your code\ngosec .\u002F...             # static analysis for insecure patterns\ngo vet .\u002F...            # includes some security-relevant checks\n```\n\nScanners find the known patterns; the manual passes below find the\nlogic flaws they cannot.\n\n## Auditing Large Codebases\n\nEach numbered section below is an independent audit pass. For codebases\nbeyond ~20 files:\n\n1. Locate the attack surface first: HTTP\u002FgRPC handlers, CLI entry\n   points, queue consumers, and anything parsing external input.\n2. Run one pass per concern: (a) input validation + injection,\n   (b) authentication\u002Fauthorization, (c) secrets + crypto,\n   (d) TLS + security headers + rate limiting, (e) logging hygiene.\n3. If your environment supports delegating work to parallel sub-agents\n   or tasks, assign each pass to one — the passes don't overlap.\n   Otherwise run them sequentially.\n4. Every finding must cite `file.go:line`, the vulnerable input path,\n   and a concrete fix. Aggregate into one report sorted by severity.\n\nDetailed reference material, loaded on demand:\n\n- `references\u002Finjection.md` — boundary validation, sanitization,\n  parameterized and dynamic queries.\n- `references\u002Fauth-and-transport.md` — passwords, JWT, authorization\n  middleware, secrets, TLS, headers, rate limiting.\n\nRead a reference file only when the section below is not enough.\n\n## 1. Input Validation\n\nValidate at the boundary, before the value reaches any business code:\n\n- Cap the request body with `http.MaxBytesReader` — an unbounded decoder is\n  a memory exhaustion vector.\n- Decode into a typed struct, then validate it. A decode that succeeds is not\n  a value that is valid.\n- Reject rather than repair. Reply with the status code, not with the\n  internal error text.\n- Sanitize anything rendered back as HTML (`bluemonday`), parse emails with\n  `net\u002Fmail`, and reject URLs whose scheme is not `http`\u002F`https`.\n\nExamples in `references\u002Finjection.md`.\n\n## 2. SQL Injection Prevention\n\nALWAYS pass values as query parameters. There is no safe amount of string\nconcatenation:\n\n```go\n\u002F\u002F ✅ Good — parameterized\nrow := db.QueryRowContext(ctx, \"SELECT id, name FROM users WHERE email = $1\", email)\n\n\u002F\u002F ❌ CRITICAL — SQL injection\nquery := \"SELECT * FROM users WHERE email = '\" + email + \"'\"\nquery := fmt.Sprintf(\"SELECT * FROM users WHERE id = %s\", id)\n```\n\nDynamic filters are built by appending placeholders (`$1`, `$2`, …) and\ncollecting the values into an `args` slice — never by interpolating the value\nitself. Table and column names cannot be parameterized: allowlist them\nagainst a fixed set.\n\nExamples in `references\u002Finjection.md`.\n\n## 3. Authentication & Authorization\n\n- Hash passwords with `bcrypt` (or argon2id). NEVER store plaintext, NEVER\n  use MD5\u002FSHA — they are fast, which is the wrong property here.\n- Compare with `bcrypt.CompareHashAndPassword`, which is constant-time.\n  Hand-rolled comparisons leak timing.\n- Validate every JWT claim that matters: signature with the expected\n  algorithm, `exp`, `iss`, `aud`. Reject `alg: none` and never hardcode the\n  signing key.\n- Authorize per request in middleware, reading the identity from the request\n  context. An endpoint with no role check is a public endpoint.\n- Check ownership, not only role: a valid token for user A must not read\n  user B's row.\n\nExamples in `references\u002Fauth-and-transport.md`.\n\n## 4. Secrets Management\n\n- 🔴 NEVER hardcode secrets, tokens, or API keys in source code\n- 🔴 NEVER commit secrets to git (even in \"test\" files)\n- 🔴 NEVER log secrets, tokens, or passwords\n\nRead them from the environment or a secrets manager, keep `.env`, `*.pem`,\n`*.key` and `credentials.json` in `.gitignore`, and run `gitleaks detect` in\nCI so a leak fails the build instead of ageing in history.\n\nExamples in `references\u002Fauth-and-transport.md`.\n\n## 5. Transport, Headers and Rate Limiting\n\n- Set `X-Content-Type-Options: nosniff`, `X-Frame-Options: DENY`, a\n  `Content-Security-Policy`, and HSTS on every response.\n- TLS: `MinVersion: tls.VersionTLS12` and an explicit cipher suite list.\n  NEVER `InsecureSkipVerify: true` outside a test.\n- Rate limit auth endpoints, public APIs, and anything expensive, keyed per\n  client rather than globally.\n\nExamples in `references\u002Fauth-and-transport.md`.\n\n## 6. Logging Security\n\nLog the identifier, never the credential:\n\n```go\n\u002F\u002F ❌ CRITICAL\nlog.Printf(\"user login: email=%s password=%s\", email, password)\nlog.Printf(\"request body: %v\", req) \u002F\u002F may contain secrets\n\n\u002F\u002F ✅ Good — redacted\nlogger.Info(\"auth completed\", slog.String(\"user_id\", userID))\n```\n\nWhole-struct logging is the common leak: a `%v` on a request struct prints\nwhatever field someone adds next sprint.\n\n## Security Audit Checklist\n\n### Critical (🔴 BLOCKER)\n- No SQL injection vectors (all queries parameterized)\n- No hardcoded secrets\u002Fkeys\u002Ftokens\n- No plaintext password storage\n- No disabled TLS certificate verification\n- Request body size limited\n- JWT signature verified, `alg: none` rejected\n\n### Important (🟡 WARNING)\n- Input validation on all external data\n- Rate limiting on auth and public endpoints\n- Security headers set on all responses\n- CORS configured restrictively\n- Error messages don't leak internals\n- Audit logging for auth events\n\n### Recommended (🟢 SUGGESTION)\n- `govulncheck` in CI pipeline\n- `gitleaks` for secret scanning\n- Structured logging with redaction\n- Dependency pinning with verified checksums\n",{},"main","19f4d52a98d557f3a645a2cfbbeb5bd54f28831d",".github\u002Fskills\u002Fgo-agent-skills\u002Fskills\u002F(safety)\u002Fgo-security-audit","https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi","https:\u002F\u002Fgithub.com\u002Fkongnakornna","http:\u002F\u002Fcmoniot.trueddns.com:52160","Technical Skills and Expertise\r\nLanguages and Frameworks\r\nFrontend: HTML, JavaScript, TypeScript, React, Vue, Angular, Next.js\r\nBackend: Node.js,Python,Golang","2026-10-06 23:01:46",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add kongnakornna\u002Fgolangapi --skill go-security-audit",{"tool":37,"command":38},"bunx","bunx skills add kongnakornna\u002Fgolangapi --skill go-security-audit",{"tool":40,"command":41},"pnpm","pnpm dlx skills add kongnakornna\u002Fgolangapi --skill go-security-audit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fgo-agent-skills\u002Fskills\u002F(safety)\u002Fgo-security-audit\u002FSKILL.md",true,[45,51],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"references\u002Fauth-and-transport.md","REFERENCE","参考文档",3056,"https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fgo-agent-skills\u002Fskills\u002F(safety)\u002Fgo-security-audit\u002Freferences\u002Fauth-and-transport.md",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Finjection.md",2155,"https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fgo-agent-skills\u002Fskills\u002F(safety)\u002Fgo-security-audit\u002Freferences\u002Finjection.md",[56,63,70,77,84,91],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":18},"01M7A0M9RJJ3383VEFYKABWV15","tb-writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftb-writing-plans\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M7A0M4JKY4DEDRP1CBHT00WV","tb-using-git-worktrees","Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback","https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftb-using-git-worktrees\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":18},"01M7A0KZ5HRAQAAT2KXR6146Q7","tb-test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftb-test-driven-development\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":18},"01M7A0KW92W3F18E2MRP8H62P2","tb-subagent-driven-development","Use when executing implementation plans with independent tasks in the current session","https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftb-subagent-driven-development\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M7A0KKYQCHYYRHA5J5BAP24M","tb-scrutinize","Outsider-perspective end-to-end review of a plan, PR, or code change. First questions intent and whether a simpler\u002Fmore elegant approach would achieve the same goal, then traces the actual code path (not just the diff) to verify the change does what it claims. Output is concise, actionable, and every call carries its rationale. Trigger on \u002Ftb-scrutinize and proactively whenever the user asks to review, audit, sanity-check, or get a second opinion on a plan, PR, diff, design doc, or proposed code change.","https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftb-scrutinize\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":18},"01M7A0KFDR1V3RW7SW1XNHP82P","tb-requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftb-requesting-code-review\u002FSKILL.md",[],[]]