Repository navigation
feat(connections): add the Snowflake connector - #1427
Open
kittu181707 wants to merge 1 commit into
Open
kittu181707 wants to merge 1 commit into
kittu181707 wants to merge 1 commit into
Conversation
kittu181707
requested review from
abeldantas,
agent-runner353,
amaudruz,
christian-mcdermott,
lbangalosbt,
massimo-sandboxaq,
niall-sandboxaq,
petr-sandbox,
raullopez-sandbox and
simonflk-sb
as code owners
November 4, 2026 01:03
kittu181707
force-pushed
the
feat/snowflake-connector
branch
4 times, most recently
from
November 11, 2026 00:20
982b540 to
2350edd
Compare
kittu181707
force-pushed
the
feat/snowflake-connector
branch
8 times, most recently
from
November 16, 2026 06:12
91ec878 to
c7d6430
Compare
kollisathwikkumar
suggested changes
Nov 16, 2026
kollisathwikkumar
left a comment
There was a problem hiding this comment.
🛡️ Swarm Multi-Agent Code Review & Remediation Report
Executive Summary & Audit Scorecard
- Repository:
sandbox-quantum/switch(github) - Review ID:
2fe0bcf3-8f65-421e-bda0-9e0c28804b48 - Commit Range:
f4016a82fc5a→c7d6430d77d4 - Verdict: Request Changes
- Verdict Reason: Mandatory test suite failed (14 failing test(s)) and 4 blocking finding(s).
| Metric | Count | Status Description |
|---|---|---|
| Critical Blockers | 1 |
Exploit-reachable security flaws, backdoors, or broken syntax |
| High Risk | 3 |
Severe behavioral regressions, unconstrained I/O, or taint leaks |
| Medium Issues | 17 |
Maintainability, missing guards, or test coverage deficits |
| Low / Informational | 468 |
Style issues, cosmetic findings, or benign test fixtures |
| Verified Evidence | 489 |
Findings with exact deterministic tool & line provenance |
| Automated Patches | 0 |
Sandbox-tested minimal patches with regression tests |
🧭 Prioritized Remediation Roadmap
Follow this prioritized sequence to remediate identified defects cleanly:
- [Critical]
Hardcoded Secret Detected (Detected a Generic API Key, potentially exposing access to various services and sensitive operations.)incore/tests/switch_core/fixtures/agent_controllers/controller_info_request.json:6— Detected a Generic API Key, potentially exposing access to various services and sensitive operations. - [High]
Direct HTML injection sink (dangerouslySetInnerHTML/innerHTML)inconsole/apps/switch-console-desktop/src/renderer/features/switch-servers/connection-icon.tsx:77— Raw HTML assignment can trigger DOM XSS unless strictly sanitized. - [High]
Basic/Digest Authorization credentials can leak past redactionincore/switch_core/connections/loader.py:1— Generic key=value regex matches 'Authorization:' using a non-whitespace value class ([^\s,;]+) without scheme-aware handling for 'Basic'/'Digest', redacting only the scheme name while leaving the base64 or digest credential payload intact. - [High]
pytest suite reported 14 failing test(s)incore/tests/__init__.py:1— Fix the failing unit/integration tests before merging. - [Medium]
Untested changed moduleconsole/apps/switch-console-desktop/src/assets/images/connections/snowflake.svg`` inconsole/apps/switch-console-desktop/src/assets/images/connections/snowflake.svg:1— Add unit tests exercising error and boundary branches for this module.
Diff Summary & Architectural Impact
Diff change analysis completed via deterministic fallback (0 finding(s)).
Consolidated Findings (489)
1. [Critical] Hardcoded Secret Detected (Detected a Generic API Key, potentially exposing access to various services and sensitive operations.) (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/fixtures/agent_controllers/controller_info_request.json:6| Evidence IDs: EV-489 - Sources: Security Agent (gitleaks)
- Evidence:
Rule generic-api-key matched redacted secret: key": "REDACTED" - Recommendation: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
2. [High] Direct HTML injection sink (dangerouslySetInnerHTML / innerHTML) (Verified | Confidence: 92%)
- Location:
console/apps/switch-console-desktop/src/renderer/features/switch-servers/connection-icon.tsx:77| Evidence IDs: EV-492, EV-488 - Sources: Security Agent (security-taint), Security Agent (semgrep)
- Evidence:
dangerouslySetInnerHTML={{ __html: svg.replace('<svg ', '<svg class="size-full" ') }} - Recommendation: Raw HTML assignment can trigger DOM XSS unless strictly sanitized.
3. [High] Basic/Digest Authorization credentials can leak past redaction (Verified | Confidence: 92%)
- Location:
core/switch_core/connections/loader.py:1| Evidence IDs: EV-491 - Sources: Security Agent (security-guard)
- Evidence: `"""The built-in connection catalog shipped in
connections/catalog/.
Each catalog/<slug>/connection.yaml describes one service a user can
connect. Enabled entries ship a skill under ``catalog/`
- Recommendation: Generic key=value regex matches 'Authorization:' using a non-whitespace value class ([^\s,;]+) without scheme-aware handling for 'Basic'/'Digest', redacting only the scheme name while leaving the base64 or digest credential payload intact.
4. [High] pytest suite reported 14 failing test(s) (Verified | Confidence: 95%)
- Location:
core/tests/__init__.py:1| Evidence IDs: EV-496 - Sources: Test-Coverage Agent (pytest)
- Evidence:
to the "fixture" caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to "function" scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. - Recommendation: Fix the failing unit/integration tests before merging.
5. [Medium] Untested changed module console/apps/switch-console-desktop/src/assets/images/connections/snowflake.svg (Verified | Confidence: 85%)
- Location:
console/apps/switch-console-desktop/src/assets/images/connections/snowflake.svg:1| Evidence IDs: EV-494 - Sources: Test-Coverage Agent (test-mapper)
- Evidence:
{"direct_tests":[],"indirect_importing_tests":[],"mocked_only_in_tests":[],"has_any_unmocked_test":false,"coverage_status":"no_importing_tests_found"} - Recommendation: Add unit tests exercising error and boundary branches for this module.
6. [Medium] Untested changed module console/apps/switch-console-desktop/src/renderer/features/switch-servers/service-key-step.tsx (Verified | Confidence: 85%)
- Location:
console/apps/switch-console-desktop/src/renderer/features/switch-servers/service-key-step.tsx:1| Evidence IDs: EV-495 - Sources: Test-Coverage Agent (test-mapper)
- Evidence:
{"direct_tests":[],"indirect_importing_tests":[],"mocked_only_in_tests":[],"has_any_unmocked_test":false,"coverage_status":"no_importing_tests_found"} - Recommendation: Add unit tests exercising error and boundary branches for this module.
7. [Medium] checked_fields validates pattern placement via a depth-4 branch with 12 paths (Verified | Confidence: 92%)
- Location:
core/switch_core/connections/adapters/api_key.py:85| Evidence IDs: EV-003, EV-002 - Sources: Style Agent (ast-complexity)
- Evidence:
or ("host" in places and not HOST_LABEL_RE.fullmatch(value)) - Recommendation: Extract a small helper, e.g.
def _pattern_error(field, value, places) -> str | None:that returns the first failing reason or None, and letchecked_fieldsdo a singleif err := _pattern_error(...): raise InvalidKeyError(err). This flattens nesting and makes each placement rule independently testable.
8. [Medium] _read_identity grows to 11 branch nodes as required-field handling is added (Verified | Confidence: 92%)
- Location:
core/switch_core/connections/adapters/api_key.py:215| Evidence IDs: EV-004 - Sources: Style Agent (ast-complexity)
- Evidence:
and _path_value(body, identity.requires) is None - Recommendation: Split the body-decoding portion (size guard, JSON decode, requires check) into a
_decode_answer(response, values)helper returning(account_id, label)on success, and keep_read_identityas a thin orchestrator. Reduces branches and isolates the JSON/refusal logic.
9. [Medium] _consistent carries the highest branch count (23) in the loader (Verified | Confidence: 92%)
- Location:
core/switch_core/connections/loader.py:252| Evidence IDs: EV-016 - Sources: Style Agent (ast-complexity)
- Evidence:
Function '_consistent' has high branch complexity (23 branch nodes). - Recommendation: Decompose
_consistentinto per-invariant checks (e.g._check_fields,_check_urls,_check_identity) that each return a list of problems, and have_consistentaggregate them. Smaller checkers are individually testable and keep branch count per function bounded.
10. [Medium] check_templates nests template validation to depth 4 (Verified | Confidence: 92%)
- Location:
core/switch_core/connections/loader.py:474| Evidence IDs: EV-012, EV-011 - Sources: Style Agent (ast-complexity)
- Evidence:
Function 'check_templates' has deep control-flow nesting (depth=4); use early returns. - Recommendation: Invert the guards into early returns (raise/return the problem as soon as a template fails) so the happy path stays at depth 1-2.
11. [Medium] STYLE-COMPLEXITY: Function '_consistent' has high branch complexity (10 branch nodes). (Verified | Confidence: 92%)
- Location:
core/switch_core/connections/loader.py:757| Evidence IDs: EV-017 - Sources: Style Agent (ast-complexity)
- Evidence:
Function '_consistent' has high branch complexity (10 branch nodes). - Recommendation: Resolve deterministic lint, syntax, or dead-code violation locally.
12. [Medium] STYLE-COMPLEXITY: Function '_enabled_is_complete' has high branch complexity (23 branch nodes). (Verified | Confidence: 92%)
- Location:
core/switch_core/connections/loader.py:914| Evidence IDs: EV-018 - Sources: Style Agent (ast-complexity)
- Evidence:
Function '_enabled_is_complete' has high branch complexity (23 branch nodes). - Recommendation: Resolve deterministic lint, syntax, or dead-code violation locally.
13. [Medium] STYLE-COMPLEXITY: Function '_check_access_profiles' has high branch complexity (10 branch nodes). (Verified | Confidence: 92%)
- Location:
core/switch_core/connections/loader.py:969| Evidence IDs: EV-019 - Sources: Style Agent (ast-complexity)
- Evidence:
Function '_check_access_profiles' has high branch complexity (10 branch nodes). - Recommendation: Resolve deterministic lint, syntax, or dead-code violation locally.
14. [Medium] STYLE-COMPLEXITY: Function '_check_api_key' has high branch complexity (22 branch nodes). (Verified | Confidence: 92%)
- Location:
core/switch_core/connections/loader.py:1001| Evidence IDs: EV-020 - Sources: Style Agent (ast-complexity)
- Evidence:
Function '_check_api_key' has high branch complexity (22 branch nodes). - Recommendation: Resolve deterministic lint, syntax, or dead-code violation locally.
15. [Medium] STYLE-LONG-FUNCTION: Function '_check_oauth' spans 76 lines (>60); extract focused helpers. (Verified | Confidence: 92%)
- Location:
core/switch_core/connections/loader.py:1066| Evidence IDs: EV-021, EV-022 - Sources: Style Agent (ast-complexity)
- Evidence:
Function '_check_oauth' spans 76 lines (>60); extract focused helpers. - Recommendation: Resolve deterministic lint, syntax, or dead-code violation locally.
16. [Medium] STYLE-COMPLEXITY: Function '_load_skill' has high branch complexity (11 branch nodes). (Verified | Confidence: 92%)
- Location:
core/switch_core/connections/loader.py:1236| Evidence IDs: EV-013 - Sources: Style Agent (ast-complexity)
- Evidence:
Function '_load_skill' has high branch complexity (11 branch nodes). - Recommendation: Resolve deterministic lint, syntax, or dead-code violation locally.
17. [Medium] load_catalog has deep nesting (depth 4) and 13 branches (Verified | Confidence: 92%)
- Location:
core/switch_core/connections/loader.py:1295| Evidence IDs: EV-015, EV-014 - Sources: Style Agent (ast-complexity)
- Evidence:
Function 'load_catalog' has deep control-flow nesting (depth=4); use early returns. - Recommendation: Extract the per-catalog parse step into a helper that returns a
(definition, problems)tuple and usecontinue-style early returns to flatten the loop. Keepload_catalogas the driver that merely collects results.
18. [Medium] list_service_connections is a 141-line function (Verified | Confidence: 92%)
- Location:
core/switch_core/gateway/service_connections.py:114| Evidence IDs: EV-006 - Sources: Style Agent (llm-review), Style Agent (ast-complexity)
- Evidence:
Function 'list_service_connections' spans 141 lines (>60); extract focused helpers. - Recommendation: Extract response-shaping into focused helpers (e.g.
_connection_summary(...)and_field(field)already exists — pull other inline dict builders out) solist_service_connectionsonly orchestrates retrieval and serialization.
19. [Medium] service_in_workspace is a 76-line authorization function (Verified | Confidence: 92%)
- Location:
core/switch_core/gateway/service_connections.py:337| Evidence IDs: EV-007 - Sources: Style Agent (llm-review), Style Agent (ast-complexity)
- Evidence:
Function 'service_in_workspace' spans 76 lines (>60); extract focused helpers. - Recommendation: Split the membership resolution from the membership test so the predicate reads as a small sequence of guarded returns; keep any deny-by-default behavior explicit and near the top.
20. [Medium] STYLE-LONG-FUNCTION: Function 'test_the_shipped_google_entry_signs_in_and_runs_gws_as_the_spike_found (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/test_loader.py:94| Evidence IDs: EV-024, EV-025 - Sources: Style Agent (ast-complexity)
- Evidence:
Function 'test_the_shipped_google_entry_signs_in_and_runs_gws_as_the_spike_found_it_must' spans 81 lines (>60); extract focused helpers. - Recommendation: Resolve deterministic lint, syntax, or dead-code violation locally.
21. [Medium] Untested changed module gateway/src/assets/connections/snowflake.svg (Verified | Confidence: 85%)
- Location:
gateway/src/assets/connections/snowflake.svg:1| Evidence IDs: EV-493 - Sources: Test-Coverage Agent (test-mapper)
- Evidence:
{"direct_tests":[],"indirect_importing_tests":[],"mocked_only_in_tests":[],"has_any_unmocked_test":false,"coverage_status":"no_importing_tests_found"} - Recommendation: Add unit tests exercising error and boundary branches for this module.
22. [Low] Overlong line in ConnectionIcon SVG fallback path (Verified | Confidence: 92%)
- Location:
console/apps/switch-console-desktop/src/renderer/features/switch-servers/connection-icon.tsx:71| Evidence IDs: EV-008 - Sources: Style Agent (ast-style-checker)
- Evidence:
1 line(s) exceed 120 characters (first at line 71). - Recommendation: Wrap the long expression onto multiple lines or extract a small constant so the file stays under the 120-char limit.
23. [Low] Overlong line in service-key-step renderer (Verified | Confidence: 92%)
- Location:
console/apps/switch-console-desktop/src/renderer/features/switch-servers/service-key-step.tsx:105| Evidence IDs: EV-009 - Sources: Style Agent (ast-style-checker)
- Evidence:
1 line(s) exceed 120 characters (first at line 105). - Recommendation: Reformat the offending line (multi-line JSX props or extracted helper) to satisfy the 120-char rule.
24. [Low] STYLE-LINE-LEN: 1 line(s) exceed 120 characters (first at line 192). (Verified | Confidence: 92%)
- Location:
console/apps/switch-console-desktop/src/renderer/tests/browser/service-key-step.test.tsx:192| Evidence IDs: EV-023 - Sources: Style Agent (ast-style-checker)
- Evidence:
1 line(s) exceed 120 characters (first at line 192). - Recommendation: Resolve deterministic lint, syntax, or dead-code violation locally.
25. [Low] STYLE-DUPLICATION: Duplicated 6+ line code block matching console/apps/switch-console-desktop/src/r (Verified | Confidence: 92%)
- Location:
console/apps/switch-console-desktop/src/renderer/tests/browser/service-key-step.test.tsx:328| Evidence IDs: EV-029, EV-030, EV-031 - Sources: Style Agent (duplicate-detector)
- Evidence:
Duplicated 6+ line code block matching console/apps/switch-console-desktop/src/renderer/tests/browser/service-key-step.test.tsx:120. - Recommendation: Resolve deterministic lint, syntax, or dead-code violation locally.
26. [Low] STYLE-DUPLICATION: Duplicated 6+ line code block matching console/apps/switch-console-desktop/src/r (Verified | Confidence: 92%)
- Location:
console/apps/switch-console-desktop/src/renderer/tests/browser/service-key-step.test.tsx:329| Evidence IDs: EV-029, EV-030, EV-031 - Sources: Style Agent (duplicate-detector)
- Evidence:
Duplicated 6+ line code block matching console/apps/switch-console-desktop/src/renderer/tests/browser/service-key-step.test.tsx:121. - Recommendation: Resolve deterministic lint, syntax, or dead-code violation locally.
27. [Low] STYLE-DUPLICATION: Duplicated 6+ line code block matching console/apps/switch-console-desktop/src/r (Verified | Confidence: 92%)
- Location:
console/apps/switch-console-desktop/src/renderer/tests/browser/service-key-step.test.tsx:330| Evidence IDs: EV-029, EV-030, EV-031 - Sources: Style Agent (duplicate-detector)
- Evidence:
Duplicated 6+ line code block matching console/apps/switch-console-desktop/src/renderer/tests/browser/service-key-step.test.tsx:122. - Recommendation: Resolve deterministic lint, syntax, or dead-code violation locally.
28. [Low] STYLE-DUPLICATION: Duplicated 6+ line code block matching console/apps/switch-console-desktop/src/s (Verified | Confidence: 92%)
- Location:
console/apps/switch-console-desktop/src/shared/core/switch-servers/connection-catalog.ts:221| Evidence IDs: EV-027, EV-028 - Sources: Style Agent (duplicate-detector)
- Evidence:
Duplicated 6+ line code block matching console/apps/switch-console-desktop/src/shared/core/switch-servers/connection-catalog.ts:100. - Recommendation: Resolve deterministic lint, syntax, or dead-code violation locally.
29. [Low] STYLE-DUPLICATION: Duplicated 6+ line code block matching console/apps/switch-console-desktop/src/s (Verified | Confidence: 92%)
- Location:
console/apps/switch-console-desktop/src/shared/core/switch-servers/connection-catalog.ts:222| Evidence IDs: EV-027, EV-028 - Sources: Style Agent (duplicate-detector)
- Evidence:
Duplicated 6+ line code block matching console/apps/switch-console-desktop/src/shared/core/switch-servers/connection-catalog.ts:101. - Recommendation: Resolve deterministic lint, syntax, or dead-code violation locally.
30. [Low] Hardcoded Password String (Verified | Confidence: 92%)
- Location:
core/switch_core/connections/loader.py:87| Evidence IDs: EV-042 - Sources: Security Agent (bandit)
- Evidence:
86 # fields: the whole token, as an OAuth entry's servers take it. 87 TOKEN_PLACEHOLDER = "token" 88 - Recommendation: Possible hardcoded password: 'token'
31. [Low] Unused private helper _pattern_is_plain after placement-based validation refactor (Verified | Confidence: 70%)
- Location:
core/switch_core/connections/loader.py:128| Evidence IDs: EV-001 - Sources: Style Agent (dead-code-analyzer)
- Evidence:
def _pattern_is_plain(pattern: str) -> bool: # reported unreferenced by dead-code-analyzer - Recommendation: Confirm no cross-module import references it (grep
_pattern_is_plainrepo-wide). If truly unused, delete it; if validation still needs it, wire it into the pattern check rather than duplicating logic in the adapter.
32. [Low] Overlong line in loader pattern handling (Verified | Confidence: 92%)
- Location:
core/switch_core/connections/loader.py:730| Evidence IDs: EV-010 - Sources: Style Agent (ast-style-checker)
- Evidence:
1 line(s) exceed 120 characters (first at line 730). - Recommendation: Wrap the long expression (e.g. split a chained call or raise message) to keep it under 120 characters.
33. [Low] service_connections.py module has high import coupling (17 imports) (Verified | Confidence: 92%)
- Location:
core/switch_core/gateway/service_connections.py:1| Evidence IDs: EV-005 - Sources: Style Agent (ast-complexity)
- Evidence:
High module coupling (17 import statements); consider splitting responsibilities. - Recommendation: Separate serialization (
_field, response shaping) from access-control (service_in_workspace) and data retrieval into distinct modules; keep the gateway module thin over the loader/adapter layer.
34. [Low] Hardcoded Password String (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_api_key.py:37| Evidence IDs: EV-043 - Sources: Security Agent (bandit)
- Evidence:
36 "fields": [ 37 {"name": "api_key", "label": "User key", "secret": True}, 38 { - Recommendation: Possible hardcoded password: 'True'
35. [Low] Hardcoded Password String (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_api_key.py:41| Evidence IDs: EV-044 - Sources: Security Agent (bandit)
- Evidence:
40 "label": "Region", 41 "secret": False, 42 "choices": ["us.example.test", "eu.example.test"], 43 }, 44 ], 45 "identity": { 46 - Recommendation: Possible hardcoded password: 'False'
36. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_api_key.py:89| Evidence IDs: EV-045, EV-046, EV-047 - Sources: Security Agent (bandit)
- Evidence:
88 89 assert (identity.account_id, identity.label) == ("42", "ada@example.test") 90 [request] = seen - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
37. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_api_key.py:91| Evidence IDs: EV-045, EV-046, EV-047, EV-048, EV-049 - Sources: Security Agent (bandit)
- Evidence:
90 [request] = seen 91 assert request.method == "POST" 92 assert str(request.url) == "https://api.eu.example.test/graphql" - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
38. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_api_key.py:92| Evidence IDs: EV-045, EV-046, EV-047, EV-048, EV-049 - Sources: Security Agent (bandit)
- Evidence:
91 assert request.method == "POST" 92 assert str(request.url) == "https://api.eu.example.test/graphql" 93 assert request.headers["API-Key"] == "SYNTHETIC-USER-KEY" - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
39. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_api_key.py:93| Evidence IDs: EV-046, EV-047, EV-048, EV-049 - Sources: Security Agent (bandit)
- Evidence:
92 assert str(request.url) == "https://api.eu.example.test/graphql" 93 assert request.headers["API-Key"] == "SYNTHETIC-USER-KEY" 94 assert json.loads(request.content) == {"query": "{ actor { user { id email } } }"} - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
40. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_api_key.py:94| Evidence IDs: EV-046, EV-047, EV-048, EV-049 - Sources: Security Agent (bandit)
- Evidence:
93 assert request.headers["API-Key"] == "SYNTHETIC-USER-KEY" 94 assert json.loads(request.content) == {"query": "{ actor { user { id email } } }"} 95 - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
41. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_api_key.py:107| Evidence IDs: EV-050 - Sources: Security Agent (bandit)
- Evidence:
106 await adapter.identify(FIELDS) 107 assert not isinstance(raised.value, InvalidKeyError) 108 - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
42. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_api_key.py:112| Evidence IDs: EV-051, EV-052, EV-053 - Sources: Security Agent (bandit)
- Evidence:
111 sign_in = ConnectionDefinition.model_validate(ENTRY).auth.api_key 112 assert sign_in is not None 113 token = key_token(sign_in, FIELDS) - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
43. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_api_key.py:114| Evidence IDs: EV-051, EV-052, EV-053 - Sources: Security Agent (bandit)
- Evidence:
113 token = key_token(sign_in, FIELDS) 114 assert " " not in token 115 assert json.loads(token) == { - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
44. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_api_key.py:115| Evidence IDs: EV-051, EV-052, EV-053 - Sources: Security Agent (bandit)
- Evidence:
114 assert " " not in token 115 assert json.loads(token) == { 116 "secret": {"api_key": "SYNTHETIC-USER-KEY"}, 117 "public": {"region": "eu.example.test"}, 118 } 119 assert ( - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
45. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_api_key.py:119| Evidence IDs: EV-054 - Sources: Security Agent (bandit)
- Evidence:
118 } 119 assert ( 120 render("https://mcp.{region}/mcp", FIELDS) == "https://mcp.eu.example.test/mcp" 121 ) 122 - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
46. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_api_key.py:126| Evidence IDs: EV-055 - Sources: Security Agent (bandit)
- Evidence:
125 adapter = _adapter(lambda request: httpx.Response(200)) 126 assert adapter.choices(FIELDS) == {"region": "eu.example.test"} 127 - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
47. [Low] Hardcoded Password String (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_api_key.py:135| Evidence IDs: EV-056 - Sources: Security Agent (bandit)
- Evidence:
134 "fields": [ 135 {"name": "api_key", "label": "User key", "secret": True}, 136 { - Recommendation: Possible hardcoded password: 'True'
48. [Low] Hardcoded Password String (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_api_key.py:139| Evidence IDs: EV-057 - Sources: Security Agent (bandit)
- Evidence:
138 "label": "Account", 139 "secret": False, 140 # Looser than a DNS label, so the adapter's own check shows. 141 "pattern": "[A-Za-z0-9._@/-]+", 142 - Recommendation: Possible hardcoded password: 'False'
49. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_api_key.py:178| Evidence IDs: EV-058 - Sources: Security Agent (bandit)
- Evidence:
177 ) 178 assert values["account"] == "acme-eu" 179 - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
50. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_api_key.py:233| Evidence IDs: EV-059 - Sources: Security Agent (bandit)
- Evidence:
232 identity = await _rpc_adapter(answer).identify(FIELDS) 233 assert identity.label == "Example key · eu.example.test" 234 - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
51. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_api_key.py:250| Evidence IDs: EV-060 - Sources: Security Agent (bandit)
- Evidence:
249 await _rpc_adapter(answer).identify(FIELDS) 250 assert str(raised.value) == ( 251 "Example did not accept the key and settings: " 252 "Server X does not exist or not authorized." 253 ) 254 - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
52. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_api_key.py:270| Evidence IDs: EV-061, EV-062 - Sources: Security Agent (bandit)
- Evidence:
269 adapter = _adapter(lambda request: httpx.Response(200)) 270 assert adapter.can_issue is False 271 key = adapter.secret(FIELDS).access_token - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
53. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_api_key.py:272| Evidence IDs: EV-061, EV-062 - Sources: Security Agent (bandit)
- Evidence:
271 key = adapter.secret(FIELDS).access_token 272 assert key is not None 273 with pytest.raises(ServiceAdapterError, match="never handed to an agent"): - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
54. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_snowflake.py:81| Evidence IDs: EV-063, EV-064 - Sources: Security Agent (bandit)
- Evidence:
80 # Snowflake names no user here, so the account is the token itself. 81 assert len(identity.account_id) == 64 82 assert identity.label == ( - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
55. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_snowflake.py:82| Evidence IDs: EV-063, EV-064 - Sources: Security Agent (bandit)
- Evidence:
81 assert len(identity.account_id) == 64 82 assert identity.label == ( 83 "Snowflake key · exampleorg-example1 · SALES · MCP · ANALYTICS_MCP" 84 ) 85 [request] = snowflake.requests - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
56. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_snowflake.py:86| Evidence IDs: EV-065, EV-066 - Sources: Security Agent (bandit)
- Evidence:
85 [request] = snowflake.requests 86 assert request.method == "POST" 87 assert str(request.url) == ( - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
57. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_snowflake.py:87| Evidence IDs: EV-065, EV-066 - Sources: Security Agent (bandit)
- Evidence:
86 assert request.method == "POST" 87 assert str(request.url) == ( 88 "https://exampleorg-example1.snowflakecomputing.com/api/v2/databases/SALES" 89 "/schemas/MCP/mcp-servers/ANALYTICS_MCP" 90 ) 91 assert req - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
58. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_snowflake.py:91| Evidence IDs: EV-067, EV-068 - Sources: Security Agent (bandit)
- Evidence:
90 ) 91 assert request.headers["Authorization"] == "Bearer SYNTHETIC-SNOWFLAKE-TOKEN" 92 assert json.loads(request.content) == { - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
59. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_snowflake.py:92| Evidence IDs: EV-067, EV-068 - Sources: Security Agent (bandit)
- Evidence:
91 assert request.headers["Authorization"] == "Bearer SYNTHETIC-SNOWFLAKE-TOKEN" 92 assert json.loads(request.content) == { 93 "jsonrpc": "2.0", 94 "id": 1, 95 "method": "tools/list", 96 "params": {}, - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
60. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_snowflake.py:117| Evidence IDs: EV-069 - Sources: Security Agent (bandit)
- Evidence:
116 await _adapter(snowflake).identify({**FIELDS, "server": "NO_SUCH_SERVER"}) 117 assert str(raised.value) == ( 118 "Snowflake did not accept the key and settings: MCP server " 119 "SALES.MCP.NO_SUCH_SERVER does - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
61. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_snowflake.py:143| Evidence IDs: EV-070 - Sources: Security Agent (bandit)
- Evidence:
142 _adapter(snowflake).checked_fields({**FIELDS, field: value}) 143 assert snowflake.requests == [] 144 - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
62. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_snowflake.py:151| Evidence IDs: EV-071 - Sources: Security Agent (bandit)
- Evidence:
150 ) 151 assert values["server"] == "analytics_mcp" 152 - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
63. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/adapters/test_snowflake.py:159| Evidence IDs: EV-072 - Sources: Security Agent (bandit)
- Evidence:
158 await adapter.revoke_connection(adapter.secret(FIELDS), "keys") 159 assert snowflake.requests == [] - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
64. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/test_loader.py:32| Evidence IDs: EV-073 - Sources: Security Agent (bandit)
- Evidence:
31 def test_shipped_catalog_enables_its_live_connectors(): 32 assert set(CATALOG) == PLACEHOLDERS | { 33 "github", 34 "airtable", 35 "atlassian", 36 "datadog", 37 "google-workspace", 38 "g - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
65. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/test_loader.py:44| Evidence IDs: EV-074 - Sources: Security Agent (bandit)
- Evidence:
43 } 44 assert [slug for slug, entry in CATALOG.items() if entry.definition.enabled] == [ 45 "airtable", 46 "atlassian", 47 "datadog", 48 "github", 49 "gitlab", 50 "google-workspace", - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
66. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/test_loader.py:56| Evidence IDs: EV-075, EV-076, EV-077, EV-078 - Sources: Security Agent (bandit)
- Evidence:
55 ] 56 assert all(not CATALOG[slug].skill_files for slug in PLACEHOLDERS) 57 assert "SKILL.md" in CATALOG["github"].skill_files - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
67. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/test_loader.py:57| Evidence IDs: EV-075, EV-076, EV-077, EV-078, EV-079 - Sources: Security Agent (bandit)
- Evidence:
56 assert all(not CATALOG[slug].skill_files for slug in PLACEHOLDERS) 57 assert "SKILL.md" in CATALOG["github"].skill_files 58 assert "SKILL.md" in CATALOG["airtable"].skill_files - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
68. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/test_loader.py:58| Evidence IDs: EV-075, EV-076, EV-077, EV-078, EV-079 - Sources: Security Agent (bandit)
- Evidence:
57 assert "SKILL.md" in CATALOG["github"].skill_files 58 assert "SKILL.md" in CATALOG["airtable"].skill_files 59 assert "SKILL.md" in CATALOG["atlassian"].skill_files - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
69. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/test_loader.py:59| Evidence IDs: EV-075, EV-076, EV-077, EV-078, EV-079 - Sources: Security Agent (bandit)
- Evidence:
58 assert "SKILL.md" in CATALOG["airtable"].skill_files 59 assert "SKILL.md" in CATALOG["atlassian"].skill_files 60 assert "SKILL.md" in CATALOG["datadog"].skill_files - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
70. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/test_loader.py:60| Evidence IDs: EV-076, EV-077, EV-078, EV-079, EV-080 - Sources: Security Agent (bandit)
- Evidence:
59 assert "SKILL.md" in CATALOG["atlassian"].skill_files 60 assert "SKILL.md" in CATALOG["datadog"].skill_files 61 assert "SKILL.md" in CATALOG["google-workspace"].skill_files - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
71. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/test_loader.py:61| Evidence IDs: EV-077, EV-078, EV-079, EV-080, EV-081 - Sources: Security Agent (bandit)
- Evidence:
60 assert "SKILL.md" in CATALOG["datadog"].skill_files 61 assert "SKILL.md" in CATALOG["google-workspace"].skill_files 62 assert "SKILL.md" in CATALOG["gitlab"].skill_files - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
72. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/test_loader.py:62| Evidence IDs: EV-078, EV-079, EV-080, EV-081, EV-082 - Sources: Security Agent (bandit)
- Evidence:
61 assert "SKILL.md" in CATALOG["google-workspace"].skill_files 62 assert "SKILL.md" in CATALOG["gitlab"].skill_files 63 assert "SKILL.md" in CATALOG["notion"].skill_files - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
73. [Low] Assert Used (Verified | Confidence: 92%)
- Location:
core/tests/switch_core/connections/test_loader.py:63| Evidence IDs: EV-079, EV-080, EV-081, EV-082, EV-083 - Sources: Security Agent (bandit)
- Evidence:
62 assert "SKILL.md" in CATALOG["gitlab"].skill_files 63 assert "SKILL.md" in CATALOG["notion"].skill_files 64 assert "SKILL.md" in CATALOG["sentry"].skill_files - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
74. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:64| Evidence IDs: EV-080, EV-081, EV-082, EV-083, EV-084 - Sources: Security Agent (bandit)
- Evidence:
63 assert "SKILL.md" in CATALOG["notion"].skill_files 64 assert "SKILL.md" in CATALOG["sentry"].skill_files 65 assert "SKILL.md" in CATALOG["linear"].skill_files - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
75. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:65| Evidence IDs: EV-081, EV-082, EV-083, EV-084, EV-085 - Sources: Security Agent (bandit)
- Evidence:
64 assert "SKILL.md" in CATALOG["sentry"].skill_files 65 assert "SKILL.md" in CATALOG["linear"].skill_files 66 assert "SKILL.md" in CATALOG["snowflake"].skill_files - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
76. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:66| Evidence IDs: EV-082, EV-083, EV-084, EV-085 - Sources: Security Agent (bandit)
- Evidence:
65 assert "SKILL.md" in CATALOG["linear"].skill_files 66 assert "SKILL.md" in CATALOG["snowflake"].skill_files 67 - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
77. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:73| Evidence IDs: EV-086, EV-087 - Sources: Security Agent (bandit)
- Evidence:
72 if definition.enabled: 73 assert definition.publisher, slug 74 assert definition.links is not None, slug - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
78. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:74| Evidence IDs: EV-086, EV-087 - Sources: Security Agent (bandit)
- Evidence:
73 assert definition.publisher, slug 74 assert definition.links is not None, slug 75 - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
79. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:91| Evidence IDs: EV-088 - Sources: Security Agent (bandit)
- Evidence:
90 continue 91 assert set(identity.arguments.values()) <= SELF_REFERENCES, slug 92 - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
80. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:97| Evidence IDs: EV-089, EV-090 - Sources: Security Agent (bandit)
- Evidence:
96 oauth = definition.auth.oauth 97 assert oauth is not None 98 assert (definition.adapter, oauth.registration, oauth.redirect) == ( - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
81. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:98| Evidence IDs: EV-089, EV-090 - Sources: Security Agent (bandit)
- Evidence:
97 assert oauth is not None 98 assert (definition.adapter, oauth.registration, oauth.redirect) == ( 99 "oauth", 100 "static", 101 ["core"], 102 ) 103 assert oauth.client_settings == "GOOGLE_WORKSPACE" - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
82. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:103| Evidence IDs: EV-091, EV-092 - Sources: Security Agent (bandit)
- Evidence:
102 ) 103 assert oauth.client_settings == "GOOGLE_WORKSPACE" 104 # A refresh token comes only with offline access, and again on a later - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
83. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:106| Evidence IDs: EV-091, EV-092, EV-093, EV-094 - Sources: Security Agent (bandit)
- Evidence:
105 # sign-in only when consent is asked for. 106 assert oauth.authorization_params == {"access_type": "offline"} 107 assert oauth.prompt == "consent select_account" - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
84. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:107| Evidence IDs: EV-092, EV-093, EV-094, EV-095 - Sources: Security Agent (bandit)
- Evidence:
106 assert oauth.authorization_params == {"access_type": "offline"} 107 assert oauth.prompt == "consent select_account" 108 assert oauth.revocation_url == "https://oauth2.googleapis.com/revoke" - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
85. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:108| Evidence IDs: EV-092, EV-093, EV-094, EV-095 - Sources: Security Agent (bandit)
- Evidence:
107 assert oauth.prompt == "consent select_account" 108 assert oauth.revocation_url == "https://oauth2.googleapis.com/revoke" 109 # Google revokes the whole grant, so a reconnect keeps the old sign-in. - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
86. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:110| Evidence IDs: EV-093, EV-094, EV-095, EV-096 - Sources: Security Agent (bandit)
- Evidence:
109 # Google revokes the whole grant, so a reconnect keeps the old sign-in. 110 assert oauth.revocation_ends_grant is True 111 # Revoking the sign-in ends the access tokens agents were given too. - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
87. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:112| Evidence IDs: EV-095, EV-096, EV-097, EV-098 - Sources: Security Agent (bandit)
- Evidence:
111 # Revoking the sign-in ends the access tokens agents were given too. 112 assert oauth.revocation_ends_tokens is True 113 # Google refuses a made-up code before comparing the redirect URI. - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
88. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:114| Evidence IDs: EV-096, EV-097, EV-098, EV-099, EV-100 - Sources: Security Agent (bandit)
- Evidence:
113 # Google refuses a made-up code before comparing the redirect URI. 114 assert oauth.unchecked is not None and "redirect URI" in oauth.unchecked 115 assert definition.auth.refresh == "reusable" - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
89. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:115| Evidence IDs: EV-096, EV-097, EV-098, EV-099, EV-100 - Sources: Security Agent (bandit)
- Evidence:
114 assert oauth.unchecked is not None and "redirect URI" in oauth.unchecked 115 assert definition.auth.refresh == "reusable" 116 assert definition.auth.identity is not None - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
90. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:116| Evidence IDs: EV-097, EV-098, EV-099, EV-100 - Sources: Security Agent (bandit)
- Evidence:
115 assert definition.auth.refresh == "reusable" 116 assert definition.auth.identity is not None 117 assert (definition.auth.identity.account_id, definition.auth.identity.label) == ( - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
91. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:117| Evidence IDs: EV-097, EV-098, EV-099, EV-100 - Sources: Security Agent (bandit)
- Evidence:
116 assert definition.auth.identity is not None 117 assert (definition.auth.identity.account_id, definition.auth.identity.label) == ( 118 "sub", 119 "email", 120 ) 121 assert definition.token is not None - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
92. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:121| Evidence IDs: EV-101, EV-102 - Sources: Security Agent (bandit)
- Evidence:
120 ) 121 assert definition.token is not None 122 # Google's tokens live under an hour; one handed out never has more left. - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
93. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:123| Evidence IDs: EV-101, EV-102 - Sources: Security Agent (bandit)
- Evidence:
122 # Google's tokens live under an hour; one handed out never has more left. 123 assert (definition.token.kind, definition.token.max_lifetime) == ( 124 "pass_through", 125 3600, 126 ) 127 access = definition - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
94. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:128| Evidence IDs: EV-103 - Sources: Security Agent (bandit)
- Evidence:
127 access = definition.access 128 assert access is not None and access.write is not None 129 read = set(access.read.scopes or []) - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
95. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:132| Evidence IDs: EV-104, EV-105, EV-106, EV-107 - Sources: Security Agent (bandit)
- Evidence:
131 # Google answers with full scope URLs, which the level is read from. 132 assert {"openid", f"{GOOGLE}userinfo.email"} <= read < write 133 assert all(scope == "openid" or scope.startswith(GOOGLE) for scope in write) - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
96. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:133| Evidence IDs: EV-104, EV-105, EV-106, EV-107 - Sources: Security Agent (bandit)
- Evidence:
132 assert {"openid", f"{GOOGLE}userinfo.email"} <= read < write 133 assert all(scope == "openid" or scope.startswith(GOOGLE) for scope in write) 134 assert not any("gmail" in scope or "mail.google" in scope for scope in write) - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
97. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:134| Evidence IDs: EV-104, EV-105, EV-106, EV-107 - Sources: Security Agent (bandit)
- Evidence:
133 assert all(scope == "openid" or scope.startswith(GOOGLE) for scope in write) 134 assert not any("gmail" in scope or "mail.google" in scope for scope in write) 135 assert {scope.removeprefix(GOOGLE) for scope in write - read} - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
98. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:135| Evidence IDs: EV-104, EV-105, EV-106, EV-107 - Sources: Security Agent (bandit)
- Evidence:
134 assert not any("gmail" in scope or "mail.google" in scope for scope in write) 135 assert {scope.removeprefix(GOOGLE) for scope in write - read} == { 136 "drive", 137 "documents", 138 "spreadsheets", 139 - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
99. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:143| Evidence IDs: EV-108, EV-109 - Sources: Security Agent (bandit)
- Evidence:
142 cli = definition.cli 143 assert cli is not None and definition.mcp is None 144 assert (cli.binary, cli.token_env, cli.config_env) == ( - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
100. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:144| Evidence IDs: EV-108, EV-109 - Sources: Security Agent (bandit)
- Evidence:
143 assert cli is not None and definition.mcp is None 144 assert (cli.binary, cli.token_env, cli.config_env) == ( 145 "gws", 146 "GOOGLE_WORKSPACE_CLI_TOKEN", 147 "GOOGLE_WORKSPACE_CLI_CONFIG_DIR", 148 ) - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
101. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:149| Evidence IDs: EV-110, EV-111, EV-112, EV-113 - Sources: Security Agent (bandit)
- Evidence:
148 ) 149 assert cli.allow == ["drive", "docs", "sheets", "slides", "calendar", "schema"] 150 assert {"auth", "gmail", "--api-version", "--sanitize"} <= set(cli.deny) - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
102. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:150| Evidence IDs: EV-110, EV-111, EV-112, EV-113 - Sources: Security Agent (bandit)
- Evidence:
149 assert cli.allow == ["drive", "docs", "sheets", "slides", "calendar", "schema"] 150 assert {"auth", "gmail", "--api-version", "--sanitize"} <= set(cli.deny) 151 assert cli.path_flags == {"--upload": "read", "--output": "writ - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
103. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:151| Evidence IDs: EV-110, EV-111, EV-112, EV-113 - Sources: Security Agent (bandit)
- Evidence:
150 assert {"auth", "gmail", "--api-version", "--sanitize"} <= set(cli.deny) 151 assert cli.path_flags == {"--upload": "read", "--output": "write", "-o": "write"} 152 assert [(arg.after, arg.direction) for arg in cli.path_args] - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
104. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:152| Evidence IDs: EV-110, EV-111, EV-112, EV-113, EV-114 - Sources: Security Agent (bandit)
- Evidence:
151 assert cli.path_flags == {"--upload": "read", "--output": "write", "-o": "write"} 152 assert [(arg.after, arg.direction) for arg in cli.path_args] == [ 153 ("+upload", "read") 154 ] 155 assert ( - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
105. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:155| Evidence IDs: EV-113, EV-114 - Sources: Security Agent (bandit)
- Evidence:
154 ] 155 assert ( 156 cli.token_refused.exit_code, 157 cli.token_refused.json_path, 158 cli.token_refused.value, 159 ) == (1, "error.code", 401) 160 assert cli.release.version == "0.22.5" - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
106. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:160| Evidence IDs: EV-115, EV-116 - Sources: Security Agent (bandit)
- Evidence:
159 ) == (1, "error.code", 401) 160 assert cli.release.version == "0.22.5" 161 assert sorted(cli.release.targets) == [ - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
107. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:161| Evidence IDs: EV-115, EV-116 - Sources: Security Agent (bandit)
- Evidence:
160 assert cli.release.version == "0.22.5" 161 assert sorted(cli.release.targets) == [ 162 "darwin-arm64", 163 "darwin-x64", 164 "linux-arm64", 165 "linux-x64", 166 "win32-x64", 167 ] 168 - Recommendation: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
108. [Low] Assert Used (Verified | Confidence: 95%)
- Location:
core/tests/switch_core/connections/test_loader.py:169| **Evide
8 of 9 tasks
kittu181707
force-pushed
the
feat/snowflake-connector
branch
6 times, most recently
from
November 18, 2026 00:56
9f86ca2 to
9746370
Compare
kittu181707
force-pushed
the
feat/snowflake-connector
branch
27 times, most recently
from
November 30, 2026 16:48
73dda3b to
8b2b6f6
Compare
kittu181707
force-pushed
the
feat/snowflake-connector
branch
from
December 2, 2026 17:27
8b2b6f6 to
7928f76
Compare
Add the Snowflake connector catalog entry, skill, and logo asset on the api_key adapter, marked as unavailable (key_never_expires) per maintainer decision Option (a). Support pattern-validated non-secret ApiKeyField variants in URLs with strict host label and path segment placement rules, and verify JSON-RPC error responses via identity.requires.
kittu181707
force-pushed
the
feat/snowflake-connector
branch
from
December 6, 2026 02:18
7928f76 to
733c2a1
Compare
This branch has not been deployed
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.
What this changes
Adds a Snowflake entry and skill, using a personal access token on the
api_keyadapter. As Petr decided on #840 (option a), the card shows as unavailable (key_never_expires), like Datadog.Key implementation details:
ApiKeyFieldvariants in URLs. Enforces strictHOST_LABEL_REandPATH_SEGMENT_REvalidation to ensure fields can only occupy a complete host label or path segment, preventing host spoofing and path traversal.identity.requiresand_refusalhandling inapi_key.py. When Snowflake Cortex MCP endpoints return HTTP 200 with a JSON-RPC error payload (e.g. non-existent server or unauthorized role), the error message is extracted cleanly intoInvalidKeyError.Closes #840
How it was tested
just check,just typecheck, and console typecheck are clean.test_snowflake.py, 14 tests) exercises sign-in, valid and invalid field combinations, identity resolution, and JSON-RPC error extraction.test_api_key.py, 17 tests) verify pattern enforcement, boundary checks, and rejection of malformed inputs.key_never_expires.