Skip to content

ci: protect dependency installs with Socket Firewall - #236

Open
peakematt wants to merge 2 commits into
mainfrom
sfw/cli-ci-protection
Open

ci: protect dependency installs with Socket Firewall#236
peakematt wants to merge 2 commits into
mainfrom
sfw/cli-ci-protection

Conversation

@peakematt

@peakematt peakematt commented Sep 8, 2026

Copy link
Copy Markdown

Dependency installs in the public pull request, push, scheduled Socket scan, and release paths currently run directly against the public JavaScript registry. This change routes those installs through Socket Firewall with the pinned setup action and keeps external fork pull requests low privilege with fallback enabled only for the ordinary lint and test jobs.

The release workflow keeps its current reusable workflow call and secrets: inherit behavior. It tears down Socket Firewall after release-build dependency installation and after the local npm distribution smoke so artifact upload, npm trusted publishing, and Homebrew publishing keep their existing network and credential behavior. The test job also restores public registry access before the existing Bun binary build, because Bun downloads the compile runtime outside npm-compatible package manager configuration, then re-enables Socket Firewall for the local npm distribution smoke.

The normal bun install, npm install -g socket, npx workos, npm install -g workos, and publish commands are otherwise unchanged. I verified the workflow YAML parses, actionlint accepts the changed workflows, and the Socket Firewall conformance helper only reports expected heuristic warnings for the unchanged local registry smoke and publish steps. Pull request checks cover the Linux lint and test jobs.

@peakematt
peakematt marked this pull request as ready for review September 8, 2026 20:55

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge, with firewall setup and teardown placed consistently around the dependency-install operations it intends to protect.

Summary

  • Adds low-privilege external-fork fallback to ordinary lint and test jobs.
  • Tears down firewall routing before Bun compilation and release publishing operations.
  • Re-enables firewall protection for local npm distribution smoke tests.
  • Restricts applicable workflow GITHUB_TOKEN permissions to read-only repository contents.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Checkout source] --> B[Setup Socket Firewall]
    B --> C[Install dependencies]
    C --> D{Workflow path}
    D -->|Lint or scan| E[Run protected checks]
    D -->|Test or release build| F[Teardown firewall]
    F --> G[Test and compile binaries]
    G --> H[Setup firewall again]
    H --> I[Local npm distribution smoke]
    I --> J[Teardown in release workflow]
    J --> K[Publish artifacts and packages]
Loading

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant