diff --git a/CHANGELOG.md b/CHANGELOG.md index 8549814..11d04e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to Sunglasses are documented here. +## [0.2.66] — 2026-06-11 + +### Added (discovery_file_poisoning expansion — agent config/discovery-file class) + +- **+8 discovery_file_poisoning patterns** (`GLS-DFP-083`, `084`, `087`, `088`, `089`, `090`, `095`, `096`) — coverage for poisoned config/discovery surfaces AI agents read and trust: redacted HAR-bundle sidecars, Release-Please/Changesets configs, WebdriverIO/Selenium test configs, WebGPU/shader source comments, OpenTelemetry trace/baggage metadata, PowerShell module manifests, GitHub Discussion templates, and repository ruleset / branch-protection exports. **1,038 → 1,046 patterns / 65 categories / 7,631 keywords.** +- All 8 passed the clean-code false-positive gate (`test_false_positives` + `test_real_corpus_fp`) before ship — the same Miasma/Hades agent-config-poisoning class where a trusted repo file becomes agent policy on read. + ## [0.2.65] — 2026-06-10 ### Added (discovery_file_poisoning expansion) diff --git a/README.md b/README.md index 99052c2..e08e789 100644 --- a/README.md +++ b/README.md @@ -139,8 +139,8 @@ result = scanner.scan_auto("any_file.ext") |--------|-------| | Average text scan | <1ms (avg 0.26ms on M3 Max, single-threaded) | | Throughput | ~3,800 scans/sec (single-threaded, M3 Max) | -| Patterns | 1038 | -| Keywords | 7,548 | +| Patterns | 1046 | +| Keywords | 7,631 | | Languages | 23 | | Attack categories | 65 | | Normalization techniques | 17 | @@ -151,15 +151,15 @@ result = scanner.scan_auto("any_file.ext") | Core dependencies | Zero for text scan; optional deps for media | | Platforms | Mac, Windows, Linux — anywhere Python runs | -_All performance numbers verified against `stats/current.json` (v0.2.65, updated Jun 6, 2026). Measured on Apple M3 Max, 48GB RAM, single-threaded Python 3.11. Your hardware will differ._ +_All performance numbers verified against `stats/current.json` (v0.2.66, updated Jun 11, 2026). Measured on Apple M3 Max, 48GB RAM, single-threaded Python 3.11. Your hardware will differ._ ## 23 Languages English, Spanish, Portuguese, French, German, Italian, Dutch, Russian, Ukrainian, Polish, Czech, Turkish, Azerbaijani, Arabic, Hebrew, Persian, Chinese, Japanese, Korean, Hindi, Bengali, Indonesian, Vietnamese — plus normalization handles romanization, Unicode confusables, and 17 other obfuscation techniques. Community language contributions welcome. -## What Works Today (v0.2.65) +## What Works Today (v0.2.66) -- ✅ Text scanning: 1038 patterns, 7,548 keywords, 23 languages, 65 attack categories +- ✅ Text scanning: 1046 patterns, 7,631 keywords, 23 languages, 65 attack categories - ✅ Negation handling: "do NOT run rm -rf" correctly downgrades severity - ✅ Multi-stage pipeline: normalization (17 techniques) → pattern match → decision - ✅ Image scanning: OCR + EXIF metadata + hidden text detection (requires Tesseract) diff --git a/setup.py b/setup.py index 36527fc..2f3315c 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="sunglasses", - version="0.2.65", + version="0.2.66", description="Sunglasses for AI agents. Protection layer + neighborhood watch.", long_description=open("README.md").read(), long_description_content_type="text/markdown", diff --git a/sunglasses/__init__.py b/sunglasses/__init__.py index f5f4fd3..c631f5e 100644 --- a/sunglasses/__init__.py +++ b/sunglasses/__init__.py @@ -4,4 +4,4 @@ # # "Don't let your agents get fooled." -__version__ = "0.2.65" +__version__ = "0.2.66" diff --git a/sunglasses/patterns.py b/sunglasses/patterns.py index 1fa72b1..ae12839 100644 --- a/sunglasses/patterns.py +++ b/sunglasses/patterns.py @@ -22046,4 +22046,359 @@ ], "description": "Python linter and type-checker configs can carry agent-directed comments or custom fields that tell AI coding/security agents to treat the config as review policy, suppress findings, or forward local context." }, + # === v0.2.66 batch (8 discovery_file_poisoning patterns — Miasma/Hades config-file class) === + { + "id": "GLS-DFP-083", + "name": "Redacted HAR Bundle Sidecar Poisoning", + "category": "discovery_file_poisoning", + "severity": "high", + "channel": ["file", "web_content"], + "keywords": [ + ".har", + "HAR bundle", + "README-support-bundle.md", + "agent_policy", + "assistant_note", + "capture.har", + "debug bundle", + "network capture bundle", + "proxy capture bundle", + "redacted HAR", + "redaction rationale", + "redaction-summary.md", + "redaction.json", + "redaction_reason", + "replay manifest", + ], + "regex": [ + r"""(?six)^ +(?!.*\b(?: + (?:security\s+training|support\s+guide|browser\s+support\s+guide|scanner\s+docs?|redaction\s+guidance|sanitization\s+documentation|privacy\s+review).{0,180}?(?:should\s+(?:redact|report|detect|flag|refuse|block)|must\s+not\s+(?:treat|include|forward|send|share|trust|obey)|never\s+(?:trust|obey|include|forward|send|share|override|overrides?)) + |(?:incident\s+report|security\s+report|postmortem).{0,200}?(?:detected\s+and\s+(?:blocked|refused|flagged|remediated)|was\s+(?:blocked|refused|flagged|detected|remediated)\s+by) + |(?:no\s+(?:agent\s+)?instructions?|no\s+policy\s+overrides?\s+are\s+present|not\s+(?:agent\s+)?policy|not\s+authoritative) + |(?:do\s+not\s+(?:obey|follow|include|attach|forward|send|share|overrides?|trust|treat)|does\s+not\s+(?:obey|follow|include|attach|forward|send|share|override|overrides?|trust|instruct)|never\s+(?:obey|include|attach|forward|send|share|overrides?|trust)|must\s+not\s+(?:treat|obey|include|attach|forward|send|share|overrides?|trust)) +)) +(?=.*(?: + (?:HAR\s+bundle|redacted\s+HAR|sanitized\s+HAR|support\s+bundle|debug\s+bundle|network\s+capture\s+bundle|proxy\s+capture\s+bundle|ticket\s+attachment|browser\s+capture\s+bundle) + |(?:redaction[-_\s]summary|redaction\.json|redaction_reason|redaction\s+rationale|sanitization[-_\s]report|sanitized\s+capture|replay\.ya?ml|replay\s+manifest|replay\s+note|README-support-bundle|import\s+notes?) + |(?:capture\.har|\.har\b|HAR\s+1\.2|Chrome\s+DevTools\s+network\s+export|mitmproxy\s+(?:dump|flow)|DevTools\s+HAR\s+export) +)) +(?=.*(?