oauth-security
Skill18 starsChanged 3 months agoMITView on GitHub
Analyze OAuth/OIDC integration security — use when reviewing redirect URIs, state/nonce, token handling, PKCE, or confused-deputy risks in authorization code flows (CWE-601 / A07:2021 / API2:2023).
1 other project uses a version of this.
Adopted by
Most recently taken up by
- ShulkwiSEC/bb-hugetheir own version, first seen Jun 4, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- ShulkwiSEC/bb-huge★ 22same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository39 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ai-agent-securitySkill
- ai-application-securitySkill
- api-securitySkill
- attack-surface-mappingSkill
- authentication-analysisSkill
- authorization-analysisSkill
- axguard-auditSkill
- axguard-csoSkill
- axguard-knowledgeSkill
- axguard-preshipSkill
- axguard-remediateSkill
- axguard-reportSkill
- axguard-securitySkill
- axguard-triageSkill
- cloud-securitySkill
- command-injectionSkill
- configuration-securitySkill
- deserialization-securitySkill
- file-upload-securitySkill
- graphql-securitySkill
- jwt-securitySkill
- mcp-securitySkill
- path-traversalSkill
- prompt-injectionSkill
- prototype-pollutionSkill
- secrets-detectionSkill
- security-architecture-reviewSkill
- security-remediationSkill
- security-triageSkill
- session-securitySkill
- sql-injectionSkill
- ssrf-analysisSkill
- ssti-analysisSkill
- supply-chain-securitySkill
- threat-modelingSkill
- websocket-securitySkill
- xss-analysisSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 67
Verify redirect URI matching is exact/allowlisted — no wildcards that enable takeover.
- Distinctive: line 70
Prefer auth code + PKCE; reject implicit flow for new apps.
- Distinctive: line 71
Check token storage (HttpOnly cookies vs localStorage), refresh rotation, and scope minimization.
- Very specific: line 73
Ensure client secrets are not in mobile/SPA binaries (secrets-detection).
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OAuth Security
Purpose
Teach defensive review of OAuth 2.0 / OpenID Connect client and resource-server integrations: redirect URI validation, CSRF (state), replay (nonce), PKCE, and token handling.
When to Use / When Not to Use
Use when:
- Apps act as OAuth clients (social login, enterprise IdP) or resource servers validating access tokens.
- Custom callback handlers, deep links, or mobile schemes receive
code/token. - Reviewing “Login with …” or multi-tenant SSO.
Do not use when:
- Homegrown username/password only (
authentication-analysis). - JWT crypto bugs without OAuth protocol context (
jwt-security).
Security Concepts
OAuth security hinges on binding the redirect to a pre-registered URI, binding the browser session with state, and (for public clients) PKCE. Implicit/token-in-URL flows are legacy. Open redirects in post-login destinations are often chained with OAuth.
Threat Model
Attacker goals:
- Steal authorization codes via open/unsafe redirect URIs.
- CSRF login linking (account takeover via victim completing OAuth without
state). - Token leakage via referrers, logs, or insecure storage.
- Confused deputy / overly broad scopes.
Analysis Workflow
- Identify roles: client, auth server, resource server; which code you own.
- Verify redirect URI matching is exact/allowlisted — no wildcards that enable takeover.
- Confirm
stategenerated with entropy, stored server-side or signed, validated on callback. - For OIDC: validate
nonceand ID token claims (iss,aud,exp) — hand signature details tojwt-security. - Prefer auth code + PKCE; reject implicit flow for new apps.
- Check token storage (HttpOnly cookies vs localStorage), refresh rotation, and scope minimization.
- Review post-auth redirects for open redirect (CWE-601) chaining.
- Ensure client secrets are not in mobile/SPA binaries (
secrets-detection).
Evidence Requirements
- Callback / client config location
- Missing
state/PKCE/redirect allowlist or token mishandling - Impact: code theft / account linking CSRF / token leak
False Positive Controls
- Server apps using confidential clients with exact redirect URIs and validated
state - Device/code flows intentionally different — review against their RFC threats separately
- Third-party IdP misconfiguration outside owned code (document; do not “hack” IdP)
Remediation
- Exact redirect URI allowlists; HTTPS (except controlled loopback dev).
- Mandatory
state; PKCE for public clients; auth code flow. - Validate ID/access tokens fully; minimize scopes.
- Store tokens securely; rotate refresh tokens; revoke on logout.
- Fix open redirects on post-login destinations.
Verification
Map OAuth callbacks → Enforce redirect/state/PKCE → Re-run axguard → Confirm tokens not in URLs/logsRelated Skills
authentication-analysis,jwt-security,session-securityauthorization-analysis,api-securitysecurity-triage,security-remediation
Framework Mapping
- CWE-601, CWE-287, CWE-352
- OWASP A07:2021
- OWASP API2:2023 Broken Authentication
References
- https://owasp.org/Top10/A07_2021-Identification_and_Authentication_Failures/
- https://owasp.org/API-Security/editions/2023/en/api2-broken-authentication/
- https://cwe.mitre.org/data/definitions/601.html
- https://cwe.mitre.org/data/definitions/287.html
Research Provenance
Primary sources:
- OWASP A07:2021; OWASP API2:2023; CWE-601; CWE-287; CWE-352 (accessed 2026-09-15)
Secondary / internal:
- AXGuard
rules/auth.json,/axguard-auth - AwareXone Agentic-Bug-Hunter OAuth methodology (concepts only; not copied)
Datasets:
- UVID HF dataset — category linkage concepts only (MIT license metadata review 2026-09-15)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

