agent-security-hardening
AFaffaan-m/ECC314k3,503 new stars in the last 7 days
OAuth 2.0 attack checklist: authorization code interception, redirect_uri bypass, CSRF on OAuth flow, state parameter abuse, open redirector chaining, token leakage via Referer, PKCE bypass, and scope escalation. Use when testing OAuth implementations in web apps or bug bounty.
OAuth 2.0 attack checklist: authorization code interception, redirect_uri bypass, CSRF on OAuth flow, state parameter abuse, open redirector chaining, token leakage via Referer, PKCE bypass, and scope escalation. Use when testing OAuth implementations in web apps or bug bounty.
Use this skill when the conversation involves any of:
OAuth, OAuth 2.0, authorization code, redirect_uri bypass, OAuth CSRF, state parameter, PKCE bypass, scope escalation, token leakage, open redirector, OAuth attack
When this skill is active:
private_key_jwt or mTLS client authentication for confidential clientscode_verifier must be required and validated.nonce is present and matched; state should be unguessable and tied to session.redirect_uri exact match: Enforce exact string match against pre-registered allowlist; no wildcards/path traversal.aud/azp/iss enforcement: Validate tokens strictly, including clock skew and JWKS kid rotation behavior.token_type and audience.response_type=tokenresponse_type=code id_token for additional securityprivate_key_jwt or MTLS requiredgraph TD
User[Resource Owner] -->|Initiates flow| Client
Client -->|Authorization Request| AuthServer[Authorization Server]
AuthServer -->|Authentication| User
User -->|Approves access| AuthServer
AuthServer -->|Authorization Code| Client
Client -->|Code + Client Secret| AuthServer
AuthServer -->|Access Token| Client
Client -->|Access Token| ResourceServer[Resource Server]
ResourceServer -->|Protected Resource| Client
style User fill:#b7b,stroke:#333,color:#333
style Client fill:#aae,stroke:#333,color:#333
style AuthServer fill:#9f9,stroke:#333,color:#333
style ResourceServer fill:#e9a,stroke:#333,color:#333
__Host- prefix with HttpOnly; Secure; SameSite.response_type=code/authorization?client_id=12345&redirect_uri=https://client-app.com/callback&response_type=code&scope=openid%20profile&state=ae13d489bd00e3c24/callback?code=a1b2c3d4e5f6g7h8&state=ae13d489bd00e3c24sequenceDiagram
participant User
participant Client
participant AuthServer as Authorization Server
participant API as Resource Server
User->>Client: 1. Click "Login with Service"
Client->>AuthServer: 2. Authorization Request (response_type=code)
AuthServer->>User: 3. Login & Consent
User->>AuthServer: 4. Approves Access
AuthServer->>Client: 5. Redirect with Authorization Code
Client->>AuthServer: 6. Token Request (code + client_secret)
AuthServer->>Client: 7. Access & Refresh Tokens
Client->>API: 8. API Request + Access Token
API->>Client: 9. Protected Resource
response_type=token/authorization?client_id=12345&redirect_uri=https://client-app.com/callback&response_type=token&scope=openid%20profile&state=ae13d489bd00e3c24/callback#access_token=z0y9x8w7v6u5&token_type=Bearer&expires_in=5000&scope=openid%20profile&state=ae13d489bd00e3c24sequenceDiagram
participant User
participant Client as Client (Browser)
participant AuthServer as Authorization Server
participant API as Resource Server
User->>Client: 1. Click "Login with Service"
Client->>AuthServer: 2. Authorization Request (response_type=token)
AuthServer->>User: 3. Login & Consent
User->>AuthServer: 4. Approves Access
AuthServer->>Client: 5. Redirect with Access Token in Fragment
Note over Client: Token stored in browser
Client->>API: 6. API Request + Access Token
API->>Client: 7. Protected Resource
state parameter in auth requestsOpen Redirect → Authorization Code Theft:
CSRF → Account Linking Attack:
XSS → Token Theft:
Token Exchange → Service Impersonation:
Scope Elevation → Privilege Escalation:
IdP Confusion → Cross-Tenant Access:
JWT Algorithm Confusion → Signature Bypass:
SSRF via redirect_uri → Internal Service Access:
Token Replay → Session Hijacking:
Implement OAuth 2.1: Adopt latest security recommendations
Enforce state parameter: Always required, cryptographically random, single-use
Validate token claims strictly:
aud (audience): Must match resource serveriss (issuer): Verify against known issuersexp (expiration): Enforce with clock skew tolerance (max 60s)nbf (not before): Validate if presentSecure token storage:
__Host- prefix or memory-only storageHttpOnly; Secure; SameSite=Strict/par endpointAFaffaan-m/ECC314k3,503 new stars in the last 7 days
Audit the whole repo: find bugs, security holes and performance bottlenecks. Get a ranked report in plain English.
DIDietrichGebert/ponytail202k4,226 new stars in the last 7 days
GAgarrytan/gstack143k524 new stars in the last 7 days
Harden code against the OWASP Top 10: input handling, authentication, sessions and dependencies.
ADaddyosmani/agent-skills122k1,421 new stars in the last 7 days
ADaddyosmani/agent-skills122k1,421 new stars in the last 7 days
RUruvnet/RuView106k596 new stars in the last 7 days