Repository navigation
ci: add GitHub Actions workflows and Dependabot config - #38
Conversation
- Add CI workflow with frontend (Bun: lint, typecheck, build) and backend (Go test, vet) jobs - Add security workflow with weekly bun audit for high/critical vulnerabilities - Add Dependabot config for Go modules, npm (Bun), and GitHub Actions
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
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 (3)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds Dependabot schedules, staging-based CI for frontend and backend checks, and scheduled or staging-triggered frontend dependency auditing. ChangesRepository automation
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Actionable comments posted: 4
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
71-74: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winAdd
cache-dependency-pathfor Go module caching.
actions/setup-go@v5enables caching by default but looks forgo.sumin the repository root. Since the Go module lives inapps/backend/, the cache key won't match and modules are re-downloaded on every run.⚡ Suggested fix
- name: Setup Go uses: actions/setup-go@v5 with: go-version-file: apps/backend/go.mod + cache-dependency-path: apps/backend/go.sum🤖 Prompt for 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. In @.github/workflows/ci.yml around lines 71 - 74, Update the “Setup Go” actions/setup-go@v5 step to set cache-dependency-path to the backend module’s go.sum file under apps/backend, so Go module caching uses the correct dependency manifest.
🤖 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/dependabot.yml:
- Around line 11-16: Update the Dependabot package-ecosystem for the
apps/frontend entry from npm to bun, keeping its directory, schedule, and labels
unchanged so Dependabot targets the Bun lockfile used by CI.
In @.github/workflows/ci.yml:
- Around line 11-13: Add a top-level permissions block granting only contents:
read in .github/workflows/ci.yml between the concurrency block and jobs, and in
.github/workflows/security.yml between the on block and jobs. Ensure both
workflows use the restricted read-only GITHUB_TOKEN permissions.
- Around line 22-23: Add with.persist-credentials: false to the checkout steps
at .github/workflows/ci.yml lines 22-23 and 68-69, and
.github/workflows/security.yml lines 20-21; update all three actions/checkout@v4
usages without changing other workflow behavior.
In @.github/workflows/security.yml:
- Around line 34-35: Update the “Audit dependencies” workflow step to pass a
single supported severity value to bun audit, using --audit-level=high to
include high and critical findings.
---
Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 71-74: Update the “Setup Go” actions/setup-go@v5 step to set
cache-dependency-path to the backend module’s go.sum file under apps/backend, so
Go module caching uses the correct dependency manifest.
🪄 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
Run ID: 6359cfb9-0724-4388-b5df-ac158c1bf956
📒 Files selected for processing (3)
.github/dependabot.yml.github/workflows/ci.yml.github/workflows/security.yml
| cancel-in-progress: true | ||
|
|
||
| jobs: |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Missing permissions block in both workflow files. Neither workflow declares a top-level permissions block, so the GITHUB_TOKEN uses default repository permissions—potentially including write scopes unnecessary for read-only CI and audit jobs. Add permissions: contents: read to both files.
.github/workflows/ci.yml#L11-L13: insertpermissions: contents: readbetween theconcurrencyblock andjobs..github/workflows/security.yml#L9-L11: insertpermissions: contents: readbetween theonblock andjobs.
📍 Affects 2 files
.github/workflows/ci.yml#L11-L13(this comment).github/workflows/security.yml#L9-L11
🤖 Prompt for 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.
In @.github/workflows/ci.yml around lines 11 - 13, Add a top-level permissions
block granting only contents: read in .github/workflows/ci.yml between the
concurrency block and jobs, and in .github/workflows/security.yml between the on
block and jobs. Ensure both workflows use the restricted read-only GITHUB_TOKEN
permissions.
Source: Linters/SAST tools
| - name: Checkout repository | ||
| uses: actions/checkout@v4 |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
persist-credentials: false missing on all three checkout steps. actions/checkout@v4 persists the GITHUB_TOKEN in .git/config by default. All three checkout steps across both workflow files omit persist-credentials: false, leaving the token accessible to untrusted code in subsequent steps (bun install postinstall scripts, go test code). Add with: persist-credentials: false to each checkout step.
.github/workflows/ci.yml#L22-L23: addpersist-credentials: falseto the frontend job's checkout..github/workflows/ci.yml#L68-L69: addpersist-credentials: falseto the backend job's checkout..github/workflows/security.yml#L20-L21: addpersist-credentials: falseto the audit job's checkout.
🧰 Tools
🪛 zizmor (1.26.1)
[warning] 22-23: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
📍 Affects 2 files
.github/workflows/ci.yml#L22-L23(this comment).github/workflows/ci.yml#L68-L69.github/workflows/security.yml#L20-L21
🤖 Prompt for 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.
In @.github/workflows/ci.yml around lines 22 - 23, Add with.persist-credentials:
false to the checkout steps at .github/workflows/ci.yml lines 22-23 and 68-69,
and .github/workflows/security.yml lines 20-21; update all three
actions/checkout@v4 usages without changing other workflow behavior.
Source: Linters/SAST tools
| - name: Audit dependencies | ||
| run: bun audit --audit-level=high,critical |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🌐 Web query:
Does bun auditsupport the--audit-levelflag with comma-separated severity values likehigh,critical? What is the correct syntax for filtering by severity in the current version of Bun?
💡 Result:
No, the bun audit command does not support comma-separated severity values for the --audit-level flag [1][2][3]. The --audit-level flag accepts a single severity value and filters for vulnerabilities at that level or higher [1][3]. The accepted severity levels, ordered from lowest to highest, are: low, moderate, high, and critical [3][4]. Correct usage involves specifying only one of these levels [2][3]. For example: bun audit --audit-level=high This command will include vulnerabilities marked as high or critical, but exclude those marked as low or moderate [1][3]. As of recent updates to Bun, this filter is applied to both standard output and JSON output [5][6]. Top results: 1 2 3 6 8
Citations:
- 1: https://bun.com/docs/pm/cli/audit
- 2: https://bun.sh/docs/pm/cli/audit
- 3: https://oven-sh-bun.mintlify.app/pm/audit
- 4: https://github.com/oven-sh/bun/blob/88417471/src/install/PackageManager/CommandLineArguments.rs
- 5: --json flag overrides --audit-level in bun audit oven-sh/bun#31009
- 6: audit: apply --audit-level and --ignore filters to --json output oven-sh/bun#31013
Use a single bun audit severity level
bun audit --audit-level accepts one value (low, moderate, high, or critical), not a comma-separated list. If the goal is to include high and critical findings, use bun audit --audit-level=high.
🤖 Prompt for 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.
In @.github/workflows/security.yml around lines 34 - 35, Update the “Audit
dependencies” workflow step to pass a single supported severity value to bun
audit, using --audit-level=high to include high and critical findings.
- Change package-ecosystem from npm to bun in Dependabot config for frontend - Modify security workflow to run bun audit without specifying audit levels
Changes
bun auditfor high/critical vulnerabilitiesSummary by CodeRabbit