feat(analyzer): detect cloud-storage exfiltration as E5#218
Open
CharmingGroot wants to merge 1 commit into
Open
feat(analyzer): detect cloud-storage exfiltration as E5#218CharmingGroot wants to merge 1 commit into
CharmingGroot wants to merge 1 commit into
Conversation
E1-E4 model only HTTP sinks; cloud-storage uploads (boto3 put_object/upload_file, aws s3 cp/sync, gsutil cp, GCS/Azure SDK) were undetected and a cloud-only upload skill scored 0/SAFE (NVIDIA#217). Add E5_PATTERNS to the data_exfiltration analyzer (MEDIUM, low confidence, is_code_example filter) with pattern_defaults entries and 8 tests. Signed-off-by: CharmingGroot <ohyes9711@gmail.com>
rng1995
approved these changes
Jun 27, 2026
rng1995
left a comment
Collaborator
There was a problem hiding this comment.
Approving — additive E5 (cloud-storage exfiltration) detection covering boto3/S3, AWS CLI, GCS CLI+SDK, and Azure CLI+SDK upload calls. The deliberately low confidence (0.55–0.65) and MEDIUM severity are the right call given legitimate backups, and is_code_example() filters docs. Tests confirm real upload calls fire while client creation alone (list_buckets) and doc examples do not. pattern_defaults.py wiring (category/description/remediation/display) is consistent.
Non-blocking: pattern_defaults.py is also edited by #220 — minor rebase for whichever merges second.
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
The
data_exfiltrationanalyzer (E1–E4) only models HTTP sinks (requests/httpx/urllib/fetch/curl/wget). Exfiltration through cloud-storage SDKs and CLIs was undetected: a skill that uploads data to an external bucket viaboto3scored 0/100 SAFE (#217). This adds E5, the cloud-storage counterpart of E1.Changes
static_patterns_data_exfiltration.pygainsE5_PATTERNS—boto3put_object/upload_file(obj),aws s3 cp/sync/mv,aws s3api put-object,gsutil cp/rsync/mv,google-cloud-storageupload_from_*,az storage blob upload, and Azureupload_blob— and an E5 pass filtered through the existingis_code_example()helper (upload calls commonly appear in SKILL.md docs).pattern_defaults.pyregisters the E5 explanation, category, message, and remediation alongside E1–E4.Before / After
A cloud-only upload skill (
boto3put_object+upload_fileobj, no credential read):0/100 SAFE, 0 findings — the cloud-exfiltration channel was entirely invisibleE5 ×2MEDIUM — the channel is surfaced for reviewDesign Decisions
is_code_example()The LLM layer scores the same cloud-only file 91/CRITICAL (SSD-3: "exfiltrate ... to an external cloud storage bucket"), so
--no-llm/ air-gapped / CI deployments were the exposed surface this closes.Testing
8 new tests cover
boto3put_objectandupload_file/upload_fileobj,aws s3 cp/sync,gsutil cp,google-cloud-storageupload_from_*, Azureupload_blob, a documentation-example exclusion, and a benign client-creation negative.make formatandmake lintpass;uv run pytest -m "not integration and not provider"reports 997 passed, 0 failed.Closes #217