Open-source readiness: license, decoupled identity, README, security docs - #1
Merged
Merged
Conversation
…security docs - Add LICENSE (MIT) - Extract owner identity out of source into AGENT_OWNER_NAME/AGENT_CONTACT_EMAIL settings (app/core/config.py) so forking means editing .env + app/knowledge/, not Python source - Rewrite README.md with architecture diagram, provider config, personalization guide, API contract, Docker/Railway walkthroughs, and troubleshooting - Document that CORS is not authentication and add baseline security response headers (SecurityHeadersMiddleware) and a documented note on session-id rate-limit bypass in SECURITY.md - Add GitHub issue/PR templates Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up from a full production-readiness / security / open-source audit of this repo. Everything found (moderation, rate limiting, redacted logging, locked CORS, error handling, timeouts, budget caps, existing docs) was already in good shape — this PR closes the remaining gaps to make the repo genuinely fork-and-run for another developer.
LICENSE(MIT).AGENT_OWNER_NAME/AGENT_CONTACT_EMAILsettings drive the system prompt (app/prompts/system_prompt.py, now templated functions) and the LLM-unavailable fallback reply (app/services/chat_service.py) instead of hardcoded "Saad"/email strings. Forking now only requires editing.env+app/knowledge/, no Python source changes.README.md: purpose, audience, mermaid architecture diagram, features, quick start, provider configuration, step-by-step personalization guide, full API contract, Docker, Railway deploy walkthrough, security summary, testing, troubleshooting, contributing, license.SECURITY.md: explicit "CORS is not authentication" + "Website → Agent API" sections explaining the threat model and why there's no frontend-held API key; also documents that per-session rate limiting is bypassable via client-chosen session IDs (bounded by the per-IP limiter and the daily LLM-call budget regardless).app/core/middleware.py/app/main.py: addSecurityHeadersMiddleware(X-Content-Type-Options,Referrer-Policy) as low-cost defense-in-depth.No changes to the API contract, CrewAI orchestration, storage, or deployment model — the live website integration and current Railway deployment are unaffected. Note: the live Railway deployment should get
AGENT_OWNER_NAME=SaadandAGENT_CONTACT_EMAIL=saad.amjad434@gmail.comset (the owner-name default already covers "Saad", but the contact email needs to be set explicitly to preserve current fallback-reply wording).Test plan
ruff check .passesmypy apppasses (strict mode)pytest -q— 43/43 passing_build_fallback_reply()/build_qa_agent_goal()render correctly with env-driven identityAGENT_OWNER_NAME/AGENT_CONTACT_EMAILin Railway before/at merge🤖 Generated with Claude Code