Works with the AI Agents you already use
entitlement boundary lab
Audit Firebase Firestore entitlement boundaries and generate emulator-ready regression tests for paid access security.
$15
entitlement boundary lab
Example session with this skill installed
Audit the subscription security of my Flutter app using Firebase Firestore and RevenueCat.
My profiles are stored at members/{uid}. Regular users may update displayName, but must never grant themselves plan: pro, change billing.expiresAtMs, or set entitlement: premium.
Use the included synthetic sample contract to generate local Firestore Security Rules tests. Then show me what additional evidence is needed to review webhook authentication, event replay, subscription expiry, and backend entitlement enforcement.
Don't access production services or modify my application.
- Read your context and instructions
- Compiled the entitlement boundary lab
Entitlement Boundary Review — Example Output
Summary
Generated a local Firestore regression test suite for the synthetic subscription profile stored at members/{uid}.
Generated: 14 tests covering valid free-profile creation, ordinary profile editing, signed-out and non-owner access, full-document replacement, and client attempts to write protected entitlement fields.
Protected fields
| Field | Unauthorized action to reject |
|---|---|
| plan | Client sets pro |
| billing.expiresAtMs | Client extends expiry |
| entitlement | Client sets premium |
Test generation
python scripts/generate_rules_tests.py --config examples/contract.json --out entitlement-boundary.test.cjs
Generator output
Generated entitlement-boundary.test.cjs with 14 tests
Example generated test
test("client cannot create profile with plan", async () => {
const data = clone(contract.create_base);
setNested(data, "plan", "pro");
await assertFails(ref(ownerDb()).set(data));
});
Review matrix
| Security boundary | Status |
|---|---|
| Client entitlement writes | UNVERIFIED until emulator execution |
| Webhook authentication | UNVERIFIED — inspect webhook handler |
| Duplicate event handling | UNVERIFIED — inspect idempotency logic |
| Out-of-order subscription events | UNVERIFIED |
| Paid API authorization | UNVERIFIED |
| Expiry enforcement | UNVERIFIED |
Next steps
- Run the generated tests against your local Firestore emulator and actual rules.
- Investigate any unexpected allowed or denied operations.
- Review RevenueCat webhook authentication and duplicate-event handling.
- Validate paid feature enforcement on the server.
- Re-run tests after approved fixes.
No production credentials, Firebase deployment, or live payment API access is required.
Connects securely to your tools. The creator never sees your data.
About this skill
Stop users from granting themselves Pro access.
A client-side subscription check isn't enough to protect paid features. Your Firebase Security Rules and backend must enforce who can actually receive and retain premium access.
Entitlement Boundary Lab helps coding agents test and review the security boundaries of Firebase applications using Firestore and RevenueCat.
What it does
- Generates executable Firestore Security Rules tests from a JSON contract.
- Checks whether clients can create, update, or merge protected entitlement fields.
- Verifies that legitimate profile creation and ordinary edits remain allowed.
- Tests owner, unauthenticated, and unauthorized-user scenarios.
- Guides the review of RevenueCat webhook authentication, duplicate events, out-of-order delivery, account transfers, subscription expiry, and sync behavior.
- Produces evidence-based findings with verified, gap, and unverified statuses.
What you receive
A reusable Agent Skills package containing a Python test generator, sample configuration, local testing instructions, and a structured security review matrix.
Designed for
Flutter and web developers building subscription-based applications with Firebase, Firestore, and RevenueCat.
Requirements
Python 3.9+ for test generation. Node.js, Firebase Emulator Suite, a compatible Java runtime, and @firebase/rules-unit-testing for local test execution.
Privacy first: The skill works with local synthetic test data. It does not contact production Firebase or RevenueCat services.
Scope: The generator covers configured Firestore document fields. Server-side reviews require examining actual application code and tests. This skill does not certify an application as secure.
Requires local Firebase Emulator and Node.js environment. Limited to Firestore; does not audit custom backend IAM or other database types. Helper script does not overwrite existing files.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 25 days ago
Requires