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:
Extension GitHub Actions
Use these extension-specific actions when you want domain-focused checks in your pipeline.| Icon | Action | Description |
|---|---|---|
| π° | QWED Finance Guard | Verify financial calculations and compliance signals before merging. |
| βοΈ | QWED Legal Verification | Validate legal reasoning, deadlines, citations, and clause consistency. |
| π§Ύ | QWED Protocol Verification | Verify protocol-level logic and deterministic rule conformance. |
| π | QWED Commerce Auditor | Audit checkout math, pricing, and transaction integrity in commerce flows. |
Inputs
| Input | Description | Required | Default |
|---|---|---|---|
api_key | QWED API key (optional for local mode) | No | - |
action | Action type: verify, scan-secrets, scan-code, verify-shell | No | verify |
provider | LLM provider (openai, anthropic, gemini) | No | - |
model | Model name (e.g., gpt-4o, claude-sonnet-4-20250514) | No | - |
mask_pii | Mask PII in inputs and outputs | No | false |
query | The user query (e.g., βDerivative of x^2β). Required for math and logic engines. | Conditional | - |
llm_output | The LLM output to verify. Required for the code engine. | Conditional | - |
engine | Verification engine: math, logic, code, sql, shell | No | math |
paths | Glob patterns for files to scan (e.g., **/*.py,**/*.env) | No | . |
output_format | Output format: text, json, sarif | No | text |
fail_on_findings | Fail the action if security issues are found | No | true |
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
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.
PII masking
Setmask_pii: "true" to automatically redact personally identifiable information (email addresses, phone numbers, SSNs) from inputs and outputs before they reach the LLM.
Outputs
| Output | Description |
|---|---|
verified | true if verification passed or no issues found |
explanation | Detailed proof or error explanation |
findings_count | Number of security issues found (for scan modes) |
badge_url | URL for QWED verified badge |
sarif_file | Path to SARIF output file (if output_format=sarif) |
Examples
Verify math in PRs
Verify logic
Check code security
Scan files with SARIF output
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
- 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
Documentation
Support
- Issues: GitHub Issues
- PyPI: qwed
- Twitter: @rahuldass29
License
Apache 2.0 - See LICENSEMade with π by QWED-AI