Skip to main content
Neurosymbolic verification for your CI/CD pipeline
QWED Security is a Verified Publisher on GitHub Marketplace. Install the GitHub App to auto-verify every PR with deterministic math, logic, and security checks β€” no workflow file needed. See the GitHub App docs for details.

What is QWED?

QWED combines Neural Networks (LLMs) with Symbolic Reasoning (SymPy, Z3) to provide deterministic verification of AI outputs. Use cases:
  • βœ… Verify mathematical calculations in PRs
  • βœ… Check logical reasoning in documentation
  • βœ… Detect unsafe code patterns
  • βœ… Validate LLM outputs before deployment

Quick start

Add this to your .github/workflows/verify.yml:
name: Verify with QWED

on: [push, pull_request]

jobs:
  verify:
    runs-on: ubuntu-latest
    steps:
      - name: Verify Calculation
        uses: QWED-AI/qwed-verification@v5.0.0
        with:
          api_key: ${{ secrets.QWED_API_KEY }}
          action: verify
          engine: math
          query: "x**2 + 2*x + 1 = (x+1)**2"

Extension GitHub Actions

Use these extension-specific actions when you want domain-focused checks in your pipeline.
IconActionDescription
πŸ’°QWED Finance GuardVerify financial calculations and compliance signals before merging.
βš–οΈQWED Legal VerificationValidate legal reasoning, deadlines, citations, and clause consistency.
🧾QWED Protocol VerificationVerify protocol-level logic and deterministic rule conformance.
πŸ›’QWED Commerce AuditorAudit checkout math, pricing, and transaction integrity in commerce flows.

Inputs

InputDescriptionRequiredDefault
api_keyQWED API key (optional for local mode)No-
actionAction type: verify, scan-secrets, scan-code, verify-shellNoverify
providerLLM provider (openai, anthropic, gemini)No-
modelModel name (e.g., gpt-4o, claude-sonnet-4-20250514)No-
mask_piiMask PII in inputs and outputsNofalse
queryThe user query (e.g., β€œDerivative of x^2”). Required for math and logic engines.Conditional-
llm_outputThe LLM output to verify. Required for the code engine.Conditional-
engineVerification engine: math, logic, code, sql, shellNomath
pathsGlob patterns for files to scan (e.g., **/*.py,**/*.env)No.
output_formatOutput format: text, json, sarifNotext
fail_on_findingsFail the action if security issues are foundNotrue
Each engine requires different inputs:
  • math β€” requires query (passed as the expression to verify)
  • logic β€” requires query
  • code β€” requires llm_output (passed as the code to analyze)

Provider and model selection

New in v5.0.0
You can now specify which LLM provider and model the action uses. When you pass api_key, QWED automatically maps it to the correct provider-specific environment variable (OPENAI_API_KEY, ANTHROPIC_API_KEY, or GOOGLE_API_KEY) based on your provider selection.
- name: Verify with Claude
  uses: QWED-AI/qwed-verification@v5.0.0
  with:
    api_key: ${{ secrets.ANTHROPIC_API_KEY }}
    provider: anthropic
    model: claude-sonnet-4-20250514
    action: verify
    engine: math
    query: "sqrt(144) = 12"

PII masking

Set mask_pii: "true" to automatically redact personally identifiable information (email addresses, phone numbers, SSNs) from inputs and outputs before they reach the LLM.
- name: Verify with PII masking
  uses: QWED-AI/qwed-verification@v5.0.0
  with:
    api_key: ${{ secrets.QWED_API_KEY }}
    mask_pii: "true"
    action: verify
    engine: logic
    query: "User john@example.com claims order total is correct"

Outputs

OutputDescription
verifiedtrue if verification passed or no issues found
explanationDetailed proof or error explanation
findings_countNumber of security issues found (for scan modes)
badge_urlURL for QWED verified badge
sarif_filePath to SARIF output file (if output_format=sarif)

Examples

Verify math in PRs

- name: Check Math
  uses: QWED-AI/qwed-verification@v5.0.0
  with:
    api_key: ${{ secrets.QWED_API_KEY }}
    action: verify
    engine: math
    query: "2**10 = 1024"

Verify logic

- name: Check Logic
  uses: QWED-AI/qwed-verification@v5.0.0
  with:
    api_key: ${{ secrets.QWED_API_KEY }}
    action: verify
    engine: logic
    query: "(AND (GT x 5) (LT x 10))"

Check code security

- name: Security Check
  uses: QWED-AI/qwed-verification@v5.0.0
  with:
    api_key: ${{ secrets.QWED_API_KEY }}
    action: verify
    engine: code
    llm_output: "eval(user_input)"

Scan files with SARIF output

- name: Scan Code
  uses: QWED-AI/qwed-verification@v5.0.0
  with:
    api_key: ${{ secrets.QWED_API_KEY }}
    action: scan-code
    paths: "**/*.py"
    output_format: sarif
    fail_on_findings: "true"

Privacy & Security

  • πŸ”’ PII Masking: Automatically mask sensitive data (emails, SSNs, credit cards)
  • 🏠 Local Option: Use local LLMs (Ollama) for zero cloud exposure
  • πŸ” API Keys: Use GitHub Secrets for secure credential management
  • βœ… Open Source: Full transparency, no black boxes

How It Works

Your Query
    ↓
LLM Response (GPT-4, Claude, etc.)
    ↓
Symbolic Verification (SymPy, Z3, AST)
    ↓
βœ… Deterministic Proof or ❌ Verification Failure
Example:
  • Query: β€œWhat is the derivative of x^2?”
  • LLM says: β€œ2x”
  • SymPy computes: diff(x**2, x) = 2*x
  • QWED: βœ… MATCH! Verified with 100% confidence

Requirements

API Keys (choose one):
  • OpenAI: OPENAI_API_KEY
  • Anthropic: ANTHROPIC_API_KEY
  • Google: GOOGLE_API_KEY
Or use local LLMs (Ollama) for free!

Documentation

Support

License

Apache 2.0 - See LICENSE
Made with πŸ’œ by QWED-AI