AnonymousSpottedToad/securityPatternsRecovery / ground_truth /python /authentication_pwd__AmberLee2427_nancy-brain.json
| { | |
| "role_mappings": [ | |
| { | |
| "patternRole": "Subject", | |
| "entity": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "Submits username + password via form", | |
| "status": "external", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Enforcer", | |
| "entity": "login", | |
| "file": "connectors/http_api/app.py", | |
| "lines": "323", | |
| "notes": "Raises HTTP 401 on invalid credentials", | |
| "status": "present", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Verification manager", | |
| "entity": "authenticate_user", | |
| "file": "connectors/http_api/auth.py", | |
| "lines": "226", | |
| "notes": "Orchestrates DB lookup + bcrypt verify", | |
| "status": "present", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Comparator", | |
| "entity": "verify", | |
| "file": "connectors/http_api/auth.py", | |
| "lines": "221", | |
| "notes": "passlib bcrypt constant-time compare", | |
| "status": "external", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Hasher", | |
| "entity": "verify", | |
| "file": "connectors/http_api/auth.py", | |
| "lines": "221", | |
| "notes": "bcrypt hashing (secure)", | |
| "status": "external", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Password store", | |
| "entity": "get_user", | |
| "file": "connectors/http_api/auth.py", | |
| "lines": "210", | |
| "notes": "CREATE TABLE users; get_user() at L210", | |
| "status": "present", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Pepper store", | |
| "entity": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "Not found", | |
| "status": "missing", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Encrypter", | |
| "entity": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "Not found (no HMAC/pepper step)", | |
| "status": "missing", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Hash manager", | |
| "entity": "add_user", | |
| "file": "connectors/http_api/auth.py", | |
| "lines": "257", | |
| "notes": "Orchestrates hashing during registration", | |
| "status": "missing", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "SRNG", | |
| "entity": "secrets.token_urlsafe", | |
| "file": "connectors/http_api/auth.py", | |
| "lines": "111", | |
| "notes": "CSPRNG for API keys; bcrypt auto-generates salt", | |
| "status": "missing", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Password policy", | |
| "entity": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "Not found (no explicit password policy check)", | |
| "status": "missing", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "System", | |
| "entity": "", | |
| "file": "connectors/http_api/app.py", | |
| "lines": "327–335", | |
| "notes": "Returns data after successful auth", | |
| "status": "missing", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Registrar", | |
| "entity": "add_user", | |
| "file": "connectors/http_api/auth.py", | |
| "lines": "257", | |
| "notes": "Hashes password and inserts into users table; also add_user.py CLI", | |
| "status": "missing", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Resetter", | |
| "entity": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "Not found (no password reset flow)", | |
| "status": "missing", | |
| "nodeId": null | |
| } | |
| ], | |
| "interaction_order": { | |
| "available": true, | |
| "language": "python", | |
| "repo": "AmberLee2427_nancy-brain", | |
| "reason": "", | |
| "entryRole": "Enforcer", | |
| "entryRule": "behaviour", | |
| "interactions": [ | |
| { | |
| "rank": 1, | |
| "interaction": "Enforcer → Verification manager", | |
| "from": "Enforcer", | |
| "to": "Verification manager", | |
| "file": "connectors/http_api/app.py", | |
| "line": 324, | |
| "via": [], | |
| "mechanism": "call", | |
| "path": [ | |
| { | |
| "caller": "connectors/http_api/app.py:<module>.login", | |
| "file": "connectors/http_api/app.py", | |
| "line": 324, | |
| "code": "auth.authenticate_user(form_data.username, form_data.password)", | |
| "callee": "connectors/http_api/auth.py:<module>.authenticate_user", | |
| "mechanism": "call" | |
| } | |
| ], | |
| "parent": "" | |
| }, | |
| { | |
| "rank": 2, | |
| "interaction": "Verification manager → Password store", | |
| "from": "Verification manager", | |
| "to": "Password store", | |
| "file": "connectors/http_api/auth.py", | |
| "line": 316, | |
| "via": [], | |
| "mechanism": "call", | |
| "path": [ | |
| { | |
| "caller": "connectors/http_api/auth.py:<module>.authenticate_user", | |
| "file": "connectors/http_api/auth.py", | |
| "line": 316, | |
| "code": "get_user(username)", | |
| "callee": "connectors/http_api/auth.py:<module>.get_user", | |
| "mechanism": "call" | |
| } | |
| ], | |
| "parent": "Enforcer → Verification manager" | |
| } | |
| ], | |
| "anchoredRoles": [ | |
| { | |
| "role": "Comparator", | |
| "kind": "external" | |
| }, | |
| { | |
| "role": "Encrypter", | |
| "kind": "external" | |
| }, | |
| { | |
| "role": "Enforcer", | |
| "kind": "METHOD" | |
| }, | |
| { | |
| "role": "Hash manager", | |
| "kind": "METHOD" | |
| }, | |
| { | |
| "role": "Hasher", | |
| "kind": "external" | |
| }, | |
| { | |
| "role": "Password policy", | |
| "kind": "external" | |
| }, | |
| { | |
| "role": "Password store", | |
| "kind": "METHOD" | |
| }, | |
| { | |
| "role": "Pepper store", | |
| "kind": "external" | |
| }, | |
| { | |
| "role": "Registrar", | |
| "kind": "METHOD" | |
| }, | |
| { | |
| "role": "Resetter", | |
| "kind": "external" | |
| }, | |
| { | |
| "role": "SRNG", | |
| "kind": "external" | |
| }, | |
| { | |
| "role": "Verification manager", | |
| "kind": "METHOD" | |
| } | |
| ], | |
| "skippedRoles": [ | |
| "Subject", | |
| "System" | |
| ] | |
| } | |
| } |
Xet Storage Details
- Size:
- 5.89 kB
- Xet hash:
- aff6cd241fe7e2f1ffabafceffd9aca6fd2751bd8b53b8bb778a108912e14a1c
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.