Snowflake red-team iter-5 — healthcare overlay, detection honesty pass, Chains K/L/M#48
Merged
Merged
Conversation
…s, Chains K/L/M, deeper I/C, hardened pipeline Major additions: * Healthcare overlay (`docs/analysis/snowflake-healthcare-overlay-2026.md`) — per-chain PHI exposure map, HIPAA control mapping, BAA considerations, OCR audit-retention sufficiency analysis. * Detection honesty pass — canonical `detection/snowflake/ENRICHMENT.md` inventorying every derived field (allowlists, baselines, IdP correlation, Cortex sidecar) with native source + computation + deployment checklist; `enrichment:` block added to all Sigma rules (~24 files, ACCOUNT_USAGE and Trail variants). * `bulk_exfil_baseline.yml` rewritten — role-baseline / volume-baseline / off-hours signals replace the volume-only floor. * `federated_login_anomaly.yml` made lag-tolerant — documents Snowflake / Okta / Entra latency profile; both-sources-caught-up gate prevents FP storms during ingestion lag. New chains: * Chain K — Polaris / Iceberg catalog abuse (`iceberg_catalog_pivot.py` + `iceberg_table_outside_catalog_base.yml`). * Chain L — External OAuth scope drift (`oauth_scope_audit.py` + `oauth_integration_scope_drift.yml`). * Chain M — UDF EAI breakout (`udf_eai_egress.py` + `udf_with_eai_invocation.yml`). * SPCS base-image supply chain (Chain H extension) — `spcs_base_image_probe.py` + `spcs_image_unpinned_or_external.yml`. Deepening on existing chains: * Chain I — Cortex agent abuse: `mode_corpus.py` externalizes payloads; new modes `semantic_inject` / `authority_spoof` / `multi_turn_setup` / `multi_turn_payoff` / `search_rank_hijack`; new behavioural rule `cortex_agent_followup_without_user_intent.yml` (no keyword dependency); full `lab-validation/` directory with trace + search audit + MCP poisoning lab SQL. * Chain C — Native App supply chain: `naaaps_bypass_probe.py` with a 10-payload corpus across the four documented NAAAPS threat categories; `v2-dep` + `v3-loader` manifests for the deferred-loader timeline; `--variant multi-stage` simulator mode; `native_app_dependency_drift.yml`. Pipeline & infra hardening: * Streaming-ingest: Function timeout extended to 4 min and aligned with the 60 s poll cadence; `host.json` singleton block prevents auto-recovery race; cursor write goes through fcntl.flock + atomic rename; README replaces the "~90 s end-to-end" claim with a per-stage measurement methodology. * `tools/lib/snowflake_mock_client.py` — shared `login_with_pat` / `run_sql` / `read_query_history` / `get` / `post`; 5 pivot tools refactored to use it (boilerplate consolidation). Report + indexes: * `docs/analysis/snowflake-platform-attack-surface-2026.md` adds chains K/L/M + SPCS image; `reports/snowflake-platform-assessment/` attack-chains, detection, and index pages updated. * `CLAUDE.md`, root `README.md`, `detection/snowflake/README.md`, and both tool READMEs refreshed. CI status: `check_snowflake_report_integrity`, `check_snowflake_tools_syntax`, and `check_mock_services_loopback` all pass against the new content. 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
Fifth iteration on the Snowflake platform red-team work, driven by a self-audit of iter-1 through iter-4. The audit flagged: no healthcare context in any artifact, several Sigma rules quietly using derived fields they didn't document, weak detection logic on the bulk-exfil + federated-login baselines, missing surface area (Polaris/Iceberg, OAuth scope drift, UDF EAI breakout, SPCS image supply chain), and ~150 lines of duplicated boilerplate across the offensive tools.
What's in this PR
Healthcare overlay
docs/analysis/snowflake-healthcare-overlay-2026.md— per-chain PHI exposure map, HIPAA controls each chain challenges, BAA considerations for Cortex/Native Apps, OCR audit-retention sufficiency analysis.Detection honesty pass
detection/snowflake/ENRICHMENT.md— canonical inventory of every derived field across the rule set with native source, computation, input-data location, and a deployment checklist.enrichment:block added to every Sigma rule (~24 files including Trail variants), explicitsidecar_required: trueon Cortex rules whosecortex_agent_history/cortex_search_auditlog sources are not native ACCOUNT_USAGE views.Detection logic fixes
bulk_exfil_baseline.yml: rewritten from volume-only to role-baseline + per-role p90 volume + off-hours signals (won't misfire on quarter-close).federated_login_anomaly.yml: lag-tolerant with Snowflake/Okta/Entra latency profile and both-sources-caught-up gate.New chains
iceberg_catalog_pivot.py+iceberg_table_outside_catalog_base.yml)oauth_scope_audit.py+oauth_integration_scope_drift.yml)udf_eai_egress.py+udf_with_eai_invocation.yml)spcs_base_image_probe.py+spcs_image_unpinned_or_external.ymlDeepening existing chains
mode_corpus.pyexternalises payloads; new modessemantic_inject/authority_spoof/multi_turn_setup/multi_turn_payoff/search_rank_hijack; new behavioural rulecortex_agent_followup_without_user_intent.ymlthat fires without aCALL_TOOL:token; fulllab-validation/directory with trace + search audit + MCP poisoning SQL.naaaps_bypass_probe.pywith a 10-payload corpus across the four documented NAAAPS threat categories;v2-dep+v3-loadermanifests for the deferred-loader timeline;--variant multi-stagesimulator mode;native_app_dependency_drift.yml.Pipeline + infra hardening
host.jsonsingleton block prevents auto-recovery race, cursor writes through fcntl.flock + atomic rename, README replaces "~90 s end-to-end" with a per-stage measurement methodology.tools/lib/snowflake_mock_client.py— shared client helpers (login_with_pat,run_sql,read_query_history,get,post); 5 pivot tools refactored.Indexes refreshed
CLAUDE.md, rootREADME.md,detection/snowflake/README.md, both tool READMEs.docs/analysis/snowflake-platform-attack-surface-2026.mdextended with chains K/L/M + SPCS image.attack-chains.html,detection.html,index.html) updated.Test plan
python3 ci/check_snowflake_report_integrity.pypasses — nav parity + internal links across all 7 report pages.python3 ci/check_snowflake_tools_syntax.pypasses — 22 module syntax check.python3 ci/check_mock_services_loopback.pypasses — 8 server / 8 file loopback check.detection/snowflake/ENRICHMENT.mdfor any derived field whose computation feels unrealistic for a customer's ingestion pipeline.Generated with Claude Code