dnyoussef/GuardSpine Code
AI-aware code governance with cryptographically verifiable evidence bundles
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jul 8, 2026
- License
- None
Pinned Snippet
uses: dnyoussef/guardspine-code-action@d0f561f04231bc0a00ba004fcd25df9954ceeb36 # v2.1.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| risk_threshold | Risk tier threshold for blocking (L0-L4). Changes at or above this level require approval. | no | L3 |
| rubric | Policy rubric to evaluate against (soc2, hipaa, pci-dss, or path to custom rubric) | no | default |
| github_token | GitHub token for PR operations | yes | ${{ github.token }} |
| post_comment | Post risk summary as PR comment | no | true |
| generate_bundle | Generate evidence bundle artifact | no | true |
| attestation_key | PEM private key (Ed25519/RSA/EC) to sign evidence bundles for anti-forgery. When set, bundles are cryptographically signed so auditors can verify offline against your trusted public key. Leave empty for unsigned, integrity-only (tamper-evident) bundles. Provide via a GitHub secret. | no | "" |
| attestation_key_id | Overrides the signed bundle signature public_key_id (default: sha256 fingerprint of the DER-encoded public key). Set this to the exact key_id string your verifier has pre-configured for this signing key (e.g. GuardSpine backend GUARDSPINE_TRUSTED_PUBLIC_KEYS), so the signature is looked up verbatim instead of by recomputed fingerprint. Only meaningful when attestation_key is set. | no | "" |
| upload_sarif | Upload findings to GitHub Security tab (SARIF) | no | false |
| fail_on_high_risk | Fail the check if risk exceeds threshold | no | false |
| fail_on_dashboard_sync_error | Fail the run if the evidence bundle cannot be synced and verified to the GuardSpine backend. Default true so a swallowed sync failure cannot ship as a green check. | no | true |
| openai_api_key | OpenAI API key for AI-powered analysis (optional) | no | — |
| anthropic_api_key | Anthropic API key for AI-powered analysis (optional) | no | — |
| openrouter_api_key | OpenRouter API key for AI-powered analysis (optional) - supports 100+ models | no | — |
| openrouter_model | Model to use with OpenRouter (e.g., anthropic/claude-sonnet-4, google/gemini-3) | no | anthropic/claude-sonnet-4.5 |
| ollama_host | Ollama server URL for local/on-prem AI (e.g., http://localhost:11434) | no | — |
| ollama_model | Model to use with Ollama (e.g., llama3.3, codellama, mistral) | no | llama3.3 |
| model_1 | First AI model for L1+ reviews. Format: provider/model or just model name | no | — |
| model_2 | Second AI model for L2+ reviews. Format: provider/model or just model name | no | — |
| model_3 | Third AI model for L3+ reviews. Format: provider/model or just model name | no | — |
| ai_review | Enable AI-powered code review (requires at least one API key) | no | true |
| pii_shield_enabled | Enable PII-Shield preprocessing for AI review input | no | false |
| pii_shield_mode | PII-Shield mode: auto, local, or remote | no | auto |
| pii_shield_endpoint | Optional PII-Shield HTTP endpoint for remote redaction | no | — |
| pii_shield_api_key | API key for PII-Shield endpoint (optional) | no | — |
| pii_shield_timeout | PII-Shield HTTP timeout in seconds | no | 5 |
| pii_shield_fail_closed | Fail workflow if PII-Shield redaction errors occur (recommended: true for production) | no | true |
| pii_shield_salt_fingerprint | Non-secret salt fingerprint for deterministic redaction attestations (sha256:XXXXXXXX) | no | sha256:00000000 |
| pii_safe_regex_list | JSON array of regex patterns that bypass PII-Shield entropy detection (e.g., [{"pattern": "^[a-f0-9]{40,64}$", "name": "SafeGitSHA"}]) | no | [{"pattern": "^[a-f0-9]{40,64}$", "name": "SafeGitSHA"}, {"pattern": "_hash$", "name": "HashFieldSuffix"}] |
| pii_shield_sanitize_comments | Sanitize PR comments with PII-Shield before publishing | no | true |
| pii_shield_sanitize_bundle | Sanitize evidence bundles with PII-Shield before writing artifacts | no | true |
| pii_shield_sanitize_sarif | Sanitize SARIF output with PII-Shield before upload | no | true |
| rubrics_dir | Directory containing rubric YAML files (relative paths allowed) | no | .guardspine/rubrics |
| risk_policy | Path to YAML file defining custom risk patterns/thresholds | no | — |
| bundle_dir | Directory to write evidence bundles (relative to workspace) | no | .guardspine/bundles |
| decision_policy | Decision engine policy (standard, strict, advisory, or path to custom YAML) | no | standard |
| deliberate | Enable deliberation (multi-round cross-checking between AI models) | no | false |
| auto_merge | Auto-merge clean PRs (decision=merge, tier L0-L3). Requires contents:write permission. | no | false |
| auto_merge_method | Merge method: merge, squash, or rebase | no | squash |
| guardspine_api_url | GuardSpine backend URL (e.g., https://app.guardspine.ai/api/v1). Enables dashboard sync and Slack alerts. | no | — |
| guardspine_api_key | GuardSpine service API key for backend authentication | no | — |
Outputs
| name | description |
|---|---|
| risk_tier | Assessed risk tier (L0-L4) |
| risk_drivers | JSON array of top risk drivers |
| bundle_path | Path to generated evidence bundle |
| findings_count | Number of policy findings |
| requires_approval | Whether human approval is required (true/false) |
| models_used | Number of AI models that reviewed the change |
| consensus_risk | Multi-model consensus: approve, request_changes, or comment |
| agreement_score | How much models agreed (0.0-1.0) |
| decision | Decision engine verdict: merge, merge-with-conditions, or block |
| verdict | Stable verdict alias (APPROVE | CONDITIONS | BLOCK) mapped from decision for workflows that gate on outputs.verdict. |
| bundle_id | Evidence bundle identifier (empty string if generate_bundle is false). Stable alias for workflows that reference outputs.bundle_id. |
| merged | Whether PR was auto-merged |
| merge_sha | Merge commit SHA (if merged) |