dsgai_scanner_tool: v0.2 — fix critical defects, add obfuscation modes, CI integrations - #4
Merged
Merged
Conversation
…s, CI integrations v0.1 had two critical bugs that prevented documented use: install instructions referenced a filename that didn't exist (/GenAIDataSecurity vs the actual /dsgai_scanner_tool), and 6 of the 21 promised control scans were missing pattern blocks. This release: Critical fixes - Align README install/usage to the actual filename - Add the 6 missing scan blocks (DSGAI08, 09, 10, 16, 17, 19) Security / privacy - STRICT obfuscation by default; --internal flag restores full paths - Mandatory VALUE-BEARING scan protocol (V1-V6) so matched secret values never enter the report, the on-disk checkpoint, or any persistent tool call - Defense-in-depth secret sweep on STRUCTURAL evidence - Pinned DSGAI-scan.json schema forbids match_text / content fields Correctness - Search patterns rewritten as engine-neutral PCRE; noise patterns narrowed (P01.4 dp libs, P02.7 vault, P04.4 version operators, P11.1 vector queries, P20.5 inference endpoints) - NVD severity filter corrected (one value per call), GitHub Advisory affects-filter added, Go ecosystem added to OSV, MITRE ATLAS split from CVE sources - Report scaffolding renumbered; styling contradictions removed - Windows open-report command added New surfaces - VENDOR ATTESTATION REQUIRED status for BUY-tagged controls - --scope <path> flag for monorepos / large codebases - --no-cve flag for fully offline operation - YAML frontmatter (description, argument-hint, allowed-tools) - TL;DR quick-reference table - Known Limitations section (honest disclosure) - Plain-prompt variant (dsgai_scanner_prompt.md) for Cursor / Copilot / ChatGPT / Gemini - GitHub Action template (integrations/dsgai-scan.yml) with PR summary comments - Pre-commit hook recipe (integrations/pre-commit-hook.md + dsgai-secret-scan.sh) for fast DSGAI02 secret scanning See dsgai_scanner_tool/CHANGES_v0.2.md for the full release notes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
v0.1 had two critical defects that prevented documented use:
GenAIDataSecurity.md//GenAIDataSecuritybut the actual file wasdsgai_scanner_tool.md(so the literal install commands failed)This PR fixes both, hardens privacy guarantees, narrows noisy patterns, and ships CI integrations.
Highlights
🛡️ Strict-by-default obfuscation
--internal— full paths for team use)DSGAI-scan.jsonschema pinned to forbidmatch_text/contentfields✅ All 21 controls now have scan blocks
Added DSGAI08 (Regulatory Compliance), 09 (Multimodal), 10 (Synthetic Data), 16 (IDE Plugin), 17 (Resilience), 19 (Data Labeling).
🏢 VENDOR ATTESTATION REQUIRED status
New finding status for BUY-tagged controls and BUY portions of BOTH. Each generates a callout listing specific vendor attestations to request (SOC 2, DPA, training data retention policy, abuse detection docs).
🔧 Pattern correctness
^=wasn't valid), P11.1 (vector queries — was matching every.query()), P20.5 (inference endpoints — last branch was useless)📡 CVE enrichment fixed
affects=<pkg>filter (was fetching unfiltered feed)🚀 New distribution surfaces
integrations/dsgai-scan.yml) — PR comment with FAIL/WARN/PASS/Vendor/Exploitable CVE counts, artifact upload, optional fail-on-findings. Uses correct Claude Code CLI flags (claude -p+--dangerously-skip-permissions).integrations/pre-commit-hook.md+dsgai-secret-scan.sh) — sub-second DSGAI02 secret block before commit. Three install paths (pre-commit framework, plain git hook, Husky) — all delegate to one shared script.dsgai_scanner_prompt.md) — tool-neutral version for Cursor, Copilot Chat, ChatGPT, Gemini.🆕 New flags
--internal— full paths for team-internal use--no-cve— fully offline / air-gapped mode--scope <path>— restrict to a sub-directory (monorepos)/dsgai_scanner_tool --internal --no-cve --scope services/ai-gateway/📚 Documentation
Files changed
dsgai_scanner_tool/dsgai_scanner_tool.mddsgai_scanner_tool/DSGAI_README.mddsgai_scanner_tool/dsgai_scanner_prompt.mddsgai_scanner_tool/CHANGES_v0.2.mddsgai_scanner_tool/integrations/dsgai-scan.ymldsgai_scanner_tool/integrations/dsgai-secret-scan.shdsgai_scanner_tool/integrations/pre-commit-hook.mdDSGAI-samplereport.pngis intentionally left untouched.Test plan
claude -p,--dangerously-skip-permissions)git diff -z+mapfile -d '')dsgai_scanner_tool.md(not the v0.1 phantom filename)/dsgai_scanner_toolagainst a known-good LangChain sample repo after mergeSee
dsgai_scanner_tool/CHANGES_v0.2.mdfor the full audit trail of fixes.🤖 Generated with Claude Code