The Problem

No CI tool checks native binaries. Your pipeline scans JavaScript source code, runs SAST tools, and checks known CVE databases — but the compiled .node, .so, and .dylib files inside your dependencies are completely invisible. A compromised build pipeline could inject a backdoor into a binary, and your CI would give it a green checkmark.

The Solution

The BinShield GitHub Action adds binary-level scanning to every pull request. It decompiles native artifacts, classifies their behavior with AI, and enforces configurable risk thresholds — all in a single YAML step.

How It Works

Three steps to binary-aware CI
  1. Add the Action — Drop the BinShield step into your GitHub Actions workflow. It runs after npm install and before your test suite.
  2. Set your policy — Configure a risk threshold (e.g., block PRs with any binary scoring above 60). Customize which behavior families trigger failures.
  3. Review and merge — BinShield posts a PR comment with a summary of every native binary, its risk score, and detected behaviors. Safe PRs pass automatically.

GitHub Action Configuration

Example workflow step
# .github/workflows/binshield.yml
name: BinShield Binary Scan

on:
  pull_request:
    branches: [main]

jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm ci

      - name: BinShield Scan
        uses: ashlrai/binshield-action@v1
        with:
          api-key: ${{ secrets.BINSHIELD_API_KEY }}
          risk-threshold: 60
          fail-on-high: true
          comment-on-pr: true

Example PR Comment

What your team sees on every pull request

BinShield Scan Results

Scanned 3 packages with native binaries. 1 flagged.

PackageRiskBehaviors
bcrypt@6.0.052 MEDIUMcrypto, filesystem
sharp@0.33.228 LOWimage processing
usb@2.14.068 HIGHnetwork, process spawn

Blocked: usb@2.14.0 exceeds risk threshold of 60.