Skip to content

Snowflake red-team iter-5 — healthcare overlay, detection honesty pass, Chains K/L/M#48

Merged
AndrewAltimit merged 1 commit into
mainfrom
snowflake-redteam-iter5
May 15, 2026
Merged

Snowflake red-team iter-5 — healthcare overlay, detection honesty pass, Chains K/L/M#48
AndrewAltimit merged 1 commit into
mainfrom
snowflake-redteam-iter5

Conversation

@AndrewAltimit
Copy link
Copy Markdown
Owner

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), explicit sidecar_required: true on Cortex rules whose cortex_agent_history / cortex_search_audit log 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

  • 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 existing chains

  • Chain I (Cortex): mode_corpus.py externalises 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 that fires without a CALL_TOOL: token; full lab-validation/ directory with trace + search audit + MCP poisoning SQL.
  • Chain C (Native App): 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 aligned with poll cadence (4 min / 60 s), host.json singleton 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, root README.md, detection/snowflake/README.md, both tool READMEs.
  • docs/analysis/snowflake-platform-attack-surface-2026.md extended with chains K/L/M + SPCS image.
  • HTML report (attack-chains.html, detection.html, index.html) updated.

Test plan

  • python3 ci/check_snowflake_report_integrity.py passes — nav parity + internal links across all 7 report pages.
  • python3 ci/check_snowflake_tools_syntax.py passes — 22 module syntax check.
  • python3 ci/check_mock_services_loopback.py passes — 8 server / 8 file loopback check.
  • All refactored and new Python tools compile cleanly.
  • Reviewer: skim detection/snowflake/ENRICHMENT.md for any derived field whose computation feels unrealistic for a customer's ingestion pipeline.
  • Reviewer: read the healthcare overlay end-to-end and flag any HIPAA citation that needs sharpening.
  • Reviewer: confirm the four new chains (K/L/M + SPCS image) cohere with the existing A-J narrative.

Generated with Claude Code

…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>
@AndrewAltimit AndrewAltimit merged commit b289fb6 into main May 15, 2026
2 checks passed
@AndrewAltimit AndrewAltimit deleted the snowflake-redteam-iter5 branch May 15, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant