GitHub Actions
Use
rorix-io/rorix-scan-action@v1in your workflow. Pin a full commit SHA if your repository requires immutable third-party Actions.
The official Rorix GitHub Action scans NuGet or npm dependencies as part of your CI/CD pipeline. Public v1 installs Rorix.Cli 0.1.7. Its release smoke tests cover clean scans, blocking vulnerability and license policies, and missing manifests.
Repositories connected through the Rorix GitHub App need no secret: see Keyless CI. Otherwise use a dashboard API key with API read scope in RORIX_API_KEY. Calibrate a policy against your scan results before making the Action a required check.
Keyless CI
When the repository is connected through the Rorix GitHub App, leave out api-key and give the job id-token: write. The Action exchanges the job's GitHub OIDC token for a scan-only Rorix credential that expires within 15 minutes, and the policy gate applies the project's active license exceptions.
jobs:
rorix:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: rorix-io/rorix-scan-action@v1
with:
command: policy
policy-file: .rorix.ymlKeyless CI runs on pushes to the default branch, pull requests, schedules and manual runs. Pull requests from forks, workflows defined outside the repository, and repositories whose GitHub App installation is suspended are refused; use an API key there. The dashboard's CI setup writes a keyless workflow automatically for connected repositories, with every action pinned to a full commit SHA.
id-token: write lets any step in the job request a GitHub OIDC token, for any audience. Keep the job to the actions it needs and pin each one to a full commit SHA, so a moved tag cannot run new code while that permission is granted.
NuGet transitive dependencies
Action v1 discovers packages.lock.json when scanning a directory, project, or solution. Generate and review a lockfile to include resolved transitive dependencies.
For npm and pnpm, the Action reads package-lock.json, npm-shrinkwrap.json, and pnpm-lock.yaml. The CLI warns when a package.json has only version ranges and no lockfile. A blocking scan fails when this happens.
If you pin an older Action commit or CLI 0.1.3, scan each lockfile explicitly:
- name: Check resolved NuGet dependencies
uses: rorix-io/rorix-scan-action@v1
with:
api-key: ${{ secrets.RORIX_API_KEY }}
command: policy
policy-file: .rorix.yml
path: path/to/packages.lock.jsonKeep the lockfile current and validate it with dotnet restore --locked-mode. The scan API currently accepts at most 200 packages per file; a larger graph fails rather than receiving a complete result.
After both integrations are public, the Rorix GitHub App will be the default for repository-level protection. The Action is intended for teams that need workflow-owned scanning, custom runners, explicit SARIF upload, or branch-specific CI policy.
Recommended Rollout
- Run one scan locally or from the dashboard so you understand the current baseline
- Create a
.rorix.ymlpolicy that reflects what should actually block a build - Start with advisory scans if the team is still calibrating noise
- Turn on policy gating after the baseline looks right
Basic Usage
name: Security Scan
on: [push, pull_request]
jobs:
rorix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Rorix Scan
uses: rorix-io/rorix-scan-action@v1
with:
api-key: ${{ secrets.RORIX_API_KEY }}With Policy Enforcement
Use this example after reviewing the policy against your project baseline.
name: Security Scan
on: [push, pull_request]
jobs:
rorix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Rorix Policy Check
uses: rorix-io/rorix-scan-action@v1
with:
api-key: ${{ secrets.RORIX_API_KEY }}
command: policy
policy-file: .rorix.ymlThis configuration makes pull requests fail on policy violations. With command: scan, the action always passes --exit-code, so any vulnerability fails the step; add continue-on-error: true to a scan step that should only report.
SARIF Upload to GitHub Security Tab
name: Security Scan
on: [push, pull_request]
jobs:
rorix:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- uses: actions/checkout@v4
- name: Rorix Scan
uses: rorix-io/rorix-scan-action@v1
id: rorix
with:
api-key: ${{ secrets.RORIX_API_KEY }}
format: sarif
- name: Upload SARIF
if: ${{ always() && steps.rorix.outputs.sarif-file != '' }}
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: ${{ steps.rorix.outputs.sarif-file }}The upload step runs when a completed scan finds blocking vulnerabilities or policy violations, so GitHub receives the SARIF results while the job still fails. It skips upload when the CLI could not produce a SARIF file.
Inputs
| Input | Required | Default | Description |
| --- | --- | --- | --- |
| api-key | No | — | Your Rorix API key (use a repository secret). Leave out for keyless CI |
| command | No | scan | Command to run: scan, sbom, or policy |
| format | No | table | Output format: table, json, or sarif |
| policy-file | No | — | Path to a .rorix.yml policy file |
| path | No | . | Path to the project or solution file |
| project-id | No | — | Rorix project whose license exceptions apply. Keyless CI sets it automatically |
| fail-on-vulnerabilities | No | true | Set false for advisory scans; scan errors still fail |
| base-url | No | RORIX_BASE_URL, else https://rorix.io | Rorix base URL; its origin is the OIDC audience |
| cli-version | No | 0.1.7 | Pinned Rorix.Cli version to install |
Outputs
| Output | Description |
| --- | --- |
| sarif-file | Path to the generated SARIF file (when format is sarif) |
| exit-code | Exit code returned by the installed CLI |
Setting Up the API Key
- Go to your Rorix dashboard and create an API key with API read scope
- In your GitHub repository, go to Settings then Secrets and variables then Actions
- Click New repository secret
- Name it
RORIX_API_KEYand paste your key