Narrow ShieldClaw to SQLi-only MVP - #69
Closed
blondres04 wants to merge 7 commits into
Closed
Conversation
This was referenced May 11, 2026
There was a problem hiding this comment.
Pull request overview
This PR narrows ShieldClaw’s default MVP validation lane to Semgrep CWE-89 (SQL injection) only, adds explicit “pending approval / rejected / deferred” lifecycle behavior, and updates report outputs + CI/docs to reflect the SQLi-only support claim.
Changes:
- Restricts default dynamic validation/scoring/approval/detonation to
CWE-89, while keeping non-CWE-89findings visible as deferred/static-only by default. - Introduces/normalizes lifecycle states (
AWAITING_APPROVAL,REJECTED,DEFERRED) and preserves legacySCOREDapproval compatibility. - Enhances JSON/Markdown/SARIF reporting with MVP support and outcome metadata; adds a focused SQLi MVP unit gate + manual Docker checklist documentation.
Reviewed changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| shield-claw/tests/test_triage_classifier.py | Updates classifier expectations for SQLi-only default and adds override/guard coverage. |
| shield-claw/tests/test_report_builder.py | Updates report assertions to validate new MVP/outcome metadata and rejected behavior. |
| shield-claw/tests/test_pipeline_e2e.py | Adjusts integration expectations for terminal states under the new lifecycle. |
| shield-claw/tests/test_orchestrator_resume.py | Updates resume/scoring expectations to use AWAITING_APPROVAL and adds SQLi-only scoring gate test. |
| shield-claw/tests/test_approval.py | Updates fixtures/assumptions and adds CLI compatibility test for legacy SCORED rows. |
| shield-claw/tests/fixtures/semgrep_5sqli.json | Adds a 5-finding SQLi-only Semgrep fixture for deterministic tests. |
| shield-claw/src/shieldclaw/triage/cwe_verdicts.toml | Changes default CWE mapping so only CWE-89 is dynamically verifiable by default. |
| shield-claw/src/shieldclaw/triage/classifier.py | Normalizes CWE parsing and adds SQLi-only “deferred boundary” reasoning. |
| shield-claw/src/shieldclaw/reporting/builder.py | Adds mvp_support + outcome metadata across JSON/Markdown/SARIF serialization. |
| shield-claw/src/shieldclaw/orchestrator.py | Moves supported findings to AWAITING_APPROVAL, defers others, and keeps legacy SCORED approval compatibility. |
| shield-claw/src/shieldclaw/models.py | Adds MVP CWE helpers + expands FindingState enum for new lifecycle states. |
| shield-claw/src/shieldclaw/main.py | Filters approval candidates to dynamically-verifiable findings across AWAITING_APPROVAL/SCORED. |
| shield-claw/pyproject.toml | Updates package description to reflect the SQLi-focused MVP claim. |
| shield-claw/docs/sqli-mvp-validation-checklist.md | Adds a manual Docker checklist for approved TP + rejected no-detonation MVP validation. |
| shield-claw/docs/prd-sast-pipeline-v02.md | Updates product design doc to reflect SQLi-only MVP scope and lifecycle changes. |
| shield-claw/docs/adrs/007-hitl-approval-model.md | Updates approval ADR language/workflow for SQLi-only MVP + legacy compatibility. |
| shield-claw/CLAUDE.md | Updates contributor guidance and invariants to SQLi-only MVP language. |
| SECURITY.md | Updates security policy wording/scope to match SQLi-only MVP claim and expectations. |
| RESPONSIBLE_USE.md | Updates responsible-use policy to reflect SQLi-only MVP boundary and experiment constraints. |
| README.md | Updates README claims, architecture diagram labels, outputs, and limitations to SQLi-only MVP. |
| CHANGELOG.md | Documents MVP narrowing + new states + reporting metadata and QA gate additions. |
| .gitignore | Ignores .codex/ and normalizes an entry formatting change. |
| .github/workflows/ci.yml | Adds a focused SQLi MVP unit gate step to CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| def _mvp_support_metadata(finding: SASTFindingReport) -> dict[str, str]: | ||
| """Describe whether a finding is inside the default SQLi-only MVP boundary.""" | ||
| if has_mvp_supported_cwe(finding.cwe): |
Comment on lines
+199
to
+203
| if deferred: | ||
| return TriagedFinding( | ||
| finding=finding, | ||
| verdict=TriageVerdict.STATIC_ONLY, | ||
| reason=( |
Comment on lines
+225
to
+229
| def _get_approval_ready_findings(store: object, scan_id: str) -> list[Any]: | ||
| """Return new and legacy approval-pending dynamically verifiable rows.""" | ||
| from shieldclaw.persistence.store import FindingRow, ScanStore | ||
|
|
||
| assert isinstance(store, ScanStore) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
CWE-89SQL injection.CWE-89findings visible while preventing default scoring, approval, PoC generation, or detonation.AWAITING_APPROVAL,REJECTED, andDEFERREDlifecycle behavior while preserving legacySCOREDapproval compatibility.mvp_support,outcome, andoutcome_kindfields.Closes #65
Closes #66
Closes #67
Closes #68
Tests run
python -m pytest -m "not integration" -q-> 209 passed, 10 deselectedpython -m mypy --strict src/python -m ruff format --check .python -m ruff check .Manual QA
Manual Docker validation is documented in
shield-claw/docs/sqli-mvp-validation-checklist.mdand should be run before demo/release acceptance:CWE-89finding reachesTRUE_POSITIVE,TRUE_POSITIVEincludes exit-code evidence plus Tier-2 corroboration,CWE-89finding reachesREJECTED,CWE-89findings are visible but not scored or detonated by default.Known deferrals
CWE-78andCWE-434validation pathsNotes
Docker integration/manual QA was not run on this machine because Docker Desktop was not running. Pre-existing untracked generated docs under
shield-claw/docs/...were intentionally left uncommitted.