Works with the AI Agents you already use
SYDX Security Engineer - SaaS & Cloud Hardening
Security engineering skill for auditing code, hardening databases, and architecting multi-tenant SaaS on a budget.
Free
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
| Component | Finding/Status | Priority | Recommendation |
|---|---|---|---|
| PostgreSQL RLS | 3 tables found without ENABLE ROW LEVEL SECURITY | 🔴 CRITICAL | Run ALTER TABLE on profiles, orders, and subscriptions. |
| DB Functions | get_stats() uses SECURITY DEFINER without search_path | 🟠 HIGH | Add SET search_path = '' to prevent schema-injection. |
| Edge Security | Cloudflare Free Tier | 🟢 OPTIMAL | Free tier includes unmetered L7 DDoS protection; no upgrade needed. |
| Auth Logic | tenant_id read from raw_user_meta_data | 🔴 CRITICAL | Move 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
- Run the
scripts/audit-rls.sqlscript to identify any remaining unprotected public tables. - Update your frontend to stop using
user_metadatafor role checks. - 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
- Classification: The skill identifies the project type, data sensitivity, and exposure level to map the attack surface.
- Threat Mapping: It analyzes eight structural layers, from the edge to the supply chain, against a catalog of 31 vulnerabilities.
- Control Selection: It applies a resource hierarchy that prioritizes native framework features and free-tier tools over paid software.
- 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
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
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