CRITICAL: Default admin credentials with no enforced change on first login #34
Labels
No labels
agentic-osint
audit
blocked:commit-ready-failed
blocked:gate-fetch
blocked:gate-fetch
blocked:gate-lint
blocked:gate-plan
blocked:gate-research
blocked:needs-decision
blocked:needs-human
blocked:no-changes
blocked:preflight
blocked:verify-failed
bug
chore
deferred
enhancement
feature-request
in-progress
lint-baseline
lint-cleanup
needs-decompose
needs-triage
performance
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/osint-hub#34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: Critical
Description
The admin account is created with hardcoded default credentials (
admin@example.local/adminadmin) at application startup viabackend/app/init_db.py:15-20. The password is stored in settings with a default value (settings.py:19), and the.envfile checked into version control also containsOSINT_ADMIN_PASSWORD=adminadmin.Files
backend/app/settings.pylines 18-19: Default admin_email and admin_passwordbackend/app/init_db.pylines 13-21: Creates admin user with these defaultsbackend/.envline 13:OSINT_ADMIN_PASSWORD=adminadmindocker-compose.ymlline 42:OSINT_ADMIN_PASSWORD: ${ADMIN_PASSWORD:-adminadmin}Impact
Any attacker who can reach the login page can authenticate as admin with
adminadmin. The only protection is a warning log message, which provides no actual security.Recommendation
GSD VERIFY phase failed after 3 attempts.
═══ Gate: verify-passed (osint-hub#34) ═══
Mode: Tier 1 (functional only)
GATE OK: All gates up to 'implement' pass
── Tier 1: Functional ────────────────────────────────
Running tests...
❌ Tests failed (exit 4)
timeout method: signal
timeout func_only: False
collected 0 items
============================ no tests ran in 0.00s =============================
/home/b/.hermes/hermes-agent/venv/lib/python3.11/site-packages/pytest_asyncio/plugin.py:247: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
ERROR: file or directory not found: tests/
============================= test session starts ==============================
platform linux -- Python 3.11.14, pytest-8.3.5, pluggy-1.6.0
rootdir: /home/b/Projects/osint-hub
configfile: pyproject.toml
plugins: asyncio-1.3.0, anyio-4.13.0, httpx-0.36.2, timeout-2.4.0, xdist-3.8.0, cov-7.1.0, split-0.11.0
asyncio: mode=Mode.STRICT, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collected 0 items
============================ no tests ran in 0.00s =============================
Running linter...
✅ Lint clean
Running type checker...
✅ Types check clean
Previous test count: unknown
❌ GATE FAIL: verify-passed
- Tests failed with exit code 4
GATE FAIL: verify — blocked at 2026-05-21T00:03:01Z
Class: test-failure
Evidence: Verification failed: 1 failures
Git tag: osint-hub#34-gate-verify-fail-dc5e7ec2eda4 (use gate-retry after fixing)
GSD PLAN: response missing GATE: line.
Fixed: Default admin credentials removed
Changes:
admin@example.local/adminadmindefaults. Madeadmin_emailandadmin_passwordOptional[str] with defaultNone.must_change_passwordboolean field (default False). Initial admin created via env vars getsmust_change_password=True.must_change_passwordflag.must_change_passwordflag so frontend can redirect to password change.:-adminadminand:-admin@example.localfallbacks (now use:?errorto fail if not set).Verification
398920fon issue-80-evidence-phase2Migration note
Existing databases with the
usertable will not have themust_change_passwordcolumn. A manual migration may be needed: