Snowflake red-team iter-7 — audit-driven credibility & deployment fixes#50
Merged
Conversation
Addresses the iter-6 audit's P0/P1 findings: the analysis docs honestly graded chain maturity (EMPIRICAL/MODELED/HYPOTHESIS) but the executive HTML report stripped that signal, the detection pack hid which rules were deployment-blocked, and several modelled chains lacked source anchors. This iteration restores the maturity signal end-to-end, ships the IdP audit ingest templates the federated-login / scope-drift rules need to fire, decomposes Chain B into its empirical vs hypothesis parts, and adds integration-test coverage that pins the contracts the detection pack and analysis narratives depend on. Also extends the Cortex Guardrails corpus with a healthcare tier (PHI extraction, cohort fishing, Sweeney-class re-ID, Safe Harbor bypass, minimum-necessary violation, BAA scope violation) so covered-entity tenants can measure guardrails efficacy against their actual threat model, and adds copy-paste-ready risk-register entries to the healthcare overlay. 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
Addresses the iter-6 audit's P0/P1/P2 findings end-to-end. The analysis docs already
graded chains EMPIRICAL/MODELED/HYPOTHESIS but the executive HTML report stripped that
signal; the detection pack hid which rules were deployment-blocked; and several modelled
chains lacked incident anchors. This iteration restores the maturity signal end-to-end,
ships the IdP audit ingest templates the federated-login / scope-drift rules depend on,
decomposes Chain B into its empirical vs hypothesis parts, and adds integration-test
coverage that pins the contracts the detection pack and analysis narratives rely on.
What changed
Credibility & maturity honesty
attack-chains.html; key-findings rows inindex.htmlcarry inline maturity tagsmatching the analysis docs.
disclosure, vendor-patched), while the end-to-end exfil scenario stacked on top
remains HYPOTHESIS. Visible in the HTML callout, the analysis doc, and the
chain-reference-table footnote.
Cortex Agent planner robustness (Chain I), and the lab-vs-tenant gap are now
explicit footnotes in
chain-reference-table.md.with documented source/analog statements that name the related class without
inventing Snowflake-specific incidents.
Detection-pack deployment honesty
detection.htmlanddetection/snowflake/README.md. Each row names the dependency (Cortex sidecar,IdP audit feed, EDR telemetry) plus the interim policy-layer workaround so SOCs
aren't left with silently-broken rules.
attack-chains.htmlanddetection.html, with compensating controls(row-access policies, BYTES_WRITTEN_TO_RESULT baselines, external-stage DDL
alerts, network policies on service users).
IdP audit ingest templates (new)
Three template directories under
detection/snowflake/enrichment-templates/:idp-okta-system-log/— Splunk TA local overrides, Sentinel data-connector spec,KQL parser function. Unblocks federated-login, SCIM-role-race, OAuth-scope-drift
for Okta tenants.
idp-entra-signin/— Entra diagnostic-settings ARM template, Sentinel KQL parser,Splunk Microsoft Cloud Services TA local config.
oauth-consent-snapshot/— Snowpark stored procedures (Okta + Entra grantspollers) that land a daily IdP consent snapshot via External Access Integration,
plus Sentinel KQL and Splunk saved-search diffs for Chain L silent-widening.
Healthcare extension
healthcare-benign payloads across 6 HIPAA-relevant categories (
phi_extraction,cohort_fishing,reid_attempt,deid_bypass,min_necessary_violation,baa_scope_violation). Harness README adds healthcare-tier interpretation.healthcare overlay with HIPAA control mappings — copy-paste-ready for a covered
entity's risk analysis under §164.308(a)(1)(ii)(A).
Test coverage (new)
tests/integration/gains 20 new tests + 3 pre-existing Chain A — all 23 green:test_snowflake_pivot_tools.py— 8 tests covering storage_integration_enum,share_creation_exfil, replication_group_exfil, bind_param_evasion (pins the
_bindingsaudit-gap protocol contract), spcs_egress_probe (schema-pins thematrix shape the analysis doc references), spcs_base_image_probe,
iceberg_catalog_pivot (graceful-failure envelope for Chain K), udf_eai_egress.
test_snowflake_identity_tools.py— 7 tests covering jwt_keypair_signer,pat_scope_enum (both PAT modes), pat_discovery (with EXPLOIT_FIXTURE_ROOT
wiring), partner_integration_audit, oauth_scope_audit, scim_token_harvester.
test_cortex_corpus_shape.py— 5 tests pinning the corpus schema, thehealthcare tier's per-category coverage, and the benign-control invariant
the FP/FN summary depends on.
Diff stats
29 files changed, 2,875 insertions(+), 54 deletions(-).
Test plan
python3 tools/ci/check_no_real_tenants.py— PASSpython3 tools/ci/check_detection_pairing.py— PASS (40 module trees)python3 tools/ci/check_no_committed_drivers.py— PASSpython3 ci/check_snowflake_report_integrity.py— PASS (7 pages, nav parity + internal links)python3 ci/check_snowflake_tools_syntax.py— PASS (24 modules)EXPLOIT_LAB_ACTIVE=1 python3 -m pytest tests/integration/— 23 passedhtml.parser) for all three modified report pagesGenerated with Claude Code