Snowflake red-team iter 2 - tooling, mocks, detection pack, analysis depth#45
Merged
Conversation
…depth Builds on the docs-only iter-1 (PR #44) with full-PoC tooling across the three target areas plus the empirical work the prior appendix flagged as deferred. New tooling — all loopback-mocked, all gated on ContainmentGuard, all paired with detection/ subdirs per the repo convention: - tools/cloud-identity/snowflake/ — JWT key-pair signer (Chain F), PAT scope walk, SCIM token harvester w/ role-race primitive - tools/lateral-movement/snowflake-pivot/ — storage-integration enum (Chain E), Direct Share + replication-group exfil (Chain G, audit-bypass demo), bind-param evasion against QUERY_HISTORY - tools/llm-attacks/cortex/ — Cortex Search poisoning bench, Cortex Agent MCP poisoning bench (Chain I), Cortex Guardrails FP/FN test harness Mocks (loopback-only, ports 9600/9610/9620): - infra/lab/mock-snowflake/ — REST surface: JWT/PAT/SCIM auth, SQL exec w/ QUERY_HISTORY replay, shares/replication, Cortex Search/Agents w/ a deterministic planner stub - infra/lab/mock-snowflake-mcp/ — pluggable MCP server for the Cortex agent bench Detection pack: - 13 Sigma rules + KQL/SPL hunts + per-tool false-positive notes - detection/snowflake/ cross-chain index covering chains A–I, plus a streaming QUERY_HISTORY ingest pattern (KQL) and a connector-debug- log secret-cohort regex (SPL) — addresses prior appendix question about real-time alerting vs ACCOUNT_USAGE's ~45m latency Analysis / report content: - docs/analysis/snowflake-platform-attack-surface-2026.md gains chains F–I (closes the gap with the HTML report's chain set), the Snowflake Trail vs ACCOUNT_USAGE field-by-field mapping, and the JDBC 4.0.0–4.2.0 transitive-CVE rollup - reports/.../cve-inventory.html adds the 9 transitive CVEs shipped in 2026 H1 JDBC releases - reports/.../index.html clarifies how technical, business, and leadership readers should each navigate the report - site/index.html landing card refreshed for chains A–I + new tooling Containment additions: - tools/lib/containment.py — assert_snowflake_is_mock, assert_snowflake_lab_account (multi-account aware so source+target lab accounts both pass Chain G validation), three reserved mock ports CI: - ci/check_snowflake_tools_syntax.py compiles every new module; wired into main-ci.yml alongside the existing snowflake report-integrity gate - All 11 CI gates pass locally (detection-pairing confirms each new tool dir is paired with a detection/ subdir) Empirical findings landing in this iteration: - Chain G server-side data motion confirmed as a source-side audit gap on the mock — pair with lab-validation/*.sql to validate against a sandbox tenant - Bind-parameter coverage gap reproduced end-to-end: prepared COPY INTO @stage statements record only the parameterized text in QUERY_HISTORY, bind values are absent - Cortex Agent planner does propagate second-order tool calls and does execute SQL embedded in tool output — demonstrated against both directive and sql_embed MCP modes - First-gen regex Guardrails baseline catches ~54.5% of the public IPI seed corpus — concrete floor for the appendix question 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
Builds on the docs-only iter-1 (#44) with full-PoC tooling across the three target areas plus the empirical work the prior appendix flagged as deferred. All offensive modules gated on ContainmentGuard, paired with detection/ subdirs, and exercised end-to-end against new loopback mocks.
New tooling
Mocks (loopback-only)
Detection pack
Analysis / report content
Containment + CI
Empirical findings landing in this iteration
Test plan
Generated with Claude Code