You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current static egress detection rules in SkillSpector can be completely bypassed when network calls construct target endpoints via runtime string formatting, dynamic attribute retrieval (getattr), or split stream chunks. A skill performing unauthorized background data exfiltration or arbitrary remote payload fetching is misclassified as SAFE (Risk score 0).
SkillSpector should flag dynamic runtime module resolutions (importlib.import_module combined with network-adjacent primitives) and obfuscated network requests as high-confidence suspicious network egress (CAUTION or SUSPICIOUS_EGRESS).
Root Cause & Suggested Fix
In static_analyzer/rules/egress.py, detection relies heavily on explicit string literals or direct AST Call names (e.g., requests.get, urllib.request.urlopen).
Proposal: Introduce a composite heuristic rule that detects importlib / import / getattr when chained with dynamic network sink signatures or background chunk streaming routines.
Context / Real-World Fixture
This evasion pattern was observed while testing dynamic module resolution and obfuscated egress coverage in SkillSpector-TokenVector.
I reproduced this on current main and opened #589 for the statically resolvable reflective-urllib portion. The change resolves bounded importlib.import_module(...) / getattr(...) string construction at the call site and routes credential/file-read flows through the existing TT3/TT4 taint rules, with negative coverage for public data, runtime-only names, reassignment, and scope boundaries. It intentionally does not claim to cover every dynamic URL, socket, or chunk-stream case in this issue.
Thanks @agentsope for quickly reproducing this and opening #589 to address the static reflection side via importlib.import_module and getattr! Tracking sensitive tainted flows into resolved sinks is definitely a solid step forward.
As you noted, the remaining attack surface—dynamic runtime URL construction, split stream chunking, and raw socket-level exfiltration—still bypasses static heuristics without raising flags.
Once #589 lands, would the team be open to a follow-up heuristic or rule to flag high-entropy/obfuscated network sinks, or perhaps broader taint tracking across custom chunk streaming wrappers? Happy to share additional test fixtures and evasion patterns observed during our tests on SkillSpector-TokenVector if that helps expand test coverage.
Update: PR #589 now has signed-off commit 1c3bce4 addressing the latest review findings around reflective-call evaluation order, lexical scope, class-body method rebinding, and runtime-bounded analysis. It includes regression coverage and is undergoing CI/re-review. As noted earlier, this PR remains scoped to statically resolvable reflective urllib sinks; the broader dynamic-URL, raw-socket, and split-stream cases in this issue are not covered by this update.
PR #589 is limited to statically resolvable reflective urllib sinks. Dynamic-URL, raw-socket, and split-stream cases remain outside that scope.
Keeping this issue open: the relevant implementation is not merged and the remaining scope still needs verification. Check/review status is a point-in-time snapshot, not a claim of merge readiness.
Activity
agentsope commentedon Sep 19, 2026
I reproduced this on current
mainand opened #589 for the statically resolvable reflective-urllib portion. The change resolves boundedimportlib.import_module(...)/getattr(...)string construction at the call site and routes credential/file-read flows through the existing TT3/TT4 taint rules, with negative coverage for public data, runtime-only names, reassignment, and scope boundaries. It intentionally does not claim to cover every dynamic URL, socket, or chunk-stream case in this issue.nguyenhungtran18 commentedon Sep 19, 2026
Thanks @agentsope for quickly reproducing this and opening #589 to address the static reflection side via
importlib.import_moduleandgetattr! Tracking sensitive tainted flows into resolved sinks is definitely a solid step forward.As you noted, the remaining attack surface—dynamic runtime URL construction, split stream chunking, and raw socket-level exfiltration—still bypasses static heuristics without raising flags.
Once #589 lands, would the team be open to a follow-up heuristic or rule to flag high-entropy/obfuscated network sinks, or perhaps broader taint tracking across custom chunk streaming wrappers? Happy to share additional test fixtures and evasion patterns observed during our tests on SkillSpector-TokenVector if that helps expand test coverage.
agentsope commentedon Sep 26, 2026
Update: PR #589 now has signed-off commit 1c3bce4 addressing the latest review findings around reflective-call evaluation order, lexical scope, class-body method rebinding, and runtime-bounded analysis. It includes regression coverage and is undergoing CI/re-review. As noted earlier, this PR remains scoped to statically resolvable reflective urllib sinks; the broader dynamic-URL, raw-socket, and split-stream cases in this issue are not covered by this update.
rng1995 commentedon Oct 4, 2026
PR-state snapshot checked on 2026-10-04:
PR #589 is limited to statically resolvable reflective urllib sinks. Dynamic-URL, raw-socket, and split-stream cases remain outside that scope.
Keeping this issue open: the relevant implementation is not merged and the remaining scope still needs verification. Check/review status is a point-in-time snapshot, not a claim of merge readiness.