AuthAudit scans your codebase for authentication and authorization vulnerabilities including missing auth checks, insecure session handling, broken access control, CSRF gaps, token storage issues, and credential management weaknesses. It supports JavaScript/TypeScript, Python, Ruby, Go, Java, and PHP codebases. All scanning happens locally using regex-based pattern matching -- no code is sent to external servers.
AuthAudit organizes its 90 security patterns into 6 categories:
Detects missing authentication middleware, unprotected routes, bypassed login checks, missing auth decorators, unauthenticated API endpoints, disabled authentication, anonymous access to sensitive resources, and missing multi-factor authentication enforcement.
Finds insecure session configuration, missing session expiry, absent session rotation on privilege changes, predictable session IDs, session fixation vulnerabilities, missing Secure/HttpOnly cookie flags, overly long session lifetimes, and sessions stored in insecure locations.
Identifies missing role checks, broken object-level authorization (BOLA), insecure direct object references (IDOR), missing permission verification, privilege escalation paths, hardcoded admin roles, missing function-level authorization, and horizontal access control bypasses.
Catches JWT stored in localStorage, tokens transmitted in URL parameters, missing token expiry validation, absent token refresh rotation, weak signing algorithms (none/HS256 with secrets), token leakage in logs, missing audience/issuer validation, and insecure token generation.
Detects missing CSRF tokens on state-changing endpoints, absent SameSite cookie flag, GET requests performing side effects, missing Origin/Referer validation, state-changing GET endpoints, disabled CSRF middleware, CORS misconfigurations enabling CSRF, and missing double-submit cookie patterns.
Finds weak password requirements, plaintext password comparison, missing bcrypt/argon2 hashing, absent rate limiting on login endpoints, passwords in query strings, hardcoded credentials, insecure password reset tokens, missing password complexity enforcement, and credential logging.
Each finding is classified by severity:
| Severity | Weight | Description |
|----------|--------|-------------|
| Critical | 25 points | Active vulnerability that can be immediately exploited |
| High | 15 points | Significant security weakness requiring prompt attention |
| Medium | 8 points | Security concern to address in upcoming sprints |
| Low | 3 points | Best-practice improvement or informational finding |
AuthAudit calculates a security score from 0 to 100:
| Grade | Score Range | Meaning |
|-------|-------------|---------|
| A | 90 -- 100 | Excellent auth posture |
| B | 80 -- 89 | Good, minor improvements needed |
| C | 70 -- 79 | Acceptable, several issues to fix |
| D | 60 -- 69 | Below threshold, significant concerns |
| F | 0 -- 59 | Critical auth vulnerabilities present |
authaudit scan [file|directory]
One-shot authentication and authorization audit of source files.
How to execute:
bash "<SKILL_DIR>/scripts/dispatcher.sh" --path [target]
What it does:
Example usage scenarios:
authaudit scan .
authaudit scan src/
authaudit scan .
authaudit scan .
authaudit scan .
authaudit scan [file|directory] --category AC
Scan only a specific category.
bash "<SKILL_DIR>/scripts/dispatcher.sh" --path [target] --category AC
authaudit scan [file|directory] --format json
Output results in JSON format for CI/CD integration.
bash "<SKILL_DIR>/scripts/dispatcher.sh" --path [target] --format json
authaudit scan [file|directory] (60 patterns)
Full security audit with 60 patterns enabled (free + pro patterns).
bash "<SKILL_DIR>/scripts/dispatcher.sh" --path [target]
What it does (beyond free):
authaudit hooks install
Install git pre-commit hooks that scan staged files for auth issues before every commit.
bash "<SKILL_DIR>/scripts/dispatcher.sh" hooks install
authaudit hooks uninstall
Remove AuthAudit git hooks.
bash "<SKILL_DIR>/scripts/dispatcher.sh" hooks uninstall
authaudit report [directory]
Generate a markdown security audit report.
bash "<SKILL_DIR>/scripts/dispatcher.sh" report [directory]
authaudit scan [file|directory] (all 90 patterns)
Complete audit with all 90 patterns across all 6 categories.
bash "<SKILL_DIR>/scripts/dispatcher.sh" --path [target]
authaudit scan [file|directory] --format html
HTML report with interactive severity filtering.
bash "<SKILL_DIR>/scripts/dispatcher.sh" --path [target] --format html
| Tier | Patterns Available | Categories |
|------|-------------------|------------|
| Free | 30 (first 5 per category) | AC, SM, AZ, TK, CS, PW |
| Pro | 60 (first 10 per category) | AC, SM, AZ, TK, CS, PW |
| Team | 90 (all patterns) | AC, SM, AZ, TK, CS, PW |
| Enterprise | 90 (all patterns) | AC, SM, AZ, TK, CS, PW |
Users can configure AuthAudit in ~/.openclaw/openclaw.json:
{
"skills": {
"entries": {
"authaudit": {
"enabled": true,
"apiKey": "YOUR_LICENSE_KEY_HERE",
"config": {
"severityThreshold": "medium",
"excludePatterns": ["**/node_modules/**", "**/dist/**", "**/.git/**"],
"reportFormat": "text",
"categories": ["AC", "SM", "AZ", "TK", "CS", "PW"]
}
}
}
}
}
hooks install, prompt to install it
The user might say things like:
共 1 个版本