Repository navigation
GitHub Action
RegRails ships a reusable composite GitHub Action that drops the deterministic FERPA + Title IV guardrail in front of an automated workflow. In one uses: line it installs regrails from PyPI, consults the guardrail, fails the job on a block / escalate_human_review outcome, and writes a SARIF report — so an automated "advisor" pipeline cannot ship a prohibited disclosure or a high-stakes aid determination without a human.
The action lives at docs/action/ in the repo and is referenced as Polycentric-Labs/regrails/docs/action@<ref>.
Pages: CLI Reference · Web Platform · MCP Server · Exports — OSCAL and SARIF
It is a composite action with three steps:
-
Install regrails —
python -m pip install "regrails==<version>"(the engine is offline; no API key). -
Consult the guardrail — runs
regrails decidetwice: once to JSON (to readoutcome+risk_tierinto step outputs), once with--format sarifto write the SARIF report. -
Enforce the gate — if the decision
outcomeis in thefail-onlist, it emits a::error::annotation and exits non-zero, failing the job.
Because the engine is deterministic and offline, the gate is reproducible and needs no secrets.
| Input | Required | Default | Meaning |
|---|---|---|---|
query |
yes | — | The user-facing query the AI workflow is about to act on. |
topic |
no | unknown |
disclosure | aid_status | other | unknown. |
data |
no | "" |
Comma-separated data_requested items (e.g. gpa,transcript). |
extra-args |
no | "" |
Extra flags passed verbatim to regrails decide (e.g. --aid-determination --in-default). |
fail-on |
no | block,escalate_human_review |
Comma-separated outcomes that fail the job. |
version |
no | 0.4.0 |
regrails version to install from PyPI. |
sarif-path |
no | regrails.sarif |
Where to write the SARIF report. |
| Output | Meaning |
|---|---|
outcome |
The GuardrailDecision outcome. |
risk-tier |
The decision's risk tier. |
Add one step to a workflow in your own repo:
- name: RegRails gate
uses: Polycentric-Labs/regrails/docs/action@v0.4.0
with:
query: "I defaulted on a loan a while back. Am I still eligible for aid this year?"
topic: "aid_status"
extra-args: "--aid-determination --in-default"This high-stakes Title IV query returns escalate_human_review, which is in the default fail-on list — so the step fails the job, and the automated pipeline cannot proceed without a human.
From docs/action/workflow-example.yml — copy it into .github/workflows/ in your own repo:
name: example — RegRails guardrail gate
on: [workflow_dispatch]
permissions:
contents: read
jobs:
gate:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v5
with:
python-version: "3.12"
# A high-stakes Title IV query: a student in loan default asking about
# eligibility. RegRails returns escalate_human_review -> this FAILS the job,
# so an automated "advisor" pipeline cannot ship the answer without a human.
- name: RegRails gate
uses: Polycentric-Labs/regrails/docs/action@v0.4.0
with:
query: "I defaulted on a loan a while back. Am I still eligible for aid this year?"
topic: "aid_status"
extra-args: "--aid-determination --in-default"
# If the gate passes, upload the SARIF so it renders in code-scanning.
- name: Upload SARIF
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: regrails.sarifThe if: always() upload ensures the SARIF renders in code-scanning whether the gate passed or failed, so each blocked/escalated decision shows up as a finding (with its CFR citation and risk tier) just like a code vulnerability. See Exports — OSCAL and SARIF for the SARIF shape.
-
Pin the ref to a release tag (
@v0.4.0) so the action's behavior, the installedregrailsversion default, and the documenteduses:path stay in lockstep. To gate against a different package version, also set theversioninput. -
Tune
fail-onto your tolerance — e.g. addescalate_consentto also fail on consent-required disclosures, or narrow it if you only want to hard-stop onblock. - The action requires only
contents: read; the SARIF upload step usesgithub/codeql-action/upload-sarif(which needssecurity-events: writeif you scope permissions per job).
RegRails is a proof-of-concept, not a compliance product and not legal advice. The Action gates a pipeline on the deterministic engine; it does not certify compliance. Synthetic data only.