chore: bootstrap operational hygiene (CI, hooks, templates, configs)#1
Merged
Conversation
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
Establishes the missing foundation for safe iteration across the rest of
the cleanup. None of these changes touch application code or behavior.
CI / security
- .github/workflows/ci.yml — backend (ruff/black/isort/mypy/pytest) +
dashboard (eslint/tsc/vitest/build), Postgres + Redis service containers
- .github/workflows/security.yml — Bandit SAST, pip-audit, npm audit,
gitleaks, CodeQL (Python + JS/TS), weekly schedule
- .github/dependabot.yml — pip, npm, GitHub Actions, Docker (grouped)
Repo metadata
- .github/PULL_REQUEST_TEMPLATE.md — security + migration checklists
- .github/ISSUE_TEMPLATE/{bug_report,feature_request,config}
— routes security reports to private GitHub Security Advisories
- .github/CODEOWNERS — default + voice/migrations carve-outs
Project docs
- CONTRIBUTING.md — local setup, commit/branch conventions, quality bar
- SECURITY.md — disclosure policy, hardening guidance, known debt
- CODE_OF_CONDUCT.md — Contributor Covenant 2.1
- CHANGELOG.md — Keep a Changelog skeleton, Unreleased entry seeded
Tooling
- backend/pyproject.toml — ruff (E/W/F/I/B/C4/UP/SIM/RUF/ASYNC/S/T20/...),
black (line-length=100), isort (black profile), mypy (strict_optional,
check_untyped_defs, pydantic plugin), coverage config; pinned
requires-python = ">=3.13" to match Dockerfile
- .pre-commit-config.yaml — ruff, black, isort, eslint, gitleaks,
large-file + private-key guards, EOL normalization
- .editorconfig — LF, UTF-8, 4-space Python / 2-space TS
- .gitattributes — explicit LF for source, binary patterns, linguist hints
- .gitignore — explicit archive patterns (*.zip etc.), .env.* glob,
mypy/ruff caches, additional editor/OS junk
Refs: architectural review TOP-10 #9 (delete dead/orphan dirs follows in
later PR), code review #4 (gates needed before broader refactor), security
review TOP-10 items will land in the next PR with CI as a safety net.
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
This is PR 1 of 4 in a critical-cleanup sweep informed by parallel architecture / code / security / performance / refactor reviews.
This PR adds only net-new files (plus
pyproject.tomland.gitignoreexpansions). Zero application code changes. The goal is to land the safety net before later PRs touch runtime code.Why this is first
The repo currently has no CI, no pre-commit hooks, no Dependabot, no PR/issue templates, no
CONTRIBUTING/SECURITY/COC, andpyproject.tomldeclares no linter/formatter/type-checker configuration. Subsequent PRs (security fixes, reliability fixes, deletions) are much safer with these gates in place.What's added
CI / security workflows
.github/workflows/ci.yml— backend (ruff, black, isort, mypy, pytest with coverage) + dashboard (eslint, tsc, vitest, build). Postgres 16 + Redis 7 service containers wired..github/workflows/security.yml— Bandit SAST, pip-audit, npm audit, gitleaks, CodeQL (Python + JS/TS). Runs on PRs and weekly Mondays..github/dependabot.yml— pip, npm, GitHub Actions, Docker. Grouped to keep PR volume sane.Repo metadata
.github/PULL_REQUEST_TEMPLATE.md— security + migration safety checklist.github/ISSUE_TEMPLATE/{bug_report,feature_request,config}— routes security reports to private GitHub Security Advisories.github/CODEOWNERS— default + voice/migrations carve-outsProject docs
CONTRIBUTING.md— local setup, branch/commit conventions, quality barSECURITY.md— disclosure policy, hardening guidance, known debtCODE_OF_CONDUCT.md— Contributor Covenant 2.1CHANGELOG.md— Keep a Changelog skeletonTooling
backend/pyproject.toml— ruff (security + async + bugbear + import rules), black, isort, mypy with pydantic plugin, coverage config. Pinnedrequires-python = ">=3.13"(was>=3.10) to match thepython:3.13-slimDocker base..pre-commit-config.yaml— ruff, black, isort, eslint, gitleaks, large-file guard, private-key detector.editorconfig+.gitattributes— LF normalization, indent rules, binary patterns.gitignore— explicit*.zip/archive patterns,.env.*glob, mypy/ruff cachesTest plan
check-yaml/check-toml/check-jsonto pre-commit)pre-commit install && pre-commit run --all-fileslocally (expect existing code to surface lint hits — those land in later PRs)Follow-up PRs in this sweep
init_db()silent-fail, SSRF blocklist, IDOR fixes on voice/findings/missions, auth rate limits.SourceCacheinto Exa/Gemini, missing DB indexes, pagination,asyncio.create_taskmigration.services/workflows/,api/routes/,files.zip,backend/seed.py, dead TS components/hooks, duplicate test files, Dockerfile relocation.Notes on findings (for context)
Cross-agent review surfaced these CRITICALs that this PR does NOT fix (intentionally — addressed in PR 2/3):
backend/app/services/crews/tools/python_executor.py:39-45— string-scan blocklist is bypassed by__import__('o'+'s'),importlib,open().backend/app/api/voice_webhooks.py— zero Twilio signature validation.backend/app/api/webhooks.py—resend_webhook_secretconfigured but never used.backend/app/database.py:38—except Exception: passininit_db().backend/app/services/scheduler.py— APScheduler in-process will multi-fire underuvicorn --workers >1.CI landing first means these fixes will have a real test gate when they ship.