Skip to content

Tighten dependency and CI security - #9

Merged
om-surushe merged 1 commit into
mainfrom
fix/security-hardening
Aug 2, 2026
Merged

Tighten dependency and CI security#9
om-surushe merged 1 commit into
mainfrom
fix/security-hardening

Conversation

@om-surushe

@om-surushe om-surushe commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • override the vulnerable transitive Valibot release
  • pin all third-party GitHub Actions to immutable commits
  • enforce full-history Gitleaks scanning
  • bound every CI job and each Docker build with hard timeouts

Verified without Docker

  • bun audit: 0 vulnerabilities
  • database client generation
  • Bun tests, typecheck, and workspace builds
  • frontend install, typecheck, and build
  • Python rollback tests

Docker validation is delegated to bounded CI: each image build has a 3-minute limit and the job has an 8-minute limit.

Summary by CodeRabbit

  • Security

    • Added automated scanning to help detect accidentally committed secrets.
    • Pinned build tooling for more consistent and trustworthy releases.
  • Reliability

    • Added time limits to automated checks and container builds, helping prevent stalled release processes.
  • Chores

    • Updated validation support to improve consistency across application workflows.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@om-surushe, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 56 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a5d12816-c43e-4d5f-a3b7-6accd16c22a4

📥 Commits

Reviewing files that changed from the base of the PR and between ef1df6e and d6d6d7d.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • package.json
📝 Walkthrough

Walkthrough

Changes

CI hardening

Layer / File(s) Summary
Workflow scanning and execution controls
.github/workflows/ci.yml
The workflow adds a full-history Gitleaks scan and timeout limits for CI jobs and container builds.
Pinned workflow actions
.github/workflows/ci.yml
The Bun, frontend/container, and Python rollback jobs use commit-pinned GitHub Actions references.

Dependency override

Layer / File(s) Summary
Root dependency override
package.json
The root configuration pins valibot to version 1.4.2 and preserves the existing find-my-way override.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the dependency and CI security hardening changes in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/security-hardening

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@om-surushe
om-surushe force-pushed the fix/security-hardening branch from ef1df6e to d6d6d7d Compare August 2, 2026 16:31
@om-surushe
om-surushe merged commit c80016e into main Aug 2, 2026
4 of 5 checks passed
@om-surushe
om-surushe deleted the fix/security-hardening branch August 2, 2026 16:33

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/ci.yml:
- Line 60: Disable checkout credential persistence for all four checkout steps
in .github/workflows/ci.yml at lines 20-22, 60-60, 100-100, and 132-132 by
setting persist-credentials to false; no authenticated Git access exception is
indicated.
🪄 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: 81cbf705-b3b8-4f71-8794-d100d27f2e15

📥 Commits

Reviewing files that changed from the base of the PR and between 4715fb6 and ef1df6e.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • package.json

Comment thread .github/workflows/ci.yml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow excerpt =="
nl -ba .github/workflows/ci.yml | sed -n '1,170p'

echo
echo "== checkout steps with context =="
python3 - <<'PY'
from pathlib import Path
p=Path('.github/workflows/ci.yml')
for i,line in enumerate(p.read_text().splitlines(),1):
    if 'uses: actions/checkout' in line or 'persist-credentials' in line or 'pnpm' in line or 'bun' in line or 'python' in line or 'run:' in line:
        lo=max(1,i-3); hi=min(p.read_text().splitlines().__len__(),i+5)
        lines=p.read_text().splitlines()
        print(f"\n--- around .github/workflows/ci.yml:{i} ---")
        for n in range(lo,hi+1):
            print(f"{n}: {lines[n-1]}")
PY

Repository: om-surushe/SendPlug

Length of output: 220


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow excerpt =="
awk '{printf "%6d: %s\n", NR, $0}' .github/workflows/ci.yml | sed -n '1,170p'

echo
echo "== checkout steps with context =="
python3 - <<'PY'
from pathlib import Path
p=Path('.github/workflows/ci.yml')
lines=p.read_text().splitlines()
for i,line in enumerate(lines,1):
    if 'uses: actions/checkout' in line or 'persist-credentials' in line or 'pnpm' in line or 'bun' in line or 'python' in line or 'run:' in line:
        lo=max(1,i-3); hi=min(len(lines),i+5)
        print(f"\n--- around .github/workflows/ci.yml:{i} ---")
        for n in range(lo,hi+1):
            print(f"{n}: {lines[n-1]}")
PY

Repository: om-surushe/SendPlug

Length of output: 19230


🌐 Web query:

actions/checkout v6 persist-credentials default true README

💡 Result:

In actions/checkout v6, the persist-credentials input defaults to true [1]. This setting configures the action to persist the authentication token or SSH key in the local git configuration, enabling subsequent steps in your workflow to execute authenticated git commands [2][3]. As of v6, the implementation of this setting includes security improvements: the credentials are no longer stored directly in the.git/config file, but instead in a separate file located within the $RUNNER_TEMP directory [2][4]. This change is designed to prevent sensitive credentials from being accidentally leaked through mechanisms like artifact uploads [5]. If you wish to prevent the persistence of these credentials, you can explicitly set the input to false in your workflow file [2]: - uses: actions/checkout@v6 with: persist-credentials: false

Citations:


Disable checkout credential persistence in all four jobs.

These checkout steps use actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5, where the persist-credentials input defaults to true. Subsequent repository-controlled run commands can read the persisted GitHub token in the job environment. Add persist-credentials: false to every checkout step unless authenticated Git access is required for that step.

🧰 Tools
🪛 zizmor (1.28.0)

[warning] 60-60: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

📍 Affects 1 file
  • .github/workflows/ci.yml#L60-L60 (this comment)
  • .github/workflows/ci.yml#L20-L22
  • .github/workflows/ci.yml#L100-L100
  • .github/workflows/ci.yml#L132-L132
🤖 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 at line 60, Disable checkout credential persistence
for all four checkout steps in .github/workflows/ci.yml at lines 20-22, 60-60,
100-100, and 132-132 by setting persist-credentials to false; no authenticated
Git access exception is indicated.

Source: Linters/SAST tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant