Extract checks and security scan from run-ci-cd.yaml #4623
Conversation
Summary by CodeRabbit
WalkthroughThis PR extracts code quality checks from the main CI/CD workflow into a new reusable workflow. Four check jobs (pre-commit, frontend formatting/linting, security scanning, and spellcheck) are consolidated into ChangesWorkflow Refactoring: Extract Checks
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
3 issues found across 2 files
Confidence score: 2/5
- High-confidence CI regressions are likely:
run-checksin.github/workflows/run-ci-cd.yamllacks job-levelpermissions, which can deny requiredcontents: readin called jobs under restrictive inherited permissions. .github/workflows/run-checks.yamlappears to runrun_install: truefrom repo root despite no rootpackage.json, creating a concrete risk that frontend checks fail during install/setup.- The Trivy hardcoding note in
.github/workflows/run-checks.yamlis lower severity and mostly maintainability/policy consistency, but it adds configuration drift risk over time. - Pay close attention to
.github/workflows/run-ci-cd.yamland.github/workflows/run-checks.yaml- permission inheritance and install working-directory behavior may break CI execution.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".github/workflows/run-ci-cd.yaml">
<violation number="1" location=".github/workflows/run-ci-cd.yaml:30">
P1: The reusable `run-checks` caller job is missing a job-level `permissions` block, so called jobs that require `contents: read` can be denied when inherited from this workflow’s restrictive permissions.</violation>
</file>
<file name=".github/workflows/run-checks.yaml">
<violation number="1" location=".github/workflows/run-checks.yaml:72">
P1: `run_install: true` is executed from the default repo root, but this repo has no root `package.json`; this can break the frontend check job. Set `run_install.cwd` to `frontend` (or disable auto-install and install explicitly in `frontend`).</violation>
<violation number="2" location=".github/workflows/run-checks.yaml:144">
P2: Avoid hardcoding Trivy scanner selection in the workflow; use centralized Make/Trivy configuration so scanner policy is managed in one place.
(Based on your team's feedback about keeping CI/security scanner behavior configuration-driven and centralized.) [FEEDBACK_USED]</violation>
</file>
Tip: cubic used a learning from your PR history. Let your coding agent read cubic learnings directly with the cubic MCP.
|
The security check is failing because of vulnerable packages @arkid15r |
run-ci-cd.yaml run-ci-cd.yaml
There was a problem hiding this comment.
Warning
CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.
Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.
Actionable comments posted: 1
🤖 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/run-ci-cd.yaml:
- Around line 28-32: The job "run-code-quality-checks" declares a redundant
permissions block that doesn't apply when invoking a reusable workflow via the
uses: key; remove the permissions: contents: read lines from the
run-code-quality-checks job so the call only contains name and uses (i.e., keep
run-code-quality-checks and uses:
./.github/workflows/run-code-quality-checks.yaml but delete the permissions
section).
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 4244989f-df93-4252-bd8a-0d3a607eaf33
📒 Files selected for processing (2)
.github/workflows/run-ci-cd.yaml.github/workflows/run-code-quality-checks.yaml
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feature/ci-cd-optimization #4623 +/- ##
===========================================================
Coverage 98.92% 98.92%
===========================================================
Files 527 527
Lines 16956 16956
Branches 2360 2360
===========================================================
Hits 16774 16774
Misses 97 97
Partials 85 85
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|



Proposed change
Resolves #4620
Checklist
make check-testlocally: all warnings addressed, tests passed