ワンクリックで
backend-worker
Implements Python code for the VibeGuard security scanner using TDD — writes tests first, then implements CLI, config, stack detection, rules, engines, reports, auto-fix, and LLM integration.
メニュー
Implements Python code for the VibeGuard security scanner using TDD — writes tests first, then implements CLI, config, stack detection, rules, engines, reports, auto-fix, and LLM integration.
| name | backend-worker |
| description | Implements Python code for the VibeGuard security scanner using TDD — writes tests first, then implements CLI, config, stack detection, rules, engines, reports, auto-fix, and LLM integration. |
Implements Python source code for the VibeGuard security scanner. Follows strict TDD (Red-Green-Refactor) and verifies all work via pytest, mypy, ruff, and manual CLI execution.
vibeguard/tests/None
docs/vibeguard-spec.json for architectural context and rule definitions.vibeguard/__init__.py for package version and structure.pyproject.toml for dependencies, tool config (ruff, mypy, pytest), and entry points.Grep and Glob to find related code, existing tests, and usage patterns.vibeguard/cli.py)asyncio_mode = "auto"tests/ subdirectory:
tests/test_rules/ — rule unit teststests/test_live/ — live scanner tests (use respx for HTTP mocking)tests/test_fix/ — auto-fix teststests/test_reports/ — report generation teststests/test_integration/ — end-to-end scan testspython -m pytest tests/ -v --tb=short -x
vibeguard/core/ — scanner orchestrator, findings model, severityvibeguard/source/ — AST engine, pattern engine, LLM engine, rulesvibeguard/live/ — header checker, TLS, bundle analyzer, path probervibeguard/stacks/ — stack-specific detection and checksvibeguard/fix/ — fixer, branch manager, patch generatorvibeguard/report/ — JSON, Markdown, HTML, SARIF reportersvibeguard/factory/ — Factory/Droid integrationRun all three checks and fix any issues before proceeding:
# Install dev dependencies if needed (run once per session if imports fail)
pip install -e ".[dev]"
# Unit tests — all must pass
python -m pytest tests/ -v --tb=short
# Type checking — must pass with strict mode
python -m mypy vibeguard/
# Linting — must pass with zero violations
python -m ruff check vibeguard/ tests/
If any check fails, fix the issues and re-run until all three pass cleanly.
Run the VibeGuard CLI against test fixtures to verify end-to-end behavior:
# Scan a vulnerable fixture and verify findings are reported
vibeguard scan tests/fixtures/vulnerable_flask_app
vibeguard scan tests/fixtures/vulnerable_nextjs_app
vibeguard scan tests/fixtures/vulnerable_supabase_app
# Verify the output includes expected vulnerability categories
# Verify no crashes, clean exit code
If the CLI is not yet functional for the feature being built, note this in the handoff and skip this step.
Stage and commit all new and modified files with a descriptive message:
git add -A
git commit -m "feat(<scope>): <concise description of what was implemented>"
{
"salientSummary": "Implemented Rule C (Exposed Secrets) with 12 regex patterns covering OpenAI, Stripe, SendGrid, AWS, and Supabase service_role keys. Pattern engine matches secrets in both Python and JavaScript source files.",
"whatWasImplemented": [
"vibeguard/source/rules/exposed_secrets.py — Rule C with 12 secret patterns",
"vibeguard/source/pattern_engine.py — added multi-file regex scanning support",
"tests/test_rules/test_exposed_secrets.py — 8 test cases (6 positive, 2 negative)"
],
"whatWasLeftUndone": [
"Remaining 138+ secret patterns not yet added (only 12 of 150+ implemented)",
"JS bundle analysis for live scanning not yet connected to Rule C"
],
"verification": {
"commandsRun": [
"python -m pytest tests/ -v --tb=short — 8/8 passed, 0 failed",
"python -m mypy vibeguard/ — Success: no issues found",
"python -m ruff check vibeguard/ tests/ — All checks passed"
],
"interactiveChecks": [
"vibeguard scan tests/fixtures/vulnerable_supabase_app — correctly reported 2 CRITICAL exposed secret findings",
"vibeguard scan tests/fixtures/vulnerable_flask_app — correctly reported 1 CRITICAL exposed secret finding"
]
},
"tests": {
"added": [
"tests/test_rules/test_exposed_secrets.py::test_detects_openai_key",
"tests/test_rules/test_exposed_secrets.py::test_detects_stripe_secret_key",
"tests/test_rules/test_exposed_secrets.py::test_detects_aws_access_key",
"tests/test_rules/test_exposed_secrets.py::test_detects_supabase_service_role",
"tests/test_rules/test_exposed_secrets.py::test_detects_sendgrid_key",
"tests/test_rules/test_exposed_secrets.py::test_detects_multiple_secrets_in_one_file",
"tests/test_rules/test_exposed_secrets.py::test_ignores_placeholder_keys",
"tests/test_rules/test_exposed_secrets.py::test_no_false_positive_on_clean_code"
]
},
"discoveredIssues": [
"pattern_engine.py had no way to exclude .env files from secret scanning (they are covered by Rule I instead) — added exclude_patterns parameter to avoid double-reporting"
]
}
pytest, mypy, and ruff all pass cleanlydiscoveredIssues