ci: GitHub Actions — test suites + SARIF/dashboard smoke - #9
Conversation
The repo had no CI (pre-merge checks were empty). OwnAudit is pure-Python tooling — the .NET/WPF audit of STS runs on a Windows stand, not here — so CI runs the build-free suites and a smoke of the report/dashboard generation. No analyzers, no .NET; fast and deterministic. - test job: fix-arm (ai_fix/own_fix/orchestrate) + report (sarif/baseline) suites, then re-run under -O to catch assert-stripping regressions. - audit-report job: export GitHub-friendly SARIF + metrics/report, smoke-build the dashboard, upload report/out as an artifact. - A commented recipe shows how to upload the full SARIF to code scanning when running against the STS repo itself (paths point at the external tree here). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LLHz4cevQyXHKZnjzCqhoa
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a GitHub Actions CI workflow for pushes to ChangesCI workflow
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Line 24: Disable credential persistence on both actions/checkout steps in the
CI workflow so the checkout token is not left available before report/out is
uploaded. Update each checkout invocation to explicitly set persist-credentials
to false, using the existing actions/checkout usage in the workflow as the place
to make the change.
- Around line 38-44: The optimized CI rerun omits fix/tests/test_orchestrate.py,
so assert-stripping regressions in that suite are not covered. Update the -O
test step in the workflow to include test_orchestrate alongside the existing
fix/tests/test_ai_fix.py and fix/tests/test_own_fix.py reruns, using the same
PYTHONPATH=fix pattern so the optimized pass matches the normal suite coverage.
- Around line 24-25: The workflow is using mutable GitHub Actions tags, so
update the action references in the CI workflow to pinned commit SHAs instead of
version tags. Replace the uses of actions/checkout, actions/setup-python, and
actions/upload-artifact in the workflow with their full commit SHA references so
the CI definition stays immutable and reviewable.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 689a20cb-9c31-47bd-b1ae-eec316eaeb44
📒 Files selected for processing (1)
.github/workflows/ci.yml
… -O parity Addresses CodeRabbit/zizmor on the new workflow: - pin actions/checkout, actions/setup-python, actions/upload-artifact to commit SHAs (with # vN comments) so the CI definition is immutable (unpinned-uses). - persist-credentials: false on both checkouts so the checkout token can't be copied into the uploaded report/out artifact (artipacked). - add fix/tests/test_orchestrate.py to the -O rerun so the optimized pass matches the normal suite coverage. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LLHz4cevQyXHKZnjzCqhoa
Первый CI в репозитории
До сих пор в репо не было ни одного workflow (оттого pre-merge checks были пустыми). OwnAudit — чистый Python (сам .NET/WPF-аудит STS гоняется на Windows-стенде, не тут), поэтому CI запускает build-free сьюты + смоук генерации отчётов. Без анализаторов, без .NET — быстро и детерминированно.
.github/workflows/ci.ymlТриггеры:
pull_request+pushвmain; concurrency-отмена устаревших ранов;permissions: contents: read.job
testtest_ai_fix+test_own_fix+test_orchestrate;test_sarif+test_baseline;-O— ловит регрессии от вырезанияassert(все сьюты-O-safe by design).job
audit-report(needs test)metrics.json/report.md(report.cli --min-level warning);build_dashboard.py) — у неё нет юнит-тестов, это ловит ошибки Python/JS-шаблона;report/out/артефактом.В комментарии — рецепт загрузки полного SARIF в Security-вкладку (code scanning), когда гоняешь против самого STS-репо (тут пути находок указывают на внешнее дерево, поэтому пропущено).
Эффект
Этот PR сам себя проверит — на нём впервые появятся реальные зелёные чеки
testиaudit-report. Суммарно по веткам #7/#8 сейчас зелёные: 9/9 ai + 25/25 own + 7/7 wrapper + 14/14 sarif + 8/8 baseline.🤖 Generated with Claude Code
Generated by Claude Code
Summary by CodeRabbit