feat: add ruff and pip-audit CI gates, fix style violations, and add …#70
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✅ Files skipped from review due to trivial changes (3)
📝 WalkthroughWalkthroughAdds a CI job that runs Ruff and pip-audit on Ubuntu and Windows, configures Ruff in pyproject, adds ruff and pip-audit to dev requirements, publishes SECURITY.md and README link, and applies import/formatting adjustments across code and tests. ChangesLinting, Auditing & Security Policy
Estimated code review effort 🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@CodeRabbit, can you review this PR fully now? |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
echo "=== .github/workflows/ci.yml ==="
cat .github/workflows/ci.yml
echo ""
echo "=== pyproject.toml ==="
cat pyproject.toml
echo ""
echo "=== SECURITY.md ==="
cat SECURITY.md
echo ""
echo "=== requirements-dev.txt ==="
cat requirements-dev.txt
echo ""
echo "=== requirements.txt ==="
cat requirements.txt
echo ""
echo "=== app.py ==="
cat app.py
echo ""
echo "=== utils/md_exporter.py ==="
cat utils/md_exporter.py
echo ""
echo "=== api/export_api.py ==="
cat api/export_api.py
echo ""
echo "=== api/projects.py ==="
cat api/projects.py
echo ""
echo "=== api/search.py ==="
cat api/search.py
echo ""
echo "=== api/sessions.py ==="
cat api/sessions.py
echo ""
echo "=== scripts/export.py ==="
cat scripts/export.py
echo ""
echo "=== models/export.py ==="
cat models/export.py
echo ""
echo "=== utils/export_day_filter.py ==="
cat utils/export_day_filter.py
echo ""
echo "=== utils/jsonl_parser.py ==="
cat utils/jsonl_parser.py
echo ""
echo "=== tests/test_exclusion_helpers.py ==="
cat tests/test_exclusion_helpers.py
echo ""
echo "=== tests/test_export_state.py ==="
cat tests/test_export_state.py
echo ""
echo "=== tests/test_cli_args.py ==="
cat tests/test_cli_args.py
echo ""
echo "=== README.md (first 100 lines) ==="
head -100 README.mdLength of output: 131170
PR Review:
|
…I, and test cleanup
|
@CodeRabbit. all are addressed now? |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
echo "=== api/sessions.py ==="
cat api/sessions.py
echo ""
echo "=== .github/workflows/ci.yml (lint-and-audit job) ==="
grep -n "ruff\|format\|audit" .github/workflows/ci.yml
echo ""
echo "=== utils/jsonl_parser.py (imports) ==="
head -60 utils/jsonl_parser.py
echo ""
echo "=== utils/md_exporter.py (_build_header function) ==="
grep -n "_format_duration\|format_duration" utils/md_exporter.pyLength of output: 6141
The PR looks ready to merge. 🐇 [approve] |
… import in export_api
|
Timon's concern is addressed? @CodeRabbit. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Fetch all PR comments and reviews to identify Timon's concern
gh pr view 70 --repo cppalliance/claude-code-chat-browser --json reviews,comments
echo ""
echo "=== PR Review comments ==="
gh api repos/cppalliance/claude-code-chat-browser/pulls/70/reviews
echo ""
echo "=== PR Comments ==="
gh api repos/cppalliance/claude-code-chat-browser/issues/70/commentsLength of output: 159026
Timon's concernTimon ( Is security satisfied?Yes. The security posture for this PR is solid:
The only outstanding pre-merge check warning is Docstring Coverage (31% vs 80% threshold), which is unrelated to the security requirements in issue |
Closes #67
Summary
ruff checkandpip-auditCI job onubuntu-latestandwindows-latestpyproject.toml; addruffandpip-audittorequirements-dev.txtapi/,utils/,scripts/, andtests/(no blanket# noqa)SECURITY.mdwith GHSA reporting path, response timeline, and attack-surface scopeSECURITY.mdfromREADME.md; update CI section in READMETest plan
ruff check .passes locallypip-audit -r requirements.txtpasses locallypytest -q,mypy, andnpm testpass locallyubuntu-latestandwindows-latestNotes
pip-auditscans productionrequirements.txtonly (Flask + transitive deps)masteronly (0.1.0.dev0)Summary by CodeRabbit
New Features
Chores
Documentation
Tests