feat: 10 supply-chain exfiltration rules (litellm attack)#38
Merged
Conversation
New category: supply-chain-exfil. Derived from the litellm supply chain attack (March 24, 2026) where compromised PyPI packages harvested credentials via .pth files, encrypted with RSA, and exfiltrated via HTTPS. Rules detect: - Credential file reads in Python (SSH keys, cloud configs, wallets) - File content encoding for exfiltration (base64, AES, RSA) - Bulk os.environ collection with network send - .pth files with executable content - Cloud metadata endpoint access in Python - Kubernetes secrets API access and privileged pod creation - Systemd/cron persistence installation - Hardcoded cryptographic key material - Tar/zip archive creation combined with HTTP POST - .pth file presence with non-path content 187 total rules (was 177). All 560 tests pass, 0 lint issues.
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
10 new detection rules for supply-chain exfiltration attacks, derived from the litellm supply chain compromise (March 24, 2026).
New category:
supply-chain-exfil. New file:internal/rules/builtin/supply-chain-exfil.yaml.The litellm attack
litellm v1.82.7/1.82.8 were published to PyPI with malicious
.pthfiles that:Why existing rules didn't catch it
Existing supply-chain rules focus on
setup.pyexecution, download-and-execute, and reverse shells. The litellm attack uses clean Python to read local files and POST via HTTPS - no shell commands, no downloads.New rules
187 total rules (was 177). 560 tests, 0 lint issues.
Test plan
TestIntegrationBenignSecurityToolingpasses (no FPs on security tools)make build && make test && make vet && make lintpasses