Batter Auth Complete Documentation
ยท v1.4.18
Complete Better Auth documentation in markdown format. Use when implementing authentication in TypeScript projects - covers OAuth providers (Google, GitHub, etc.), email/password, passkeys, 2FA, session management, database adapters (Prisma, Drizzle), and framework integrations (Next.js, SvelteKit, etc.).
โ ๏ธ Hazard Flags
๐ Capabilities
Execution
- โ Shell execution
- โ Code execution
- โ Install dependencies
- โ Persistence
- Privilege: user
Filesystem
- โ Read workspace
- โ Write workspace
- โ Read home
- โ Write home
- โ Read system
- โ Delete
Network
- Egress: any
- โ Ingress
Credentials
- โ Environment vars
- โ Credential files
- โ Browser data
- โ Keychain
Actions
๐ Containment
Level: maximum
- APPROVE_SEND: Can send messages
- APPROVE_PURCHASE: Financial actions possible
- SANDBOX_CONTAINER: Code execution capability
- LOG_ACTIONS: Audit trail for all actions
โก Risks
Mitigation: This skill attempts to disable security features. Do not use.
Mitigation: Remove hardcoded secrets. Use environment variables instead.
Mitigation: Review SKILL.md for hidden instructions. Do not use with untrusted input.
Mitigation: Use pre-built packages or vendored dependencies instead of cloning repos
Mitigation: Remove embedded script tags and encoded payloads.
Mitigation: Provide clear, detailed description of skill functionality
Mitigation: Remove references to sensitive data collection.
Mitigation: Remove references to exfiltrating conversation data or monitoring input.
Want a deeper analysis?
This report was generated by static analysis. Get an LLM-powered deep review with behavioral reasoning and attack surface mapping.
๐ง Deep Analysis โ $5.00๐จ Incident Response
Kill switch: Stop the agent process
Containment: Review logs for unexpected actions
Recovery: Depends on skill capabilities
๐ Raw SSDS JSON click to expand
{
"meta": {
"document_id": "ssds:auto:better-auth:1.4.18",
"ssds_version": "0.2.0",
"scanner_version": "0.4.0+fe6fd9123d50",
"created_at": "2026-03-05T12:07:00.678Z",
"created_by": {
"agent": "safeagentskills-cli/generate-ssds"
},
"language": "en",
"notes": "Auto-generated SSDS. Manual review recommended."
},
"skill": {
"name": "Batter Auth Complete Documentation",
"version": "1.4.18",
"format": "agent_skill",
"description": "Complete Better Auth documentation in markdown format. Use when implementing authentication in TypeScript projects - covers OAuth providers (Google, GitHub, etc.), email/password, passkeys, 2FA, session management, database adapters (Prisma, Drizzle), and framework integrations (Next.js, SvelteKit, etc.).",
"publisher": "unknown",
"source": {
"channel": "local"
},
"artifact": {
"sha256": "d3025bf7aa0bd60e78def44b00325d71b7e5ad766be9430c1ad0ece870b3b67c",
"hash_method": "files_sorted"
}
},
"capabilities": {
"execution": {
"can_exec_shell": true,
"can_exec_code": false,
"privilege_level": "user",
"can_install_deps": false,
"can_persist": false
},
"filesystem": {
"reads_workspace": true,
"reads_user_home": true,
"reads_system": false,
"writes_workspace": false,
"writes_user_home": false,
"writes_system": false,
"can_delete": true
},
"network": {
"egress": "any",
"ingress": true
},
"credentials": {
"reads_env_vars": true,
"reads_credential_files": true,
"reads_browser_data": true,
"reads_keychain": false
},
"services": [
{
"service": "messaging",
"operations": [
"read",
"write"
]
}
],
"actions": {
"can_send_messages": true,
"can_post_public": false,
"can_purchase": true,
"can_transfer_money": false,
"can_deploy": false,
"can_delete_external": false
},
"prompt_injection_surfaces": [
"web",
"documents"
],
"content_types": [
"general"
]
},
"hazards": {
"hdac": {
"H": 4,
"D": 4,
"A": 4,
"C": 1
},
"flags": [
"EXEC",
"FS_READ_WORKSPACE",
"FS_READ_USER",
"FS_DELETE",
"NET_EGRESS_ANY",
"NET_INGRESS",
"CREDS_ENV",
"CREDS_FILES",
"CREDS_BROWSER",
"ACT_SEND_MESSAGE",
"ACT_PURCHASE",
"PI_WEB",
"PI_DOCUMENTS"
],
"custom_flags": [
{
"code": "SECURITY_BYPASS",
"name": "Security Bypass",
"description": "Attempts to disable security features in: references/reference/options.mdx, references/reference/security.mdx"
},
{
"code": "HARDCODED_SECRET",
"name": "Hardcoded Secrets",
"description": "Contains hardcoded secrets/API keys in: references/adapters/postgresql.mdx, references/plugins/sso.mdx"
},
{
"code": "PROMPT_INJECTION",
"name": "Prompt Injection Risk",
"description": "Contains prompt injection patterns in: references/integrations/electron.mdx, references/integrations/lynx.mdx, references/plugins/sso.mdx"
},
{
"code": "HIDDEN_INSTRUCTIONS",
"name": "Hidden Instructions",
"description": "Contains hidden instructions in comments/invisible chars in: references/plugins/sso.mdx"
},
{
"code": "FILE_DELETE",
"name": "File Deletion",
"description": "Can delete files in: references/concepts/users-accounts.mdx, references/reference/errors/account_already_linked_to_different_user.mdx, references/reference/faq.mdx, references/reference/options.mdx"
},
{
"code": "NET_INGRESS",
"name": "Network Server",
"description": "Listens for incoming connections in: references/basic-usage.mdx, references/concepts/database.mdx, references/installation.mdx, references/integrations/elysia.mdx, references/integrations/express.mdx, references/integrations/hono.mdx, references/integrations/nestjs.mdx"
},
{
"code": "TOOL_ABUSE",
"name": "Unauthorized Tool Use",
"description": "INSTRUCTED_GIT_CLONE_AND_BUILD, MCP_SYS_FILE_DESTRUCTION: Instructs agent to clone and potentially build from source"
},
{
"code": "SOCIAL_ENGINEERING",
"name": "Social Engineering Risk",
"description": "SOCIAL_ENG_VAGUE_DESCRIPTION: Skill description is too vague or missing"
},
{
"code": "COMMAND_INJECTION",
"name": "Command Injection Risk",
"description": "MCP_SCRIPT_TAGS: Script tags, VBScript, or encoded script data URIs"
},
{
"code": "TOOL_POISONING",
"name": "Tool Poisoning",
"description": "Hidden secondary behavior detected: MCP_TOOL_POISONING_SENSITIVE_DATA, MCP_TOOL_POISONING_DECEPTION, MCP_TOOL_POISONING_REMOTE_STORAGE, MCP_TOOL_POISONING_HIDDEN_ACTIONS"
},
{
"code": "DATA_EXFILTRATION",
"name": "Data Exfiltration Risk",
"description": "MCP_EXFIL_CONVERSATION, MCP_EXFIL_EXTERNAL_UPLOAD: Conversation, clipboard, or keystroke exfiltration patterns"
}
],
"confidence": {
"level": "medium",
"basis": [
"static_analysis"
],
"notes": "Detected 11 security patterns (27 vendored rule hits). Review recommended."
},
"rationale": {
"H": "H4: Critical: Privilege escalation or malware detected",
"D": "D4: Critical: Credential theft or data exfiltration",
"A": "A4: External actions (deploy/message/post)",
"C": "C1: General content"
}
},
"containment": {
"level": "maximum",
"required": [
{
"control": "APPROVE_SEND",
"reason": "Can send messages"
},
{
"control": "APPROVE_PURCHASE",
"reason": "Financial actions possible"
},
{
"control": "SANDBOX_CONTAINER",
"reason": "Code execution capability"
}
],
"recommended": [
{
"control": "LOG_ACTIONS",
"reason": "Audit trail for all actions"
}
],
"uncontained_risk": "Risk level depends on manual review of actual capabilities."
},
"risks": {
"risks": [
{
"risk": "Security bypass pattern detected in: references/reference/options.mdx, references/reference/security.mdx",
"severity": "critical",
"mitigation": "This skill attempts to disable security features. Do not use."
},
{
"risk": "Hardcoded secrets detected in: references/adapters/postgresql.mdx, references/plugins/sso.mdx",
"severity": "high",
"mitigation": "Remove hardcoded secrets. Use environment variables instead."
},
{
"risk": "Prompt injection patterns detected in: references/integrations/electron.mdx, references/integrations/lynx.mdx, references/plugins/sso.mdx",
"severity": "high",
"mitigation": "Review SKILL.md for hidden instructions. Do not use with untrusted input."
},
{
"risk": "Unauthorized tool use: INSTRUCTED_GIT_CLONE_AND_BUILD, MCP_SYS_FILE_DESTRUCTION",
"severity": "critical",
"mitigation": "Use pre-built packages or vendored dependencies instead of cloning repos"
},
{
"risk": "Command injection risk: MCP_SCRIPT_TAGS",
"severity": "high",
"mitigation": "Remove embedded script tags and encoded payloads."
},
{
"risk": "Social engineering indicators: SOCIAL_ENG_VAGUE_DESCRIPTION",
"severity": "low",
"mitigation": "Provide clear, detailed description of skill functionality"
},
{
"risk": "Tool poisoning: hidden behaviors detected (MCP_TOOL_POISONING_SENSITIVE_DATA, MCP_TOOL_POISONING_DECEPTION, MCP_TOOL_POISONING_REMOTE_STORAGE, MCP_TOOL_POISONING_HIDDEN_ACTIONS)",
"severity": "critical",
"mitigation": "Remove references to sensitive data collection."
},
{
"risk": "Data exfiltration patterns: MCP_EXFIL_CONVERSATION, MCP_EXFIL_EXTERNAL_UPLOAD",
"severity": "high",
"mitigation": "Remove references to exfiltrating conversation data or monitoring input."
}
],
"limitations": [
"Static analysis only - runtime behavior not verified"
]
},
"incident_response": {
"kill_switch": [
"Stop the agent process"
],
"containment": [
"Review logs for unexpected actions"
],
"recovery": [
"Depends on skill capabilities"
]
},
"evidence": [
{
"evidence_id": "EV:file-1",
"type": "file_excerpt",
"title": "README.md",
"file_path": "README.md"
},
{
"evidence_id": "EV:file-2",
"type": "file_excerpt",
"title": "references/adapters/community-adapters.mdx",
"file_path": "references/adapters/community-adapters.mdx"
},
{
"evidence_id": "EV:file-3",
"type": "file_excerpt",
"title": "references/adapters/drizzle.mdx",
"file_path": "references/adapters/drizzle.mdx"
},
{
"evidence_id": "EV:file-4",
"type": "file_excerpt",
"title": "references/adapters/mongo.mdx",
"file_path": "references/adapters/mongo.mdx"
},
{
"evidence_id": "EV:file-5",
"type": "file_excerpt",
"title": "references/adapters/mssql.mdx",
"file_path": "references/adapters/mssql.mdx"
},
{
"evidence_id": "EV:file-6",
"type": "file_excerpt",
"title": "references/adapters/mysql.mdx",
"file_path": "references/adapters/mysql.mdx"
},
{
"evidence_id": "EV:file-7",
"type": "file_excerpt",
"title": "references/adapters/other-relational-databases.mdx",
"file_path": "references/adapters/other-relational-databases.mdx"
},
{
"evidence_id": "EV:file-8",
"type": "file_excerpt",
"title": "references/adapters/postgresql.mdx",
"file_path": "references/adapters/postgresql.mdx"
},
{
"evidence_id": "EV:file-9",
"type": "file_excerpt",
"title": "references/adapters/prisma.mdx",
"file_path": "references/adapters/prisma.mdx"
},
{
"evidence_id": "EV:file-10",
"type": "file_excerpt",
"title": "references/adapters/sqlite.mdx",
"file_path": "references/adapters/sqlite.mdx"
},
{
"evidence_id": "EV:cisco-1",
"type": "file_excerpt",
"title": "SECRET_CONNECTION_STRING [HIGH] references/adapters/postgresql.mdx:20: connectionString: \"postgres://user:password@localhost:5432/database\",",
"file_path": "references/adapters/postgresql.mdx"
},
{
"evidence_id": "EV:cisco-2",
"type": "file_excerpt",
"title": "MCP_EXFIL_CONVERSATION [HIGH] references/authentication/discord.mdx:57: If you're using the `bot` scope with Discord OAuth, you can specify bot permissi",
"file_path": "references/authentication/discord.mdx"
},
{
"evidence_id": "EV:cisco-3",
"type": "file_excerpt",
"title": "MCP_TOOL_POISONING_SENSITIVE_DATA [HIGH] references/authentication/email-password.mdx:334: Better Auth stores passwords inside the `account` table with `providerId` set to",
"file_path": "references/authentication/email-password.mdx"
},
{
"evidence_id": "EV:cisco-4",
"type": "file_excerpt",
"title": "MCP_TOOL_POISONING_DECEPTION [CRITICAL] references/basic-usage.mdx:54: By default, the users are automatically signed in after they successfully sign u",
"file_path": "references/basic-usage.mdx"
},
{
"evidence_id": "EV:cisco-5",
"type": "file_excerpt",
"title": "MCP_SCRIPT_TAGS [HIGH] references/basic-usage.mdx:226: <script setup lang=\"ts\">",
"file_path": "references/basic-usage.mdx"
},
{
"evidence_id": "EV:cisco-6",
"type": "file_excerpt",
"title": "MCP_SCRIPT_TAGS [HIGH] references/concepts/client.mdx:115: <script lang=\"ts\" setup>",
"file_path": "references/concepts/client.mdx"
},
{
"evidence_id": "EV:cisco-7",
"type": "file_excerpt",
"title": "MCP_TOOL_POISONING_DECEPTION [CRITICAL] references/concepts/email.mdx:143: ### Auto Sign In After Verification",
"file_path": "references/concepts/email.mdx"
},
{
"evidence_id": "EV:cisco-8",
"type": "file_excerpt",
"title": "MCP_TOOL_POISONING_SENSITIVE_DATA [HIGH] references/concepts/plugins.mdx:233: Don't store sensitive information in the `user` or `session` table. Create a new",
"file_path": "references/concepts/plugins.mdx"
},
{
"evidence_id": "EV:cisco-9",
"type": "file_excerpt",
"title": "MCP_EXFIL_CONVERSATION [HIGH] references/integrations/electron.mdx:365: Listen for authentication errors via the `onAuthError` bridge in the renderer pr",
"file_path": "references/integrations/electron.mdx"
},
{
"evidence_id": "EV:cisco-10",
"type": "file_excerpt",
"title": "MCP_TOOL_POISONING_REMOTE_STORAGE [MEDIUM] references/integrations/hono.mdx:175: // Now your client requests will include credentials",
"file_path": "references/integrations/hono.mdx"
}
]
}