[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74F45JP3CXW22HX93P6P80T":3,"skill-same:01M74F45JP3CXW22HX93P6P80T":52},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M74F45JP3CXW22HX93P6P80T","nextjs-server-action-safety",null,"Defend against client\u002Fserver boundary confusion in Next.js Server Actions. Patterns covered include authn drift in token-bound mutations, input validation at the action boundary, and mutation idempotency under retry. Triggers on Server Action authoring (functions with `use server` directive) and Next.js form-action references. OWASP ASI02 (Tool Misuse) plus ASI03 (Identity & Privilege Abuse -- authn drift) defense.","MILTONADINA\u002FDevOPs","MILTONADINA","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F106546372?v=4","01M74F3R2PP4Z04DQMMBHSQAT1","Milton Adina","01M74F3R3CHTKPXJV4RP7RR3W8",0,"MIT","https:\u002F\u002Fgithub.com\u002FMILTONADINA\u002FDevOPs\u002Fblob\u002Fmain\u002Fskills\u002Fstack-specific\u002Fnextjs\u002Fserver-action-safety\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: nextjs-server-action-safety\ndescription: Defend against client\u002Fserver boundary confusion in Next.js Server Actions. Patterns covered include authn drift in token-bound mutations, input validation at the action boundary, and mutation idempotency under retry. Triggers on Server Action authoring (functions with `use server` directive) and Next.js form-action references. OWASP ASI02 (Tool Misuse) plus ASI03 (Identity & Privilege Abuse -- authn drift) defense.\n---\n\n# Next.js Server Action Safety\n\n> Defends against **OWASP ASI02 (Tool Misuse)** -- a Server Action invoked\n> from a wrong client context (logged-out tab, different user's session, an\n> attacker's CSRF-shaped payload) re-invokes the server-side mutation with\n> the agent's logged-in privileges -- AND **OWASP ASI03 (Identity & Privilege\n> Abuse)** -- authn drift where a token-bound mutation runs with stale or\n> elevated identity because the action implicitly trusts client-passed\n> context instead of re-deriving identity from the server-side session.\n\n**Tradeoff:** Server Actions are a powerful ergonomic for mutations -- they\ncollapse the form-POST + route-handler + revalidation triad into one\nfunction declaration. The cost: the function is exposed at a public URL\n(Next.js compiles each action to a callable endpoint), so it must be\ntreated like any other public mutation entry point. Without the patterns\nbelow, the convenience leaks into the security model.\n\n---\n\n## Why this matters\n\nServer Actions look like local function calls (`await myAction(formData)`)\nbut they're actually HTTP POST endpoints generated at build time. Any\nauthenticated tab can invoke them. Any unauthenticated client can probe\nthe endpoint URL. Any code in the same Next.js app can import and call\nthem. The \"server-only\" annotation (`'use server'`) marks the boundary --\nit does NOT add authentication, authorization, validation, or rate\nlimiting.\n\nA handler that doesn't explicitly re-verify identity, validate input, and\nguard against replay is structurally identical to an unauthenticated POST\nendpoint. The familiar function-call surface hides this fact from authors\nwho haven't shipped Next.js mutations in production.\n\n---\n\n## Pattern 1 -- Re-derive identity from server-side session inside every action\n\nInside the action, ALWAYS read the session from a server-side source\n(cookie-backed session store, `auth()` helper, JWT verified against your\nown signing secret). Never trust an `actorId` \u002F `userId` \u002F `tenantId`\npassed as a form field or function argument -- it's attacker-controllable.\n\n```ts\n'use server';\n\nimport { auth } from '@\u002Flib\u002Fauth';\nimport { db } from '@\u002Flib\u002Fdb';\nimport { z } from 'zod';\n\nconst UpdateProfileInput = z.object({\n  displayName: z.string().min(1).max(120),\n  bio: z.string().max(2000).optional(),\n});\n\nexport async function updateProfile(formData: FormData) {\n  \u002F\u002F 1. Re-derive identity. session.userId is the server-side truth.\n  const session = await auth();\n  if (!session?.userId) {\n    throw new Error('unauthenticated');\n  }\n\n  \u002F\u002F 2. Validate input at the boundary -- the function signature accepts\n  \u002F\u002F    FormData (any shape); Zod is the runtime contract.\n  const parsed = UpdateProfileInput.safeParse({\n    displayName: formData.get('displayName'),\n    bio: formData.get('bio'),\n  });\n  if (!parsed.success) {\n    throw new Error('invalid input');\n  }\n\n  \u002F\u002F 3. Scope the mutation to the session-derived identity, not any\n  \u002F\u002F    client-passed identifier. db.user.update WHERE id = session.userId.\n  await db.user.update({\n    where: { id: session.userId },\n    data: parsed.data,\n  });\n}\n```\n\nA defender reviewing this action can answer in one minute: \"Who is this\nmutation acting on?\" The answer is \"the server-derived session user, not\nwhoever the client says they are.\"\n\n---\n\n## Pattern 2 -- Validate input with a runtime schema at the action boundary\n\nTypeScript types are compile-time only. The `FormData` argument is the\nreal runtime contract -- it's whatever the client posted, which may be\narbitrary strings, arrays, or absent fields.\n\nUse Zod \u002F Valibot \u002F a similar runtime validator. Validate at the first\nline of the action body. Reject invalid input with a generic error\nmessage (don't echo the invalid value back -- it's potentially attacker-\ncontrolled and may be reflected somewhere).\n\nThe validator's schema is also documentation: a defender can read it and\nknow exactly which fields the action accepts and what the bounds are.\n\n---\n\n## Pattern 3 -- Idempotency for mutations that the client may retry\n\nServer Actions are invoked from forms and from optimistic-UI patterns,\nboth of which can retry on transient failure (network blip, slow render,\nuser double-clicks Submit). A mutation that books a flight, charges a\ncard, or sends a message has to handle the retry without producing two\nside effects.\n\nThe universal pattern: an idempotency key passed through the action and\nchecked against a dedupe store. The Stripe-style approach works here too:\n\n```ts\n'use server';\n\nexport async function chargeOrder(formData: FormData) {\n  const session = await auth();\n  if (!session?.userId) throw new Error('unauthenticated');\n\n  const idempotencyKey = formData.get('idempotency_key')?.toString();\n  if (!idempotencyKey) throw new Error('missing idempotency key');\n\n  \u002F\u002F Dedupe via Redis SETNX (see security\u002Fwebhook-idempotency for the\n  \u002F\u002F full storage-strategy tradeoff). Same pattern, different surface.\n  const claimed = await redis.set(\n    `action:chargeOrder:${session.userId}:${idempotencyKey}`,\n    'processing',\n    { NX: true, EX: 3600 },\n  );\n  if (claimed !== 'OK') {\n    return { status: 'duplicate (idempotent)' };\n  }\n\n  \u002F\u002F ... perform the charge ...\n}\n```\n\nFor forms, generate the idempotency key on first render (client-side\n`crypto.randomUUID()`) and persist it through retry attempts on the same\nform instance.\n\n---\n\n## Anti-patterns\n\nThe following patterns SHALL NOT appear in production Server Actions. Each\nfails for the reason given.\n\n### Anti-pattern 1 -- Trusting client-passed actor identity\n\n```ts\n\u002F\u002F WRONG\nexport async function deletePost(formData: FormData) {\n  'use server';\n  const userId = formData.get('userId');  \u002F\u002F attacker-controlled!\n  await db.post.delete({ where: { authorId: userId } });\n}\n```\n\nAny client can post any `userId`. The action runs with whatever\nelevated DB privileges the server holds; the attacker just specified\nWHICH user's posts to delete. ASI03 (Identity & Privilege Abuse) by way\nof authn drift.\n\n### Anti-pattern 2 -- No runtime input validation\n\n```ts\n\u002F\u002F WRONG\nexport async function updatePrice(formData: FormData) {\n  'use server';\n  const price = formData.get('price');  \u002F\u002F could be \"FREE\", \"-1\", \"1e100\"\n  await db.product.update({ where: { id: ... }, data: { price } });\n}\n```\n\n`FormData.get` returns `string | File | null`. Without Zod (or equivalent)\nthe action accepts any string. The mutation can be coerced into negative\nprices, NaN, infinity, SQL-injection-shaped strings, or other unexpected\nvalues. The TypeScript signature `formData: FormData` says nothing about\nwhat's actually inside.\n\n### Anti-pattern 3 -- No idempotency on optimistic-UI retry surfaces\n\n```ts\n\u002F\u002F WRONG\nexport async function placeOrder(formData: FormData) {\n  'use server';\n  const session = await auth();\n  await db.order.create({ data: { userId: session.userId, ... } });\n  \u002F\u002F No retry guard. User double-clicks; two orders created.\n}\n```\n\nThe double-submit pattern produces two `db.order.create` calls with no\nway to detect the duplicate at the receiver. Always pair mutations that\nhave visible side effects (orders, charges, messages, deploys) with an\nidempotency-key check.\n\n---\n\n## Where the patterns fall short\n\nThese patterns assume a *server-trusted* session source (cookie-backed\nsession store, JWT verified server-side). They do not protect against:\n\n- Session-token theft (XSS exfiltrating the cookie, browser-history\n  leak). Defend at the session-store layer (HttpOnly + Secure +\n  SameSite=Strict cookies).\n- A compromised database user that bypasses the application layer\n  entirely. Defend at the DB-policy layer (Postgres RLS, Supabase\n  RLS -- see the `stack-specific\u002Fsupabase\u002Frls-policies` skill).\n- Cross-Site Request Forgery from same-site contexts that share the\n  user's cookie. Next.js adds a built-in check: Server Actions accept\n  only POST, and a request whose `Origin` host differs from its\n  `Host` \u002F `X-Forwarded-Host` is rejected (list any user-facing\n  origins that legitimately differ from the host the server sees in\n  `serverActions.allowedOrigins`). A request with no `Origin` header\n  is let through with a warning, so keep SameSite cookies as the\n  session-layer backstop.\n\nThis skill teaches the application-layer discipline; defense in depth\nlayers below it.\n\n---\n\n## ASI\u002FAST mapping\n\nThis skill addresses two canonical OWASP ASI 2026 categories from\n`governance\u002Fowasp-asi-2026\u002Fthreats.md`:\n\n- **ASI02 (Tool Misuse)** -- a Server Action invoked outside its\n  intended use context (logged-out tab, wrong tenant, CSRF-shaped\n  request) re-invokes the underlying mutation with the agent layer's\n  legitimate privileges. Treating Server Actions as public POST\n  endpoints and requiring per-action input validation + identity\n  re-derivation closes the misuse path.\n- **ASI03 (Identity & Privilege Abuse)** -- authn drift where the\n  action trusts client-passed identity (a `userId` form field, a\n  `tenantId` header) instead of re-deriving from server-side session.\n  Pattern 1 (re-derive identity) is the load-bearing defense.\n\n---\n\n## Testing\n\nFor each Server Action, write at least three tests:\n\n```ts\ntest('rejects unauthenticated invocation', async () => {\n  \u002F\u002F Call action with no session cookie. Expect throw.\n});\n\ntest('rejects malformed input', async () => {\n  \u002F\u002F Call action with FormData missing required fields or wrong types.\n});\n\ntest('idempotent on duplicate idempotency key', async () => {\n  \u002F\u002F Call action twice with same key. Expect second call to no-op.\n});\n```\n\nA skill is working when production incident reports stop mentioning\n\"action ran twice from double-click\", \"user X's post deleted by user Y\",\n\"price set to -1 via crafted form submit\".\n\n---\n\n## See also\n\n- `governance\u002Fowasp-asi-2026\u002Fthreats.md` -- ASI02 + ASI03 full text\n- `skills\u002Funiversal\u002Fsecurity\u002Fwebhook-idempotency\u002FSKILL.md` -- the\n  universal webhook-idempotency skill; Server Actions are a parallel\n  retry-prone surface that benefits from the same dedupe-store\n  discipline.\n- `skills\u002Fstack-specific\u002Fnextjs\u002Fcheck-route-types\u002FSKILL.md` -- the\n  complementary type-hygiene skill for Next.js route handlers.\n","# Next.js Server Action Safety\n\n> Defends against **OWASP ASI02 (Tool Misuse)** -- a Server Action invoked\n> from a wrong client context (logged-out tab, different user's session, an\n> attacker's CSRF-shaped payload) re-invokes the server-side mutation with\n> the agent's logged-in privileges -- AND **OWASP ASI03 (Identity & Privilege\n> Abuse)** -- authn drift where a token-bound mutation runs with stale or\n> elevated identity because the action implicitly trusts client-passed\n> context instead of re-deriving identity from the server-side session.\n\n**Tradeoff:** Server Actions are a powerful ergonomic for mutations -- they\ncollapse the form-POST + route-handler + revalidation triad into one\nfunction declaration. The cost: the function is exposed at a public URL\n(Next.js compiles each action to a callable endpoint), so it must be\ntreated like any other public mutation entry point. Without the patterns\nbelow, the convenience leaks into the security model.\n\n---\n\n## Why this matters\n\nServer Actions look like local function calls (`await myAction(formData)`)\nbut they're actually HTTP POST endpoints generated at build time. Any\nauthenticated tab can invoke them. Any unauthenticated client can probe\nthe endpoint URL. Any code in the same Next.js app can import and call\nthem. The \"server-only\" annotation (`'use server'`) marks the boundary --\nit does NOT add authentication, authorization, validation, or rate\nlimiting.\n\nA handler that doesn't explicitly re-verify identity, validate input, and\nguard against replay is structurally identical to an unauthenticated POST\nendpoint. The familiar function-call surface hides this fact from authors\nwho haven't shipped Next.js mutations in production.\n\n---\n\n## Pattern 1 -- Re-derive identity from server-side session inside every action\n\nInside the action, ALWAYS read the session from a server-side source\n(cookie-backed session store, `auth()` helper, JWT verified against your\nown signing secret). Never trust an `actorId` \u002F `userId` \u002F `tenantId`\npassed as a form field or function argument -- it's attacker-controllable.\n\n```ts\n'use server';\n\nimport { auth } from '@\u002Flib\u002Fauth';\nimport { db } from '@\u002Flib\u002Fdb';\nimport { z } from 'zod';\n\nconst UpdateProfileInput = z.object({\n  displayName: z.string().min(1).max(120),\n  bio: z.string().max(2000).optional(),\n});\n\nexport async function updateProfile(formData: FormData) {\n  \u002F\u002F 1. Re-derive identity. session.userId is the server-side truth.\n  const session = await auth();\n  if (!session?.userId) {\n    throw new Error('unauthenticated');\n  }\n\n  \u002F\u002F 2. Validate input at the boundary -- the function signature accepts\n  \u002F\u002F    FormData (any shape); Zod is the runtime contract.\n  const parsed = UpdateProfileInput.safeParse({\n    displayName: formData.get('displayName'),\n    bio: formData.get('bio'),\n  });\n  if (!parsed.success) {\n    throw new Error('invalid input');\n  }\n\n  \u002F\u002F 3. Scope the mutation to the session-derived identity, not any\n  \u002F\u002F    client-passed identifier. db.user.update WHERE id = session.userId.\n  await db.user.update({\n    where: { id: session.userId },\n    data: parsed.data,\n  });\n}\n```\n\nA defender reviewing this action can answer in one minute: \"Who is this\nmutation acting on?\" The answer is \"the server-derived session user, not\nwhoever the client says they are.\"\n\n---\n\n## Pattern 2 -- Validate input with a runtime schema at the action boundary\n\nTypeScript types are compile-time only. The `FormData` argument is the\nreal runtime contract -- it's whatever the client posted, which may be\narbitrary strings, arrays, or absent fields.\n\nUse Zod \u002F Valibot \u002F a similar runtime validator. Validate at the first\nline of the action body. Reject invalid input with a generic error\nmessage (don't echo the invalid value back -- it's potentially attacker-\ncontrolled and may be reflected somewhere).\n\nThe validator's schema is also documentation: a defender can read it and\nknow exactly which fields the action accepts and what the bounds are.\n\n---\n\n## Pattern 3 -- Idempotency for mutations that the client may retry\n\nServer Actions are invoked from forms and from optimistic-UI patterns,\nboth of which can retry on transient failure (network blip, slow render,\nuser double-clicks Submit). A mutation that books a flight, charges a\ncard, or sends a message has to handle the retry without producing two\nside effects.\n\nThe universal pattern: an idempotency key passed through the action and\nchecked against a dedupe store. The Stripe-style approach works here too:\n\n```ts\n'use server';\n\nexport async function chargeOrder(formData: FormData) {\n  const session = await auth();\n  if (!session?.userId) throw new Error('unauthenticated');\n\n  const idempotencyKey = formData.get('idempotency_key')?.toString();\n  if (!idempotencyKey) throw new Error('missing idempotency key');\n\n  \u002F\u002F Dedupe via Redis SETNX (see security\u002Fwebhook-idempotency for the\n  \u002F\u002F full storage-strategy tradeoff). Same pattern, different surface.\n  const claimed = await redis.set(\n    `action:chargeOrder:${session.userId}:${idempotencyKey}`,\n    'processing',\n    { NX: true, EX: 3600 },\n  );\n  if (claimed !== 'OK') {\n    return { status: 'duplicate (idempotent)' };\n  }\n\n  \u002F\u002F ... perform the charge ...\n}\n```\n\nFor forms, generate the idempotency key on first render (client-side\n`crypto.randomUUID()`) and persist it through retry attempts on the same\nform instance.\n\n---\n\n## Anti-patterns\n\nThe following patterns SHALL NOT appear in production Server Actions. Each\nfails for the reason given.\n\n### Anti-pattern 1 -- Trusting client-passed actor identity\n\n```ts\n\u002F\u002F WRONG\nexport async function deletePost(formData: FormData) {\n  'use server';\n  const userId = formData.get('userId');  \u002F\u002F attacker-controlled!\n  await db.post.delete({ where: { authorId: userId } });\n}\n```\n\nAny client can post any `userId`. The action runs with whatever\nelevated DB privileges the server holds; the attacker just specified\nWHICH user's posts to delete. ASI03 (Identity & Privilege Abuse) by way\nof authn drift.\n\n### Anti-pattern 2 -- No runtime input validation\n\n```ts\n\u002F\u002F WRONG\nexport async function updatePrice(formData: FormData) {\n  'use server';\n  const price = formData.get('price');  \u002F\u002F could be \"FREE\", \"-1\", \"1e100\"\n  await db.product.update({ where: { id: ... }, data: { price } });\n}\n```\n\n`FormData.get` returns `string | File | null`. Without Zod (or equivalent)\nthe action accepts any string. The mutation can be coerced into negative\nprices, NaN, infinity, SQL-injection-shaped strings, or other unexpected\nvalues. The TypeScript signature `formData: FormData` says nothing about\nwhat's actually inside.\n\n### Anti-pattern 3 -- No idempotency on optimistic-UI retry surfaces\n\n```ts\n\u002F\u002F WRONG\nexport async function placeOrder(formData: FormData) {\n  'use server';\n  const session = await auth();\n  await db.order.create({ data: { userId: session.userId, ... } });\n  \u002F\u002F No retry guard. User double-clicks; two orders created.\n}\n```\n\nThe double-submit pattern produces two `db.order.create` calls with no\nway to detect the duplicate at the receiver. Always pair mutations that\nhave visible side effects (orders, charges, messages, deploys) with an\nidempotency-key check.\n\n---\n\n## Where the patterns fall short\n\nThese patterns assume a *server-trusted* session source (cookie-backed\nsession store, JWT verified server-side). They do not protect against:\n\n- Session-token theft (XSS exfiltrating the cookie, browser-history\n  leak). Defend at the session-store layer (HttpOnly + Secure +\n  SameSite=Strict cookies).\n- A compromised database user that bypasses the application layer\n  entirely. Defend at the DB-policy layer (Postgres RLS, Supabase\n  RLS -- see the `stack-specific\u002Fsupabase\u002Frls-policies` skill).\n- Cross-Site Request Forgery from same-site contexts that share the\n  user's cookie. Next.js adds a built-in check: Server Actions accept\n  only POST, and a request whose `Origin` host differs from its\n  `Host` \u002F `X-Forwarded-Host` is rejected (list any user-facing\n  origins that legitimately differ from the host the server sees in\n  `serverActions.allowedOrigins`). A request with no `Origin` header\n  is let through with a warning, so keep SameSite cookies as the\n  session-layer backstop.\n\nThis skill teaches the application-layer discipline; defense in depth\nlayers below it.\n\n---\n\n## ASI\u002FAST mapping\n\nThis skill addresses two canonical OWASP ASI 2026 categories from\n`governance\u002Fowasp-asi-2026\u002Fthreats.md`:\n\n- **ASI02 (Tool Misuse)** -- a Server Action invoked outside its\n  intended use context (logged-out tab, wrong tenant, CSRF-shaped\n  request) re-invokes the underlying mutation with the agent layer's\n  legitimate privileges. Treating Server Actions as public POST\n  endpoints and requiring per-action input validation + identity\n  re-derivation closes the misuse path.\n- **ASI03 (Identity & Privilege Abuse)** -- authn drift where the\n  action trusts client-passed identity (a `userId` form field, a\n  `tenantId` header) instead of re-deriving from server-side session.\n  Pattern 1 (re-derive identity) is the load-bearing defense.\n\n---\n\n## Testing\n\nFor each Server Action, write at least three tests:\n\n```ts\ntest('rejects unauthenticated invocation', async () => {\n  \u002F\u002F Call action with no session cookie. Expect throw.\n});\n\ntest('rejects malformed input', async () => {\n  \u002F\u002F Call action with FormData missing required fields or wrong types.\n});\n\ntest('idempotent on duplicate idempotency key', async () => {\n  \u002F\u002F Call action twice with same key. Expect second call to no-op.\n});\n```\n\nA skill is working when production incident reports stop mentioning\n\"action ran twice from double-click\", \"user X's post deleted by user Y\",\n\"price set to -1 via crafted form submit\".\n\n---\n\n## See also\n\n- `governance\u002Fowasp-asi-2026\u002Fthreats.md` -- ASI02 + ASI03 full text\n- `skills\u002Funiversal\u002Fsecurity\u002Fwebhook-idempotency\u002FSKILL.md` -- the\n  universal webhook-idempotency skill; Server Actions are a parallel\n  retry-prone surface that benefits from the same dedupe-store\n  discipline.\n- `skills\u002Fstack-specific\u002Fnextjs\u002Fcheck-route-types\u002FSKILL.md` -- the\n  complementary type-hygiene skill for Next.js route handlers.\n",{"name":5,"description":7},"main","5a590e92c8f62b54c96a6928215ac2145b671e03","skills\u002Fstack-specific\u002Fnextjs\u002Fserver-action-safety","https:\u002F\u002Fgithub.com\u002FMILTONADINA\u002FDevOPs","https:\u002F\u002Fgithub.com\u002FMILTONADINA","https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fmiltonadina","CS\u002FCybersecurity SWE & former Epidemiologist. Building secure, test-driven full-stack & mobile apps (TS\u002FReact\u002FNode, Java\u002FSpring, Flutter).","2026-11-14 20:03:36",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add MILTONADINA\u002FDevOPs --skill nextjs-server-action-safety",{"tool":38,"command":39},"bunx","bunx skills add MILTONADINA\u002FDevOPs --skill nextjs-server-action-safety",{"tool":41,"command":42},"pnpm","pnpm dlx skills add MILTONADINA\u002FDevOPs --skill nextjs-server-action-safety","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMILTONADINA\u002FDevOPs\u002Fblob\u002Fmain\u002Fskills\u002Fstack-specific\u002Fnextjs\u002Fserver-action-safety\u002FSKILL.md",true,[46],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"SKILL.md.bundle","OTHER","其他",9559,"https:\u002F\u002Fgithub.com\u002FMILTONADINA\u002FDevOPs\u002Fblob\u002Fmain\u002Fskills\u002Fstack-specific\u002Fnextjs\u002Fserver-action-safety\u002FSKILL.md.bundle",[53,60,67,74,79,86],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M74F7F3HN6J7CSFHBVQAE9S5","karpathy-guidelines","Behavioral guidelines that reduce common LLM coding mistakes. Apply whenever writing, modifying, or reviewing code. Don't assume requirements, don't overcomplicate, don't refactor unrelated code, and define success criteria before implementing. Use this skill on every non-trivial coding task to avoid bloat, silent assumptions, and completion-bias.","https:\u002F\u002Fgithub.com\u002FMILTONADINA\u002FDevOPs\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fsecurity\u002Fmodified-skill\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M74F7D60N9FRWWWHCGZMMB41","unsigned-missing-sig-fixture","Test fixture (F.09) — SKILL.md without an accompanying .sig file. Default install rejects with exit 2; --allow-unsigned --rationale=\"...\" proceeds.","https:\u002F\u002Fgithub.com\u002FMILTONADINA\u002FDevOPs\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Finstall\u002Fsource-skills\u002Funsigned-missing-sig\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M74F7BKGX67Q606QPKZV7TQV","unsigned-mismatched-sig-fixture","Test fixture (F.09) — SKILL.md whose accompanying .sig signs different content. NFR-F3 hash check catches this even with --allow-unsigned.","https:\u002F\u002Fgithub.com\u002FMILTONADINA\u002FDevOPs\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Finstall\u002Fsource-skills\u002Funsigned-mismatched-sig\u002FSKILL.md",[],[],{"skillNo":75,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M74F793BYMX98EQC5XP4CDZK","https:\u002F\u002Fgithub.com\u002FMILTONADINA\u002FDevOPs\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Finstall\u002Fsource-skills\u002Fsigned\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M74F7481EBD7G5471ZC4S9YB","webhook-idempotency","Defend against double-processing of webhook events across every provider (Stripe, GitHub, Slack, Twilio, SendGrid). Idempotency-key pattern + replay-window enforcement + dedupe-storage strategy. Triggers on any webhook handler authoring (route matching \u002Fwebhook(s)?\u002F, Stripe-Signature \u002F X-Hub-Signature-256 header references). Defense against OWASP ASI02 (Tool Misuse) -- a replayed webhook that re-triggers a destructive tool is the canonical control-flow-level replay attack. Universal across providers; stack-specific signature verification lives in stack-specific skills.","https:\u002F\u002Fgithub.com\u002FMILTONADINA\u002FDevOPs\u002Fblob\u002Fmain\u002Fskills\u002Funiversal\u002Fsecurity\u002Fwebhook-idempotency\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M74F71Q6JKRFJ66G5T98KE8H","semgrep-scan","Run Semgrep static analysis to detect insecure code patterns - SQL injection, XSS, path traversal, weak crypto, broken auth, OWASP Top 10 issues. Use on every file change touching security-sensitive code and as part of the tiered security gate. Complements gitleaks (which catches secrets) by catching insecure logic.","https:\u002F\u002Fgithub.com\u002FMILTONADINA\u002FDevOPs\u002Fblob\u002Fmain\u002Fskills\u002Funiversal\u002Fsecurity\u002Fsemgrep-scan\u002FSKILL.md",[],[]]