Require dashboard authentication and harden scrape URL handling - #12
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 703b775b8f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if vps_mode: | ||
| return BLOCKED | ||
| return OPEN |
There was a problem hiding this comment.
Fail closed outside the detected VPS
When this same Streamlit app is published anywhere other than /opt/autosniper without explicitly setting AUTOSNIPER_VPS_MODE (for example the README still advertises Streamlit Cloud hosting, and the devcontainer forwards port 8501), a missing dashboard password falls through to OPEN, so those public deployments still render the scraper/model/dataset controls anonymously. Treating every non-VPS path as local leaves the access-control fix dependent on an easy-to-miss deployment flag; the policy should fail closed for hosted/non-loopback environments or require an explicit local opt-out.
Useful? React with 👍 / 👎.
Summary
Rebuild
The original branch predated PRs #10-#16 and conflicted with current main. It has been rebuilt through merge commit
7e24951, which retains the original PR history and current main as parents while using the fully tested 12-file authentication tree.Validation
Credential and runtime boundary
Do not merge/deploy this PR until the operator confirms possession of the dashboard password or a replacement password is generated and safely retained. A PBKDF2 verifier alone cannot recover the password.
Merging this PR does not deploy it. After credential confirmation, merge to main, deploy through the governed VPS release, then verify unauthenticated blocking, successful login, service health, and daily/hourly timers without changing VPS-owned runtime data.