PR-15: Ecosystems (C#/Rust/Ruby) + Semgrep export (scanner) - #43
Merged
Conversation
…-15) - Detection signals for C# (Semantic Kernel / Azure.AI.OpenAI), Rust (async-openai), Ruby (ruby-openai). - CVE manifest parsing for NuGet (*.csproj), crates.io (Cargo.lock), RubyGems (Gemfile.lock) via OSV — supply-chain coverage for the three ecosystems. - Credential coverage extended to *.cs/*.rs/*.rb/*.csproj on 13 DSGAI02/DSGAI13 rules, with C#/Rust/Ruby fixture cases (P02.9 catches raw tokens); answer sheet 29 -> 32. - build/export_semgrep.py -> dist/dsgai.semgrep.yaml: the 85 STRUCTURAL rules as a Semgrep pack (value-bearing excluded by design — their matches must never surface). Generated from the rules YAML; drift is a CI failure (--check). Makes incumbent toolchains carriers of the DSGAI framework. - test_runner: the fixture scan now runs --no-cve so CI is deterministic (no network); added semgrep-sync and multi-ecosystem-parse tests. Verified: regen --check (32 pins); pytest 21 passed; semgrep pack valid YAML (85 rules, all pattern-regex + dsgai metadata); yamllint clean under CI config.
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.
Phase 4. Depends on PR-11.
Ecosystem expansion — C# / Rust / Ruby
*.csproj), crates.io (Cargo.lock), RubyGems (Gemfile.lock).*.cs/*.rs/*.rb/*.csprojon 13 DSGAI02/13 rules — with C#/Rust/Ruby fixture cases so the coverage is actually tested (P02.9 catches the raw tokens). Answer sheet 29 → 32.Semgrep rule-pack export
build/export_semgrep.py→dist/dsgai.semgrep.yaml— the 85 STRUCTURAL rules as a Semgrep pack (value-bearing rules excluded by design — their matches must never surface). Generated from the rules YAML; drift is a CI failure (--check). Strategic: incumbent toolchains become carriers of the DSGAI framework.Verification
regen --check→ all 32 line-pins match;pytest→ 21 passed.pattern-regex+dsgai_controlmetadata), clean under the CI yamllint config.--no-cveso CI is deterministic (no network); CVE ecosystem parsing is covered by an offline unit test.Honest scope note
Coverage here is DSGAI02 (credentials, language-agnostic patterns) + DSGAI04 (supply-chain via CVE). DSGAI17/20 language-specific structural patterns (retry/endpoint shapes in C#/Rust/Ruby) are deferred — writing them without per-language structural fixtures would violate the project's own "no rules without fixture test cases" rule. Tracked as a follow-up.