Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    SYDX Security Engineer - SaaS & Cloud Hardening

    1

    Security engineering skill for auditing code, hardening databases, and architecting multi-tenant SaaS on a budget.

    Free

    1 useSecurity scanned
    SYDX Security Engineer - SaaS & Cloud Hardening

    SYDX Security Engineer - SaaS & Cloud Hardening

    Example session with this skill installed

    Audit my Supabase schema for multi-tenant safety and check if I need to upgrade my Cloudflare Free plan for basic DDoS protection.

    • Read your context and instructions
    • Compiled the sydx security engineer

    I have analyzed your request based on the SYDX Security Engineer workflow. I evaluated the database schema for RLS compliance and reviewed the Cloudflare Free tier capabilities against your requirement for DDoS protection.

    Security Audit & Architecture Recommendation

    ComponentFinding/StatusPriorityRecommendation
    PostgreSQL RLS3 tables found without ENABLE ROW LEVEL SECURITY🔴 CRITICALRun ALTER TABLE on profiles, orders, and subscriptions.
    DB Functionsget_stats() uses SECURITY DEFINER without search_path🟠 HIGHAdd SET search_path = '' to prevent schema-injection.
    Edge SecurityCloudflare Free Tier🟢 OPTIMALFree tier includes unmetered L7 DDoS protection; no upgrade needed.
    Auth Logictenant_id read from raw_user_meta_data🔴 CRITICALMove tenant roles to raw_app_meta_data to prevent client-side editing.

    Hardened RLS Implementation

    -- Fix for orders table isolation
    ALTER TABLE orders ENABLE ROW LEVEL SECURITY;
    
    CREATE POLICY "Users can only view their own tenant data"
    ON orders
    FOR SELECT
    USING (
      tenant_id = (auth.jwt() -> 'app_metadata' ->> 'tenant_id')::uuid
    );
    
    -- Fix for Security Definer functions
    CREATE OR REPLACE FUNCTION get_tenant_summary()
    RETURNS TABLE(count bigint)
    LANGUAGE plpgsql
    SECURITY DEFINER
    SET search_path = ''
    AS $$
    BEGIN
      RETURN QUERY SELECT count(*) FROM orders WHERE tenant_id = (auth.jwt() -> 'app_metadata' ->> 'tenant_id')::uuid;
    END;
    $$;
    

    Next steps

    1. Run the scripts/audit-rls.sql script to identify any remaining unprotected public tables.
    2. Update your frontend to stop using user_metadata for role checks.
    3. Enable Cloudflare "Under Attack" mode only during active incidents, as the Free tier unmetered protection is otherwise sufficient.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Software security is often treated as an afterthought or a source of endless subscription bloat. This skill forces a requirement-first, defense-in-depth approach to architecting and auditing applications, ensuring you don't pay for enterprise tools when framework-native features or free-tier perimeters suffice. It targets the most common failure points in modern stacks, specifically focusing on multi-tenant isolation, database row-level security, and the unique risks introduced by AI-generated code.

    What it does

    • Architects secure systems by classifying project types and defining data boundaries before a single line of code is written.
    • Audits database schemas using specialized scripts to detect missing Row-Level Security (RLS) and vulnerable stored procedures.
    • Prevents data leaks by enforcing strict rules against client-side secrets and untrusted tenant identifiers in multi-tenant SaaS.
    • Evaluates infrastructure costs by determining if free-tier edge services like Cloudflare are sufficient before recommending paid upgrades.
    • Verifies isolation by generating negative test suites that attempt to cross tenant boundaries.

    How it works

    1. Classification: The skill identifies the project type, data sensitivity, and exposure level to map the attack surface.
    2. Threat Mapping: It analyzes eight structural layers, from the edge to the supply chain, against a catalog of 31 vulnerabilities.
    3. Control Selection: It applies a resource hierarchy that prioritizes native framework features and free-tier tools over paid software.
    4. Implementation: It generates hardened code, including PostgreSQL RLS policies, Zod validation schemas, and Cloudflare WAF configurations.

    Frameworks & tools

    This skill is optimized for PostgreSQL, Supabase, Next.js, and Zod. It provides specific scripts for SQL auditing and PowerShell-based secret scanning, while utilizing Cloudflare for edge security and Vitest or Jest for integration testing.

    Why this beats prompting it yourself

    Generic prompts often miss subtle but critical vulnerabilities like the Supabase user metadata trap or PostgreSQL schema-injection via search_path. This skill enforces 10 non-negotiable security laws and uses a "free-tier first" logic that prevents unnecessary cloud spend.

    Use cases

    • Security Auditing: Scan an existing Supabase or PostgreSQL database for missing RLS policies.
    • SaaS Architecture: Design a multi-tenant data model that prevents IDOR attacks at the database layer.
    • Code Review: Inspect AI-generated PRs for hallucinated packages or leaked service role keys.
    • Infrastructure Hardening: Configure Cloudflare Turnstile and WAF rules to protect a public API.

    Known limitations

    Requires manual execution of provided .sql and .ps1 scripts in your local environment or database console. AI agent protections are based on current Agent Control Standards.

    Requires manual execution of provided SQL and PowerShell scripts. Logic focuses on web/SaaS stacks; low-level memory safety for C/C++ is not the primary focus.

    How to use

    1. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    1 use

    Times used to date

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 24 days ago

    • Free with an Agensi account

    Permissions

    Terminal / Shell
    Browser
    Network Access
    Read Files
    Write Files
    Environment Variables
    Listed28 days ago

    What's inside

    Frequently Asked Questions

    This skill is specifically optimized for modern web stacks using PostgreSQL (including Supabase), Next.js, and Zod, leveraging Cloudflare for edge-level protection.

    Unlike general prompts, this skill enforces a 'free-tier first' logic and 10 specific security laws to prevent overspending on enterprise tools while addressing niche vulnerabilities like Supabase metadata traps.

    You will receive a suite of specialized security auditing scripts (.sql and .ps1), hardened code templates for RLS policies and validation schemas, and a structured security architecture framework.

    The skill generates custom SQL and PowerShell scripts that you run directly in your local environment or database console, ensuring you maintain full control over the execution process.

    This skill is ideal for startups and solo developers building multi-tenant SaaS applications who need enterprise-grade isolation and IDOR protection without the enterprise-level price tag.

    Yes, the skill includes a 'negative test suite' generation feature, which creates automated tests specifically designed to attempt—and fail—to cross tenant boundaries to verify your isolation.

    New in Security