Skip to content

J1-PIPELINE: SentryView audit, security hardening, and documentation fixes - #34

Open
OneByJorah wants to merge 10 commits into
mainfrom
publish/20260705
Open

J1-PIPELINE: SentryView audit, security hardening, and documentation fixes#34
OneByJorah wants to merge 10 commits into
mainfrom
publish/20260705

Conversation

@OneByJorah

Copy link
Copy Markdown
Owner

Summary

This PR publishes all pending changes from the local audit and hardening pass for SentryView.

Changes

  • Security hardening: removed hardcoded RTSP credentials, removed unused dependencies (bcrypt, axios)
  • Documentation: corrected FastAPI references to Flask in README, updated CHANGELOG for 2.1.0
  • Docker: added health checks to ffmpeg and backup services
  • Code quality: fixed missing imports, shell syntax errors, dependabot paths

Commits

86c79b7 docs(changelog): document 2.1.0 release with audit, security hardening, and documentation fixes

J1-PIPELINE added 10 commits July 5, 2026 20:40
…cketio, get_db, JWTManager

The app was non-functional due to four missing critical components:
- limiter was used in route decorators but never imported or instantiated
- socketio was used for WebSocket emit/run but never imported or instantiated
- get_db() was called in every route handler but never defined
- JWTManager(app) was never initialized, breaking JWT auth

Added imports for Limiter, SocketIO, JWTManager, get_remote_address
Added JWTManager(app) initialization
Added Limiter with Redis storage backend
Added SocketIO with Eventlet async mode and Redis message queue
Added get_db() function using psycopg2 and Flask g context
…s in install.sh

The install.sh script had two critical issues:
1. Lines 82-84 used '***' as a command prefix (template redaction artifact)
   causing '***: command not found' shell errors
2. Missing opening parenthesis on subshell command substitution
3. The .env template written by install.sh contained literal '***' placeholders
   instead of the generated random values

Fixed:
- Replaced '*** rand -hex 32' with proper b968d962e1a16adddd9c580e9951140b94aa72bc7b05c8fa99766b759fe2
- Updated .env heredoc to use the generated SECRET, JWT_SECRET, and DB_PASS variables
…ture

Dependabot was configured with directory: '/' for all ecosystems,
but requirements.txt files are in /backend/ and /ffmpeg/,
package.json is in /frontend/, and Dockerfiles are in /backend/,
/frontend/, and /ffmpeg/. This caused Dependabot to scan the root
for files that don't exist, producing no dependency updates.

Fixed:
- pip: /backend and /ffmpeg (split into two entries)
- npm: /frontend
- docker: /backend, /frontend, /ffmpeg (split into three entries)
- github-actions: / (correct, stays at root)
bcrypt==4.3.0 was listed in backend/requirements.txt but never imported
or used anywhere in the codebase. The app uses hashlib.pbkdf2_hmac for
password hashing instead of bcrypt. This was a dead dependency.
axios was listed as a dependency in package.json but is never imported
or used anywhere in the frontend codebase. The app uses the native
fetch() API and a custom api.js wrapper for all HTTP requests.
…lementation

The README badge, feature list, and architecture diagram all claimed
'FastAPI Backend' but the actual implementation uses Flask with
Flask-SocketIO, Flask-JWT-Extended, and Flask-Limiter.

Updated:
- Badge from FastAPI to Flask
- Feature description from 'FastAPI Backend' to 'Flask Backend'
- Architecture diagram from 'FastAPI server' to 'Flask server'
Two services were missing health checks:
- ffmpeg: added pgrep-based health check to verify FFmpeg process is running
- backup: added pgrep-based health check to verify crond is running

Also fixed ffmpeg depends_on to use 'condition: service_healthy'
instead of a bare dependency, ensuring it waits for backend to be healthy.
Change @scheduler.job to @scheduler.scheduled_job
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant