stripe-pci-scope-minimization
Minimize PCI DSS scope when integrating Stripe -- token-only flows (Elements, Checkout, PaymentSheet), avoid raw PAN handling, audit-log discipline for…
Skill by MILTONADINA
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/miltonadina-stripe-pci-scope-minimization
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data, security, finance
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/stripe-pci-scope-minimization
What's inside
- Skill name
stripe-pci-scope-minimization- Description
- Minimize PCI DSS scope when integrating Stripe -- token-only flows (Elements, Checkout, PaymentSheet), avoid raw PAN handling, audit-log discipline for cardholder-data adjacencies. References PCI DSS v4 Requirement 3 (Protect Stored Account Data) and Requirement 10 (Log and Monitor Access). Triggers on Stripe payment-intent / charge / customer code authoring. OWASP ASI03 (Identity & Privilege Abuse) defense for PCI-scoped credential handling.
- License
- MIT
- Instructions
- 242 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- name: "stripe-pci-scope-minimization" does not match folder "pci-scope-minimization"
Files (1)
- SKILL.md
SKILL.md (first lines)
# Stripe PCI Scope Minimization
> Defends against **OWASP ASI03 (Identity & Privilege Abuse)** in the
> PCI-scoped credential dimension. PCI DSS classifies any system that
> processes, stores, or transmits cardholder data as "in scope" for full
> PCI compliance; "in scope" means a 12-requirement audit surface with
> teeth. The patterns here keep the application OUT of scope wherever
> possible -- token-only flows where Stripe-hosted UI handles raw card
> data, and tight discipline on the few places card-related data crosses
> the application boundary.
**Tradeoff:** Token-only flows give up some UX flexibility (Stripe's
Elements / Checkout / PaymentSheet host the card-data UI on Stripe's
domain). The benefit: the bulk of PCI DSS v4 requirements don't apply
to a SAQ-A integration where the app never sees a primary account number
(PAN). Self-hosted card data collection means SAQ-D scope: 200+ pages of
audit checklist.
---
## Why this matters
PCI DSS v4.0 (released March 2022; v4.0.1 minor revision June 2024)
has several SAQs (Self-Assessment Questionnaires); the four that decide
scope for a Stripe integration are:
- **SAQ-A**: e-commerce merchants who fully outsource cardholder-data
handling to a PCI-DSS-validated third party. Smallest scope.
- **SAQ-A-EP**: e-commerce where the merchant's site loads the
card-collection UI but doesn't see the card data itself.
- **SAQ-D-Merchant**: merchants who handle PAN themselves.
- **SAQ-D-Service-Provider**: for SaaS that processes card data on
behalf of others.
Stripe's hosted flows (Checkout, PaymentSheet, Payment Element with
client-side `stripe.confirmPayment`) keep most integrations in SAQ-A.
The moment the application reads, stores, or transmits raw card data
-- even briefly, even in memory -- scope balloons.
---
## Pattern 1 -- Use Stripe's hosted card-collection UI
The card-data UI runs on Stripe's domain (via iframes or hosted-page
redirects). The application receives back a tokenized identifier (a
`PaymentMethod` id, format `pm_...`, or a `PaymentIntent` id `pi_...`)
that references the card on Stripe's side. The PAN never reaches the
application.
```ts
// Server: create a PaymentIntent that the client will confirm.
const pi = await stripe.paymentIntents.create({
amount: 1999,
currency: 'usd',
customer: customerId,
automatic_payment_methods: { enabled: true },
});
// Client: confirm using Stripe.js (loads from stripe.com -- iframed
// PCI-scoped UI on Stripe's domain). The page never touches raw PAN.
// `elements` was created with pi.client_secret and mounts the Payment Element.
const result = await stripe.confirmPayment({
elements, // Stripe.js managed Payment Element, scoped to Stripe's domain
confirmParams: { return_url: 'https://example.test/checkout/complete' },
});
```
After confirmation, the application stores ONLY the `PaymentIntent.id`
or `PaymentMethod.id`. These tokens are useless to an attacker who
breaches the application database; they only function with the Stripe
secret key.
---
## Pattern 2 -- Never log card data, ever
PCI DSS v4 **Requirement 3 -- Protect Stored Account Data** restricts
storage of full PAN, sensitive authentication data (SAD: CVV, full
track data, PIN blocks), and similar. **Sensitive authentication data
SHALL NOT be stored after authorization, even if encrypted.**
**Requirement 10 -- Log and Monitor All Access** also imposes
restrictions on what audit logs may contain about cardholder data.
The simplest interpretation: do not log card-related fields. If a
log line happens to contain a PaymentIntent object from a Stripe API
response, redact the `payment_method` details before serializing.
```ts
// Redact card-related fields before logging.
function redactCardData<T extends { payment_method?: unknown; charges?: unknown }>(obj: T): T {
const copy = JSON.parse(JSON.stringify(obj)) as T;
if (copy.payment_method) {
copy.payment_method = '[REDACTED]' as never;
}
if (copy.charges && typeof copy.charges === 'object') {
// ... recursively redact charge.payment_method_details ...
}
return copy;
}
console.log('payment intent processed', redactCardData(paymentIntent));
```
This applies to error paths too -- a try / catch that logs an Error
whose `.message` contains the raw API response leaks the card details
into log storage. Use Stripe error subtypes (`Stripe.errors.*`) and log
only `err.code` + `err.type`, never the full error object.
---
## Pattern 3 -- Restrict who has access to the Stripe secret key
PCI DSS v4 **Requirement 7 -- Restrict Access to System Components**
applies to systems that touch the cardholder-data environment (CDE);
the Stripe secret key is one such credential. Discipline:
- The secret key lives in a vault (1Password, AWS Secrets Manager,
HashiCorp Vault, Doppler), never in `.env.local` committed to git
and never in a CI config file in plain text.From MILTONADINA/DevOPs, MIT.
More from MILTONADINA/DevOPs
- 0.565score
openapi-first
MILTONADINA
Generate API code, types, validators, mock servers, and client SDKs from a single OpenAPI 3.1 specification.
SkillAFreshness: AClaude Code +9 - 0.565score
proof-of-work
MILTONADINA
Produce structured proof artifacts for every completed claim.
SkillAFreshness: AClaude Code +9 - 0.565score
plan-decomposition
MILTONADINA
Break an approved spec into atomic, ordered, verifiable tasks before any code is written.
SkillAFreshness: AClaude Code +9 - 0.565score
multi-tool-failover
MILTONADINA
Manage session continuity when switching between Claude Code, Codex CLI, Cursor, Antigravity, Kiro, or local LLMs (OpenCode, Aider).
SkillAFreshness: AClaude Code +9 - 0.565score
goal-loop
MILTONADINA
Execute the spec-tests-implement-verify cycle for one atomic task at a time.
SkillAFreshness: AClaude Code +9 - 0.565score
baton-handoff
MILTONADINA
Write a complete handoff document at session end so the next agent (Claude Code, Codex, Cursor, Antigravity, Kiro, or local LLM) resumes exactly where this…
SkillAFreshness: AClaude Code +9 - 0.565score
observability-instrument
MILTONADINA
Add OpenTelemetry spans with user_id and tenant_id in baggage to any new code path that handles requests, runs agents, or performs billable operations.
SkillAFreshness: AClaude Code +9 - 0.565score
cost-attribution
MILTONADINA
Track per-client and per-feature LLM and cloud spend with cryptographic audit trail.
SkillAFreshness: AClaude Code +9 - 0.565score
ears-spec-writing
MILTONADINA
Write requirement specifications in EARS (Easy Approach to Requirements Syntax) notation.
SkillAFreshness: AClaude Code +9 - 0.561score
session-summary
MILTONADINA
Generate the end-of-session human-reviewable report.
SkillAFreshness: AClaude Code +9 - 0.561score
coppa-audit
MILTONADINA
Audit code, data flows, and UI for COPPA (Children's Online Privacy Protection Act) compliance.
SkillAFreshness: AClaude Code +9 - 0.560score
supabase-rpc-functions
MILTONADINA
Supabase RPC function security patterns -- SECURITY DEFINER with `SET search_path` discipline, `REVOKE EXECUTE FROM public` for least-privilege exposure…
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 12
- Last commit (this folder)
- Sep 25, 2026 (1 month ago)
- Last release
- Sep 23, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/MILTONADINA/DevOPs
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from MILTONADINA
- 0.565score
baton-handoff
MILTONADINA
Write a complete handoff document at session end so the next agent (Claude Code, Codex, Cursor, Antigravity, Kiro, or local LLM) resumes exactly where this…
SkillAFreshness: AClaude Code +9 - 0.565score
observability-instrument
MILTONADINA
Add OpenTelemetry spans with user_id and tenant_id in baggage to any new code path that handles requests, runs agents, or performs billable operations.
SkillAFreshness: AClaude Code +9 - 0.565score
openapi-first
MILTONADINA
Generate API code, types, validators, mock servers, and client SDKs from a single OpenAPI 3.1 specification.
SkillAFreshness: AClaude Code +9 - 0.565score
ears-spec-writing
MILTONADINA
Write requirement specifications in EARS (Easy Approach to Requirements Syntax) notation.
SkillAFreshness: AClaude Code +9 - 0.565score
cost-attribution
MILTONADINA
Track per-client and per-feature LLM and cloud spend with cryptographic audit trail.
SkillAFreshness: AClaude Code +9 - 0.565score
goal-loop
MILTONADINA
Execute the spec-tests-implement-verify cycle for one atomic task at a time.
SkillAFreshness: AClaude Code +9
Cite this page
stripe-pci-scope-minimization skill. Agent Mart. https://agentmart.dev/skills/miltonadina-stripe-pci-scope-minimization (last updated 2026-10-24)