شعار Auditing Payment State Machine And Idempotency

Auditing Payment State Machine And Idempotency

مؤسسة
UnboundCompute
auditing-payment-state-machine-and-idempotency

Audit payment and checkout state machines for transitions an attacker can drive out of order or replay for value: an order marked paid before the charge is confirmed, a step that can be skipped or repeated so goods ship without settlement, a non-idempotent charge or fulfillment endpoint that double-processes on a retried or replayed request, and a refund or cancel that returns value while the underlying charge stays captured. Covers checkout, charge, fulfillment, and refund flows where money and goods change hands across a sequence of state transitions. Use when a purchase moves through ordered payment states and the transitions and their idempotency are the boundary. The out-of-order or replayed transition is the source, the value released without settlement is the sink, and the skippable step or non-idempotent handler that allows it is the bug.

نظرة عامة

الناشرUnboundCompute
المستودعsecurity-agent-skills
اسم المهارةauditing-payment-state-machine-and-idempotency
النجوم
27
التفريعات
8
الملفات المرفقة
تعليمات فقط
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها UnboundCompute على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Auditing Payment State Machine And Idempotency في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-payment-state-machine-and-idempotency
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/UnboundCompute/security-agent-skills.git /tmp/security-agent-skills
mkdir -p .claude/skills
cp -r /tmp/security-agent-skills/skills/auditing-payment-state-machine-and-idempotency .claude/skills/auditing-payment-state-machine-and-idempotency
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Auditing Payment State Machine And Idempotency في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Auditing Payment State Machine And Idempotency تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Auditing Payment State Machine And Idempotency بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Auditing payment state machine and idempotency: value must not move faster than settlement

A checkout is a state machine, and money moves through it in a strict order: an order is placed, a charge is authorized, the charge settles, and only then are goods fulfilled; refunds and cancels run the sequence backward. The bugs are transitions that break the order or repeat for value. An order marked paid before the charge is actually confirmed lets fulfillment run against a payment that never settles. A step that can be skipped, so fulfillment triggers without a completed charge, or repeated, so one payment yields multiple fulfillments, releases value the sequence did not authorize. A charge or fulfillment endpoint that is not idempotent double-processes when a request is retried or deliberately replayed, so a network retry or an attacker's repeat becomes two charges or two shipments. And a refund or cancel that returns value while the charge stays captured pays out twice. The audit walks the state machine and tries to move value ahead of, or more than once per, settlement. You audit this by driving transitions out of order and replaying the ones that release value.

When to use

  • A purchase moves through ordered payment states (placed, authorized, settled, fulfilled, refunded).
  • Fulfillment may trigger before a charge is confirmed, or a paid state may be set ahead of settlement.
  • Charge, fulfillment, or refund endpoints may not be idempotent under retry or replay.

Scope check

Test payment flows only against systems you own or are authorized to assess, on non-production or sandbox payment paths. Driving transitions and replays moves real value on a live system, so use sandbox payment credentials and test accounts and never trigger a real charge, refund, or fulfillment that is not yours. If you can't name the authorization, stop.

The loop

  1. Establish the intended state machine first. Map the legal states and the only transitions allowed between them, and which transition each value-releasing action (fulfillment, refund, payout) requires as its precondition. This is the false-positive killer: a flow where fulfillment requires a confirmed settled charge, every transition validates its precondition server-side, and every value-releasing handler is idempotent is correct. Name the intended sequence, then test deviations.

  2. Check the paid-state precondition. Confirm the state that gates fulfillment is set only after the charge is confirmed settled by the payment provider, not on client assertion or on authorization alone. An order marked paid before settlement, or on a client-supplied status, lets goods ship against a payment that may never complete.

  3. Test step skipping and out-of-order transitions. Attempt to reach a value-releasing state without the transitions that should precede it: trigger fulfillment without a completed charge, jump past a verification step, or set a later state directly. Confirm each transition validates its precondition on the server and refuses an out-of-order jump. A state reachable without its prerequisites is a skip.

  4. Test replay and idempotency of value-releasing handlers. Replay the charge, fulfillment, and payout requests, and retry them with and without any idempotency key. Confirm each is idempotent: a repeated request for the same logical operation processes once, not once per delivery. A non-idempotent handler turns a retry or a deliberate replay into a double charge or double fulfillment.

  5. Check refund and cancel symmetry. Confirm a refund or cancel only returns value that was actually captured, moves the state consistently, and cannot be repeated to pay out more than once or run while the charge remains captured. A refund that credits without reversing the charge, or that replays, is a payout primitive.

  6. Confirm and record. Confirm by releasing value without settlement, a fulfillment on an unconfirmed charge, a skipped step reaching a paid state, a replayed handler double-processing, or a repeated refund, all on sandbox payment paths and without moving real money. Kill the lead if every value-releasing action requires its settled precondition validated server-side and every such handler is idempotent under retry and replay. Record the out-of-order or replayed transition, the value-released sink, and the skippable step or non-idempotent handler.

Where payment state trust leaks

  • Paid set before settlement. Marking an order paid on authorization alone or on client-supplied status ships goods against a charge that may never settle.
  • A skippable step reaches fulfillment. A value-releasing state reachable without its preceding transitions lets fulfillment run without a completed charge.
  • A non-idempotent handler double-processes. A charge, fulfillment, or payout endpoint that acts once per request rather than once per operation doubles on retry or replay.
  • A repeatable refund pays out twice. A refund or cancel that can be replayed, or that credits without reversing the capture, returns more value than was taken.
  • Client-driven state transitions. Trusting a client to assert the next state, rather than deriving it from server-confirmed events, lets an attacker set the state that releases value.

Worked example (a confirm and a kill)

Confirm. A checkout marks the order paid and triggers fulfillment when the browser posts back a success status after redirect from the payment page, before the server confirms settlement with the provider. Posting the success callback directly, without any real payment, drives the order to paid and ships the goods. Separately, replaying the fulfillment request produces a second shipment for one order. Confirmed payment state bypass via client-asserted paid state and non-idempotent fulfillment, critical, remediation = set the paid state only from a server-side confirmation of settlement with the provider, require the settled precondition before fulfillment, and make fulfillment idempotent per order.

Kill. The paid state is set only after the server confirms settlement with the payment provider out of band; fulfillment, charge, and payout each validate their settled precondition server-side and refuse an out-of-order jump; every value-releasing handler is idempotent per logical operation under retry and replay; and refunds return only captured value and cannot repeat. A skipped step or replayed request releases nothing extra. Killed, kill_reason = "value-releasing transitions gated on server-confirmed settlement and idempotent under replay; no out-of-order or repeated transition releases value."

Rationalizations to reject

  • "The payment page redirected back with success." → A client-delivered success is spoofable; confirm settlement server-side with the provider before setting paid.
  • "The charge was authorized." → Authorization is not settlement; gate fulfillment on the confirmed settled state, not on a hold that can be released.
  • "Retries are just network noise." → A non-idempotent handler turns any retry, benign or malicious, into a double charge or double shipment; make it idempotent per operation.
  • "Refunds go through our finance team." → If the refund endpoint can be replayed or credits without reversing the capture, it is a payout primitive regardless of who normally calls it.
  • "The client tracks the order state." → Client-asserted state lets an attacker set the value-releasing state; derive every transition from server-confirmed events.

Executing this in practice

You need the legal states and transitions, which server-confirmed event gates each value-releasing action, and whether each such handler is idempotent. On sandbox payment paths, try to mark paid without settlement, skip to fulfillment, replay the charge and fulfillment and refund handlers, and repeat a refund. Reading the state- transition code shows the intended order; a value release without settlement or a doubled handler shows whether it holds.

Related

  • auditing-payment-callback-and-amount-integrity - the provider callback that should set the paid state; its authenticity and amount checks are the trusted signal this state machine must wait for.
  • hunting-price-and-coupon-manipulation - manipulating the amount before this state machine runs is the paired attack; together they cover paying less and paying nothing.
  • auditing-webhook-authenticity-and-callback-trust - settlement usually arrives as a webhook; that skill verifies the event this flow depends on is genuine.
  • hunting-broken-object-level-authorization - driving another user's order through these transitions is an object-authorization failure on the order; the two meet at the order identifier.
  • FINDING-SCHEMA.md - source = the out-of-order or replayed transition, sink = the value released without settlement, evidence = the skippable step or non-idempotent handler.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Auditing Payment State Machine And Idempotency؟

Audit payment and checkout state machines for transitions an attacker can drive out of order or replay for value: an order marked paid before the charge is confirmed, a step that can be skipped or repeated so goods ship without settlement, a non-idempotent charge or fulfillment endpoint that double-processes on a retried or replayed request, and a refund or cancel that returns value while the underlying charge stays captured. Covers checkout, charge, fulfillment, and refund flows where money and goods change hands across a sequence of state transitions. Use when a purchase moves through ord...

لماذا تستخدم Auditing Payment State Machine And Idempotency على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Auditing Payment State Machine And Idempotency عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Auditing Payment State Machine And Idempotency في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-payment-state-machine-and-idempotency. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Auditing Payment State Machine And Idempotency؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Auditing Payment State Machine And Idempotency؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Auditing Payment State Machine And Idempotency معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Auditing Payment State Machine And Idempotency مجانية؟

نعم. نشرها UnboundCompute على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇