Improve Python bindings code quality (Codacy/Bandit cleanup) - #4084
Conversation
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Documentation | 7 minor |
| Security | 1 critical 7 high |
| CodeStyle | 1 minor |
🟢 Metrics 5 complexity
Metric Results Complexity 5
🟢 Coverage ∅ diff coverage · -8.25% coverage variation
Metric Results Coverage variation ✅ -8.25% coverage variation Diff coverage ✅ ∅ diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (1dc68da) 124062 91858 74.04% Head commit (f365c8c) 155463 (+31401) 102280 (+10422) 65.79% (-8.25%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#4084) 0 0 ∅ (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Code Review
This pull request implements a comprehensive security hardening of the Python bindings, addressing numerous Bandit findings across the source code, tests, and examples. Key changes include enforcing HTTPS for external data downloads, parameterizing SQL queries to mitigate injection risks, and replacing silent exception suppression with structured logging or narrowed exception handling. The default server host has been updated to localhost for improved security, and a detailed implementation plan for these fixes has been added to the documentation. Feedback suggests extending the host check in server.py to include the IPv6 'all interfaces' address (::) for consistency.
Code Review - PR #4084: Python Bindings Codacy/Bandit CleanupOverall this is a well-structured security cleanup. The changes are logically organized, the Issues1. Plan document should not be committed to the repository
2. uses: actions/setup-python@v5 # floating tagThe existing 3. Breaking change in Changing the default from 4. The same function body is copy-pasted into 5. assert server._config.get("host", "localhost") == "localhost"
6. In {select_statement}
""" # nosec B608Bandit flags the line containing the SQL pattern, not the closing delimiter. The Minor Notes
What's Good
The plan document and unpinned action are the blockers. The rest are improvements but can be addressed in a follow-up if preferred. |
- server.py: drop unused log_swallowed_exception import / _LOGGER (caught by pylint W0611, surfaced via Codacy UnusedCode finding) - server.py: extend host whitelist to IPv6 "::" so Studio URL is rewritten to localhost when bound on either IPv4 or IPv6 all-interfaces address - server.py: document default-host change in ArcadeDBServer.__init__ docstring (no CHANGELOG.md exists in this repo) - test_server.py: drop _config private-state assertion; rely on the publicly-observable get_studio_url() composition instead - test-python-bindings.yml: SHA-pin actions/setup-python to match the rest of the workflow's pinning convention; pin bandit==1.9.4 for reproducible scans
|
Thanks for the review. Walking through each item with verification before implementing: Addressed in b35f8c7Issue 2 - SHA-pin Issue 3 - Document the breaking change: Done. There is no Issue 5 - Test private state: Done. Dropped the Minor (Bandit version): Pinned Codacy Gemini IPv6 suggestion: Applied. Pushing backIssue 1 - Plan doc shouldn't be committed: This repo has an established convention of committing implementation plans to Issue 4 - DRY Issue 6 - Minor "conftest.py:719": That line number doesn't exist - Noted, not addressing this PRMinor (schema.py outer except): Could add a comment justifying the broader CI re-runs against b35f8c7. |
Code Review: Improve Python bindings code quality (Codacy/Bandit cleanup)Overall: This is a well-structured and well-motivated cleanup PR. The changes are genuine improvements: real security fixes in production code, better observability for swallowed exceptions, and a CI gate to prevent regression. The scope is large but the commits are logically organized. A few issues worth discussing before merge. Positives
Issues1.
|
| Category | Status |
|---|---|
| CI gate | Ready |
| Production logging helper | Ready |
| HTTPS enforcement | Ready |
SHA1 usedforsecurity=False |
Ready |
| TEST_PASSWORD centralization | Ready |
docs/superpowers/plans/ file |
Remove before merge |
| Default host breaking change | Needs explicit changelog note or deprecation |
| Narrowed except clauses | Discuss - may be too restrictive |
| IPv6 loopback URL guard | Minor - worth fixing |
| Benchmark nosec without rationale comment | Minor suggestion |
The core of this PR is solid. Removing the planning document and addressing the breaking-change visibility are the two things I would consider blockers.
Code Review - PR #4084: Improve Python bindings code quality (Codacy/Bandit cleanup)Overall this is a well-structured cleanup with clear intent and good commit organization. A few issues worth addressing before merge. OverviewThe PR eliminates 1192 Bandit findings across Issues1. Breaking change - default host silently changed
2. Plan document committed to source tree
3.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4084 +/- ##
==========================================
- Coverage 64.94% 64.55% -0.39%
==========================================
Files 1627 1627
Lines 124062 124062
Branches 26454 26454
==========================================
- Hits 80574 80094 -480
- Misses 32234 32823 +589
+ Partials 11254 11145 -109 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Replace try/except/pass (Bandit B110) with log_swallowed_exception so the suppressed error is observable at DEBUG level instead of being silently dropped.
# Python Bindings Codacy/Bandit Cleanup Implementation Plan > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. **Goal:** Eliminate the Bandit findings Codacy reports against `bindings/python/` (1192 issues across src/tests/examples) by fixing real defects in production code, parameterizing where practical in tests/examples, configuring Bandit to suppress test/example noise that is not actually unsafe, and wiring Bandit into the existing Python CI workflow as a quality gate. **Architecture:** Three-PR rollout. PR1 hardens the production library (`src/`) with no `# nosec` allowed except for documented false positives; adds a project-level Bandit config to `pyproject.toml`; and adds a `bandit` job to `.github/workflows/test-python-bindings.yml`. PR2 sweeps the test suite (move shared test password to `conftest.py`, parameterize SQL where reasonable, suppress idiomatic `assert`/`random` noise via configuration). PR3 sweeps `examples/` (one-character SHA1 fix using `usedforsecurity=False`, narrow targeted suppressions for educational SQL/subprocess usage).
Adds a parallel CI job that fails the build on any Bandit finding in the production source tree. Also fixes the exclude_dirs glob anchors in [tool.bandit] config so substring matches like 'build' don't accidentally exclude examples/11_vector_index_build.py.
Broadens the existing CI Bandit gate to scan tests/ alongside src/. Also fixes the [tool.bandit] config: bandit's pyproject.toml support doesn't honor [tool.bandit.assert_used].skips, so we use the global skips = ["B101"] form instead. B101 is the standard pytest idiom and src/ intentionally contains no asserts.
- server.py: drop unused log_swallowed_exception import / _LOGGER (caught by pylint W0611, surfaced via Codacy UnusedCode finding) - server.py: extend host whitelist to IPv6 "::" so Studio URL is rewritten to localhost when bound on either IPv4 or IPv6 all-interfaces address - server.py: document default-host change in ArcadeDBServer.__init__ docstring (no CHANGELOG.md exists in this repo) - test_server.py: drop _config private-state assertion; rely on the publicly-observable get_studio_url() composition instead - test-python-bindings.yml: SHA-pin actions/setup-python to match the rest of the workflow's pinning convention; pin bandit==1.9.4 for reproducible scans
The Python wrapper's _convert_args path only handles a single positional
? parameter (numpy/list rebinding); a multi-? command("sql", sql, i, vec)
dispatches to JPype as command(str, str, int, list) which has no Java
overload. Revert to embedded-literal SQL with # nosec B608 (annotated
with the rationale inline). DELETE keeps its single-param parameterization
since that is supported. Caught by test_vector_delete_and_search_others_sql
in CI.
4c28a1c to
f365c8c
Compare
Code Review - PR #4084: Improve Python Bindings Code Quality (Codacy/Bandit Cleanup)Summary: This PR cleans up Bandit security findings in Strengths
IssuesBreaking Change - Server Default Host (high impact)
Changing the default The docstring mentions "Earlier versions defaulted to
Plan Document Should Not Be in the Repo
This 1457-line file is an internal agentic implementation plan - it contains instructions like Version Drift Between CI and
|
(cherry picked from commit 0efd60a)
Bumps the github-actions group with 5 updates: | Package | From | To | | --- | --- | --- | | [zgosalvez/github-actions-ensure-sha-pinned-actions](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions) | `5.0.6` | `5.0.7` | | [anthropics/claude-code-action](https://github.com/anthropics/claude-code-action) | `1.0.187` | `1.0.192` | | [github/codeql-action/upload-sarif](https://github.com/github/codeql-action) | `4.37.6` | `4.37.7` | | [github/codeql-action/init](https://github.com/github/codeql-action) | `4.37.6` | `4.37.7` | | [github/codeql-action/analyze](https://github.com/github/codeql-action) | `4.37.6` | `4.37.7` | Updates `zgosalvez/github-actions-ensure-sha-pinned-actions` from 5.0.6 to 5.0.7 Release notes *Sourced from [zgosalvez/github-actions-ensure-sha-pinned-actions's releases](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/releases).* > v5.0.7 > ------ > > What's Changed > -------------- > > * Bump actions/setup-node from 6.4.0 to 7.0.0 by [`@dependabot`](https://github.com/dependabot)[bot] in [zgosalvez/github-actions-ensure-sha-pinned-actions#337](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/pull/337) > * Bump actions/checkout from 7.0.0 to 7.0.1 by [`@dependabot`](https://github.com/dependabot)[bot] in [zgosalvez/github-actions-ensure-sha-pinned-actions#336](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/pull/336) > * Bump zgosalvez/github-actions-get-action-runs-using-version from 3.0.2 to 3.0.3 by [`@dependabot`](https://github.com/dependabot)[bot] in [zgosalvez/github-actions-ensure-sha-pinned-actions#335](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/pull/335) > * Bump undici from 6.27.0 to 6.28.0 by [`@dependabot`](https://github.com/dependabot)[bot] in [zgosalvez/github-actions-ensure-sha-pinned-actions#338](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/pull/338) > * Fix by [`@zgosalvez`](https://github.com/zgosalvez) in [zgosalvez/github-actions-ensure-sha-pinned-actions#339](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/pull/339) > * Fix by [`@zgosalvez`](https://github.com/zgosalvez) in [zgosalvez/github-actions-ensure-sha-pinned-actions#340](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/pull/340) > * Fix by [`@zgosalvez`](https://github.com/zgosalvez) in [zgosalvez/github-actions-ensure-sha-pinned-actions#341](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/pull/341) > > **Full Changelog**: <zgosalvez/github-actions-ensure-sha-pinned-actions@v5...v5.0.7> Commits * [`c5fc58b`](zgosalvez/github-actions-ensure-sha-pinned-actions@c5fc58b) Fix ([#341](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/issues/341)) * [`c8f8804`](zgosalvez/github-actions-ensure-sha-pinned-actions@c8f8804) Fix ([#340](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/issues/340)) * [`5321e41`](zgosalvez/github-actions-ensure-sha-pinned-actions@5321e41) Fix ([#339](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/issues/339)) * [`e7e8129`](zgosalvez/github-actions-ensure-sha-pinned-actions@e7e8129) Bump undici from 6.27.0 to 6.28.0 ([#338](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/issues/338)) * [`84ca7d6`](zgosalvez/github-actions-ensure-sha-pinned-actions@84ca7d6) Bump zgosalvez/github-actions-get-action-runs-using-version ([#335](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/issues/335)) * [`eb88057`](zgosalvez/github-actions-ensure-sha-pinned-actions@eb88057) Bump actions/checkout from 7.0.0 to 7.0.1 ([#336](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/issues/336)) * [`a1ee078`](zgosalvez/github-actions-ensure-sha-pinned-actions@a1ee078) Bump actions/setup-node from 6.4.0 to 7.0.0 ([#337](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/issues/337)) * See full diff in [compare view](zgosalvez/github-actions-ensure-sha-pinned-actions@46cfe80...c5fc58b) Updates `anthropics/claude-code-action` from 1.0.187 to 1.0.192 Release notes *Sourced from [anthropics/claude-code-action's releases](https://github.com/anthropics/claude-code-action/releases).* > v1.0.192 > -------- > > What's Changed > -------------- > > * fix(mcp): paginate GitHub Actions results by [`@abhinavkr26104`](https://github.com/abhinavkr26104) in [anthropics/claude-code-action#1629](https://redirect.github.com/anthropics/claude-code-action/pull/1629) > * fix(summary): keep every text block in structured tool results by [`@Neal006`](https://github.com/Neal006) in [anthropics/claude-code-action#1619](https://redirect.github.com/anthropics/claude-code-action/pull/1619) > * fix(mcp): detect binary files by content instead of extension allowlist by [`@henriquepe`](https://github.com/henriquepe) in [anthropics/claude-code-action#1633](https://redirect.github.com/anthropics/claude-code-action/pull/1633) > > New Contributors > ---------------- > > * [`@abhinavkr26104`](https://github.com/abhinavkr26104) made their first contribution in [anthropics/claude-code-action#1629](https://redirect.github.com/anthropics/claude-code-action/pull/1629) > * [`@Neal006`](https://github.com/Neal006) made their first contribution in [anthropics/claude-code-action#1619](https://redirect.github.com/anthropics/claude-code-action/pull/1619) > * [`@henriquepe`](https://github.com/henriquepe) made their first contribution in [anthropics/claude-code-action#1633](https://redirect.github.com/anthropics/claude-code-action/pull/1633) > > **Full Changelog**: <anthropics/claude-code-action@v1.0.191...v1.0.192> > > v1.0.191 > -------- > > **Full Changelog**: <anthropics/claude-code-action@v1.0.190...v1.0.191> > > v1.0.190 > -------- > > **Full Changelog**: <anthropics/claude-code-action@v1...v1.0.190> > > v1.0.189 > -------- > > **Full Changelog**: <anthropics/claude-code-action@v1...v1.0.189> > > v1.0.188 > -------- > > What's Changed > -------------- > > * Enforce max-turn limits from claude\_args by [`@ulofiai`](https://github.com/ulofiai) in [anthropics/claude-code-action#1607](https://redirect.github.com/anthropics/claude-code-action/pull/1607) > * fix: handle null files field from GraphQL on very large PRs by [`@leepokai`](https://github.com/leepokai) in [anthropics/claude-code-action#1593](https://redirect.github.com/anthropics/claude-code-action/pull/1593) > * fix: support labeled action for pull\_request events in track\_progress by [`@takakisatojp`](https://github.com/takakisatojp) in [anthropics/claude-code-action#1586](https://redirect.github.com/anthropics/claude-code-action/pull/1586) > * fix: match label\_trigger case-insensitively by [`@sahilempire`](https://github.com/sahilempire) in [anthropics/claude-code-action#1576](https://redirect.github.com/anthropics/claude-code-action/pull/1576) > * docs: fix broken Bedrock anchor in cloud-providers.md by [`@shoemoney`](https://github.com/shoemoney) in [anthropics/claude-code-action#1579](https://redirect.github.com/anthropics/claude-code-action/pull/1579) > * docs: replace removed base-action inputs with claude\_args and settings by [`@fallintoplace`](https://github.com/fallintoplace) in [anthropics/claude-code-action#1550](https://redirect.github.com/anthropics/claude-code-action/pull/1550) > * fix(cache): disable setup-bun cache to avoid 5-retry HTML-error burn by [`@necofuryai`](https://github.com/necofuryai) in [anthropics/claude-code-action#1580](https://redirect.github.com/anthropics/claude-code-action/pull/1580) > * ci: pass base-action tool restrictions through claude\_args by [`@fallintoplace`](https://github.com/fallintoplace) in [anthropics/claude-code-action#1552](https://redirect.github.com/anthropics/claude-code-action/pull/1552) > * fix(mcp): stop retrying deterministic reference update failures by [`@fallintoplace`](https://github.com/fallintoplace) in [anthropics/claude-code-action#1551](https://redirect.github.com/anthropics/claude-code-action/pull/1551) > * fix: expose conclusion as a root action output by [`@fallintoplace`](https://github.com/fallintoplace) in [anthropics/claude-code-action#1549](https://redirect.github.com/anthropics/claude-code-action/pull/1549) > * fix(branch): validate generated branch name under commit signing by [`@rishavnaskar`](https://github.com/rishavnaskar) in [anthropics/claude-code-action#1582](https://redirect.github.com/anthropics/claude-code-action/pull/1582) > * fix(branch): collapse empty path segments in branch\_name\_template by [`@NickNojiri`](https://github.com/NickNojiri) in [anthropics/claude-code-action#1539](https://redirect.github.com/anthropics/claude-code-action/pull/1539) > > New Contributors > ---------------- > > * [`@ulofiai`](https://github.com/ulofiai) made their first contribution in [anthropics/claude-code-action#1607](https://redirect.github.com/anthropics/claude-code-action/pull/1607) > * [`@leepokai`](https://github.com/leepokai) made their first contribution in [anthropics/claude-code-action#1593](https://redirect.github.com/anthropics/claude-code-action/pull/1593) > * [`@takakisatojp`](https://github.com/takakisatojp) made their first contribution in [anthropics/claude-code-action#1586](https://redirect.github.com/anthropics/claude-code-action/pull/1586) > * [`@sahilempire`](https://github.com/sahilempire) made their first contribution in [anthropics/claude-code-action#1576](https://redirect.github.com/anthropics/claude-code-action/pull/1576) > * [`@shoemoney`](https://github.com/shoemoney) made their first contribution in [anthropics/claude-code-action#1579](https://redirect.github.com/anthropics/claude-code-action/pull/1579) > * [`@fallintoplace`](https://github.com/fallintoplace) made their first contribution in [anthropics/claude-code-action#1550](https://redirect.github.com/anthropics/claude-code-action/pull/1550) > * [`@necofuryai`](https://github.com/necofuryai) made their first contribution in [anthropics/claude-code-action#1580](https://redirect.github.com/anthropics/claude-code-action/pull/1580) > * [`@rishavnaskar`](https://github.com/rishavnaskar) made their first contribution in [anthropics/claude-code-action#1582](https://redirect.github.com/anthropics/claude-code-action/pull/1582) > > **Full Changelog**: <anthropics/claude-code-action@v1...v1.0.188> Commits * [`e63208c`](anthropics/claude-code-action@e63208c) chore: bump Claude Code to 2.1.232 and Agent SDK to 0.3.232 * [`dc33e8a`](anthropics/claude-code-action@dc33e8a) chore: bump Claude Code to 2.1.231 and Agent SDK to 0.3.231 * [`c58ad32`](anthropics/claude-code-action@c58ad32) chore: bump Claude Code to 2.1.229 and Agent SDK to 0.3.229 * [`dfb8fc7`](anthropics/claude-code-action@dfb8fc7) fix(mcp): detect binary files by content instead of extension allowlist ([#1633](https://redirect.github.com/anthropics/claude-code-action/issues/1633)) * [`a2489ef`](anthropics/claude-code-action@a2489ef) fix(summary): keep every text block in structured tool results ([#1619](https://redirect.github.com/anthropics/claude-code-action/issues/1619)) * [`8b87458`](anthropics/claude-code-action@8b87458) fix: paginate GitHub Actions MCP responses ([#1629](https://redirect.github.com/anthropics/claude-code-action/issues/1629)) * [`239e3a7`](anthropics/claude-code-action@239e3a7) chore: bump Claude Code to 2.1.228 and Agent SDK to 0.3.228 * [`5ef2e55`](anthropics/claude-code-action@5ef2e55) chore: bump Claude Code to 2.1.227 and Agent SDK to 0.3.227 * [`6b082c4`](anthropics/claude-code-action@6b082c4) chore: bump Claude Code to 2.1.226 and Agent SDK to 0.3.226 * [`7ff6806`](anthropics/claude-code-action@7ff6806) chore: bump Claude Code to 2.1.225 and Agent SDK to 0.3.225 * Additional commits viewable in [compare view](anthropics/claude-code-action@1623c36...e63208c) Updates `github/codeql-action/upload-sarif` from 4.37.6 to 4.37.7 Release notes *Sourced from [github/codeql-action/upload-sarif's releases](https://github.com/github/codeql-action/releases).* > v4.37.7 > ------- > > * Update default CodeQL bundle version to [2.26.3](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.3). [#4085](https://redirect.github.com/github/codeql-action/pull/4085) Changelog *Sourced from [github/codeql-action/upload-sarif's changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md).* > CodeQL Action Changelog > ======================= > > See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs. > > [UNRELEASED] > ------------ > > No user facing changes. > > 4.37.7 - 13 Aug 2026 > -------------------- > > * Update default CodeQL bundle version to [2.26.3](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.3). [#4085](https://redirect.github.com/github/codeql-action/pull/4085) > > 4.37.6 - 04 Aug 2026 > -------------------- > > * Changed the default filepath for the new remote file address format that was introduced in CodeQL Action 4.37.0 / 3.37.0 to `.github/codeql-config.yml` to align it with the suggested path that is used elsewhere. [#4070](https://redirect.github.com/github/codeql-action/pull/4070) > > 4.37.5 - 03 Aug 2026 > -------------------- > > * Fixed a bug where a network error while streaming the download of the CodeQL bundle could terminate the `init` Action instead of falling back to downloading the bundle before extracting it. [#4061](https://redirect.github.com/github/codeql-action/pull/4061) > > 4.37.4 - 29 Jul 2026 > -------------------- > > * This version of the CodeQL Action adds support for the `tools` input for the `codeql-action/init` step to be specified using a `github-codeql-tools` [repository property](https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization). This feature will gradually be rolled out following the release of this version. Once rolled out, this allows for the CodeQL CLI version that is used in GitHub-managed workflows, such as Default Setup, to be set to a custom value. For example, customers who run into issues with rate limits when a new CodeQL CLI version is released can set the value to `toolcache` to always use the CodeQL CLI version that is available in the runner toolcache. For Advanced Setup workflows, the value provided for `tools` in the workflow definition always takes precedence unless the value of the repository property starts with `!`. [#4037](https://redirect.github.com/github/codeql-action/pull/4037) > * Update default CodeQL bundle version to [2.26.2](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.2). [#4051](https://redirect.github.com/github/codeql-action/pull/4051) > > 4.37.3 - 22 Jul 2026 > -------------------- > > No user facing changes. > > 4.37.2 - 21 Jul 2026 > -------------------- > > * The new address format for the `config-file` input that was introduced in CodeQL Action 4.37.0 is now enabled by default. In addition to the format described there, the `remote=` prefix can now be used to explicitly indicate that the input refers to a remote file. All previous input formats continue to be accepted as well. [#4023](https://redirect.github.com/github/codeql-action/pull/4023) > * The CodeQL Action can now make use of [configured private registries](https://docs.github.com/en/code-security/how-tos/secure-at-scale/configure-organization-security/manage-usage-and-access/giving-org-access-private-registries) in Default Setup to retrieve CodeQL configuration files from remote repositories that require authentication. This will allow customers to store their CodeQL configuration in a single repository that can then be referenced by Default Setup workflows in other repositories. We expect to roll this and other, related changes out to everyone in July. [#4007](https://redirect.github.com/github/codeql-action/pull/4007) > > 4.37.1 - 16 Jul 2026 > -------------------- > > * *Upcoming breaking change*: Add a deprecation warning for customers using CodeQL version 2.20.6 and earlier. These versions of CodeQL were discontinued on 1 July 2026 alongside GitHub Enterprise Server 3.16, and will be unsupported by the next minor release of the CodeQL Action. [#3956](https://redirect.github.com/github/codeql-action/pull/3956) > * Update default CodeQL bundle version to [2.26.1](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.1). [#4019](https://redirect.github.com/github/codeql-action/pull/4019) > > 4.37.0 - 08 Jul 2026 > -------------------- > > * Update default CodeQL bundle version to [2.26.0](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.0). [#3995](https://redirect.github.com/github/codeql-action/pull/3995) > * In addition to the existing input format, the `config-file` input for the `codeql-action/init` step will soon support a new `[owner/]repo[@ref][:path]` format. All components except the repository name are optional. If omitted, `owner` defaults to the same owner as the repository the analysis is running for, `ref` to `main`, and `path` to `.github/codeql-action.yaml`. Support for this format ships in this version of the CodeQL Action, but will only be enabled over the coming weeks. [#3973](https://redirect.github.com/github/codeql-action/pull/3973) > > 4.36.3 - 01 Jul 2026 > -------------------- > > No user facing changes. > > 4.36.2 - 04 Jun 2026 > -------------------- ... (truncated) Commits * [`ff2f1c6`](github/codeql-action@ff2f1c6) Merge pull request [#4093](https://redirect.github.com/github/codeql-action/issues/4093) from github/update-v4.37.7-be7a3dbb8 * [`951a133`](github/codeql-action@951a133) Update changelog for v4.37.7 * [`be7a3db`](github/codeql-action@be7a3db) Merge pull request [#4087](https://redirect.github.com/github/codeql-action/issues/4087) from github/dependabot/npm\_and\_yarn/npm-minor-0aa561... * [`9310334`](github/codeql-action@9310334) Merge pull request [#4086](https://redirect.github.com/github/codeql-action/issues/4086) from github/mbg/thread-action-state-to-codeql * [`b4d8a54`](github/codeql-action@b4d8a54) Rebuild * [`ab5db25`](github/codeql-action@ab5db25) Bump the npm-minor group across 1 directory with 8 updates * [`38055a3`](github/codeql-action@38055a3) Drop `logger` from `databaseInitCluster` in interface * [`1f87aed`](github/codeql-action@1f87aed) Merge pull request [#4085](https://redirect.github.com/github/codeql-action/issues/4085) from github/update-bundle/codeql-bundle-v2.26.3 * [`dc1b98a`](github/codeql-action@dc1b98a) Make `logger` available to `getCodeQLForCmd` * [`6f0220e`](github/codeql-action@6f0220e) Merge pull request [#4084](https://redirect.github.com/github/codeql-action/issues/4084) from github/navntoft/bump-undici * Additional commits viewable in [compare view](github/codeql-action@5595cca...ff2f1c6) Updates `github/codeql-action/init` from 4.37.6 to 4.37.7 Release notes *Sourced from [github/codeql-action/init's releases](https://github.com/github/codeql-action/releases).* > v4.37.7 > ------- > > * Update default CodeQL bundle version to [2.26.3](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.3). [#4085](https://redirect.github.com/github/codeql-action/pull/4085) Changelog *Sourced from [github/codeql-action/init's changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md).* > CodeQL Action Changelog > ======================= > > See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs. > > [UNRELEASED] > ------------ > > No user facing changes. > > 4.37.7 - 13 Aug 2026 > -------------------- > > * Update default CodeQL bundle version to [2.26.3](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.3). [#4085](https://redirect.github.com/github/codeql-action/pull/4085) > > 4.37.6 - 04 Aug 2026 > -------------------- > > * Changed the default filepath for the new remote file address format that was introduced in CodeQL Action 4.37.0 / 3.37.0 to `.github/codeql-config.yml` to align it with the suggested path that is used elsewhere. [#4070](https://redirect.github.com/github/codeql-action/pull/4070) > > 4.37.5 - 03 Aug 2026 > -------------------- > > * Fixed a bug where a network error while streaming the download of the CodeQL bundle could terminate the `init` Action instead of falling back to downloading the bundle before extracting it. [#4061](https://redirect.github.com/github/codeql-action/pull/4061) > > 4.37.4 - 29 Jul 2026 > -------------------- > > * This version of the CodeQL Action adds support for the `tools` input for the `codeql-action/init` step to be specified using a `github-codeql-tools` [repository property](https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization). This feature will gradually be rolled out following the release of this version. Once rolled out, this allows for the CodeQL CLI version that is used in GitHub-managed workflows, such as Default Setup, to be set to a custom value. For example, customers who run into issues with rate limits when a new CodeQL CLI version is released can set the value to `toolcache` to always use the CodeQL CLI version that is available in the runner toolcache. For Advanced Setup workflows, the value provided for `tools` in the workflow definition always takes precedence unless the value of the repository property starts with `!`. [#4037](https://redirect.github.com/github/codeql-action/pull/4037) > * Update default CodeQL bundle version to [2.26.2](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.2). [#4051](https://redirect.github.com/github/codeql-action/pull/4051) > > 4.37.3 - 22 Jul 2026 > -------------------- > > No user facing changes. > > 4.37.2 - 21 Jul 2026 > -------------------- > > * The new address format for the `config-file` input that was introduced in CodeQL Action 4.37.0 is now enabled by default. In addition to the format described there, the `remote=` prefix can now be used to explicitly indicate that the input refers to a remote file. All previous input formats continue to be accepted as well. [#4023](https://redirect.github.com/github/codeql-action/pull/4023) > * The CodeQL Action can now make use of [configured private registries](https://docs.github.com/en/code-security/how-tos/secure-at-scale/configure-organization-security/manage-usage-and-access/giving-org-access-private-registries) in Default Setup to retrieve CodeQL configuration files from remote repositories that require authentication. This will allow customers to store their CodeQL configuration in a single repository that can then be referenced by Default Setup workflows in other repositories. We expect to roll this and other, related changes out to everyone in July. [#4007](https://redirect.github.com/github/codeql-action/pull/4007) > > 4.37.1 - 16 Jul 2026 > -------------------- > > * *Upcoming breaking change*: Add a deprecation warning for customers using CodeQL version 2.20.6 and earlier. These versions of CodeQL were discontinued on 1 July 2026 alongside GitHub Enterprise Server 3.16, and will be unsupported by the next minor release of the CodeQL Action. [#3956](https://redirect.github.com/github/codeql-action/pull/3956) > * Update default CodeQL bundle version to [2.26.1](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.1). [#4019](https://redirect.github.com/github/codeql-action/pull/4019) > > 4.37.0 - 08 Jul 2026 > -------------------- > > * Update default CodeQL bundle version to [2.26.0](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.0). [#3995](https://redirect.github.com/github/codeql-action/pull/3995) > * In addition to the existing input format, the `config-file` input for the `codeql-action/init` step will soon support a new `[owner/]repo[@ref][:path]` format. All components except the repository name are optional. If omitted, `owner` defaults to the same owner as the repository the analysis is running for, `ref` to `main`, and `path` to `.github/codeql-action.yaml`. Support for this format ships in this version of the CodeQL Action, but will only be enabled over the coming weeks. [#3973](https://redirect.github.com/github/codeql-action/pull/3973) > > 4.36.3 - 01 Jul 2026 > -------------------- > > No user facing changes. > > 4.36.2 - 04 Jun 2026 > -------------------- ... (truncated) Commits * [`ff2f1c6`](github/codeql-action@ff2f1c6) Merge pull request [#4093](https://redirect.github.com/github/codeql-action/issues/4093) from github/update-v4.37.7-be7a3dbb8 * [`951a133`](github/codeql-action@951a133) Update changelog for v4.37.7 * [`be7a3db`](github/codeql-action@be7a3db) Merge pull request [#4087](https://redirect.github.com/github/codeql-action/issues/4087) from github/dependabot/npm\_and\_yarn/npm-minor-0aa561... * [`9310334`](github/codeql-action@9310334) Merge pull request [#4086](https://redirect.github.com/github/codeql-action/issues/4086) from github/mbg/thread-action-state-to-codeql * [`b4d8a54`](github/codeql-action@b4d8a54) Rebuild * [`ab5db25`](github/codeql-action@ab5db25) Bump the npm-minor group across 1 directory with 8 updates * [`38055a3`](github/codeql-action@38055a3) Drop `logger` from `databaseInitCluster` in interface * [`1f87aed`](github/codeql-action@1f87aed) Merge pull request [#4085](https://redirect.github.com/github/codeql-action/issues/4085) from github/update-bundle/codeql-bundle-v2.26.3 * [`dc1b98a`](github/codeql-action@dc1b98a) Make `logger` available to `getCodeQLForCmd` * [`6f0220e`](github/codeql-action@6f0220e) Merge pull request [#4084](https://redirect.github.com/github/codeql-action/issues/4084) from github/navntoft/bump-undici * Additional commits viewable in [compare view](github/codeql-action@5595cca...ff2f1c6) Updates `github/codeql-action/analyze` from 4.37.6 to 4.37.7 Release notes *Sourced from [github/codeql-action/analyze's releases](https://github.com/github/codeql-action/releases).* > v4.37.7 > ------- > > * Update default CodeQL bundle version to [2.26.3](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.3). [#4085](https://redirect.github.com/github/codeql-action/pull/4085) Changelog *Sourced from [github/codeql-action/analyze's changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md).* > CodeQL Action Changelog > ======================= > > See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs. > > [UNRELEASED] > ------------ > > No user facing changes. > > 4.37.7 - 13 Aug 2026 > -------------------- > > * Update default CodeQL bundle version to [2.26.3](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.3). [#4085](https://redirect.github.com/github/codeql-action/pull/4085) > > 4.37.6 - 04 Aug 2026 > -------------------- > > * Changed the default filepath for the new remote file address format that was introduced in CodeQL Action 4.37.0 / 3.37.0 to `.github/codeql-config.yml` to align it with the suggested path that is used elsewhere. [#4070](https://redirect.github.com/github/codeql-action/pull/4070) > > 4.37.5 - 03 Aug 2026 > -------------------- > > * Fixed a bug where a network error while streaming the download of the CodeQL bundle could terminate the `init` Action instead of falling back to downloading the bundle before extracting it. [#4061](https://redirect.github.com/github/codeql-action/pull/4061) > > 4.37.4 - 29 Jul 2026 > -------------------- > > * This version of the CodeQL Action adds support for the `tools` input for the `codeql-action/init` step to be specified using a `github-codeql-tools` [repository property](https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization). This feature will gradually be rolled out following the release of this version. Once rolled out, this allows for the CodeQL CLI version that is used in GitHub-managed workflows, such as Default Setup, to be set to a custom value. For example, customers who run into issues with rate limits when a new CodeQL CLI version is released can set the value to `toolcache` to always use the CodeQL CLI version that is available in the runner toolcache. For Advanced Setup workflows, the value provided for `tools` in the workflow definition always takes precedence unless the value of the repository property starts with `!`. [#4037](https://redirect.github.com/github/codeql-action/pull/4037) > * Update default CodeQL bundle version to [2.26.2](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.2). [#4051](https://redirect.github.com/github/codeql-action/pull/4051) > > 4.37.3 - 22 Jul 2026 > -------------------- > > No user facing changes. > > 4.37.2 - 21 Jul 2026 > -------------------- > > * The new address format for the `config-file` input that was introduced in CodeQL Action 4.37.0 is now enabled by default. In addition to the format described there, the `remote=` prefix can now be used to explicitly indicate that the input refers to a remote file. All previous input formats continue to be accepted as well. [#4023](https://redirect.github.com/github/codeql-action/pull/4023) > * The CodeQL Action can now make use of [configured private registries](https://docs.github.com/en/code-security/how-tos/secure-at-scale/configure-organization-security/manage-usage-and-access/giving-org-access-private-registries) in Default Setup to retrieve CodeQL configuration files from remote repositories that require authentication. This will allow customers to store their CodeQL configuration in a single repository that can then be referenced by Default Setup workflows in other repositories. We expect to roll this and other, related changes out to everyone in July. [#4007](https://redirect.github.com/github/codeql-action/pull/4007) > > 4.37.1 - 16 Jul 2026 > -------------------- > > * *Upcoming breaking change*: Add a deprecation warning for customers using CodeQL version 2.20.6 and earlier. These versions of CodeQL were discontinued on 1 July 2026 alongside GitHub Enterprise Server 3.16, and will be unsupported by the next minor release of the CodeQL Action. [#3956](https://redirect.github.com/github/codeql-action/pull/3956) > * Update default CodeQL bundle version to [2.26.1](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.1). [#4019](https://redirect.github.com/github/codeql-action/pull/4019) > > 4.37.0 - 08 Jul 2026 > -------------------- > > * Update default CodeQL bundle version to [2.26.0](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.0). [#3995](https://redirect.github.com/github/codeql-action/pull/3995) > * In addition to the existing input format, the `config-file` input for the `codeql-action/init` step will soon support a new `[owner/]repo[@ref][:path]` format. All components except the repository name are optional. If omitted, `owner` defaults to the same owner as the repository the analysis is running for, `ref` to `main`, and `path` to `.github/codeql-action.yaml`. Support for this format ships in this version of the CodeQL Action, but will only be enabled over the coming weeks. [#3973](https://redirect.github.com/github/codeql-action/pull/3973) > > 4.36.3 - 01 Jul 2026 > -------------------- > > No user facing changes. > > 4.36.2 - 04 Jun 2026 > -------------------- ... (truncated) Commits * [`ff2f1c6`](github/codeql-action@ff2f1c6) Merge pull request [#4093](https://redirect.github.com/github/codeql-action/issues/4093) from github/update-v4.37.7-be7a3dbb8 * [`951a133`](github/codeql-action@951a133) Update changelog for v4.37.7 * [`be7a3db`](github/codeql-action@be7a3db) Merge pull request [#4087](https://redirect.github.com/github/codeql-action/issues/4087) from github/dependabot/npm\_and\_yarn/npm-minor-0aa561... * [`9310334`](github/codeql-action@9310334) Merge pull request [#4086](https://redirect.github.com/github/codeql-action/issues/4086) from github/mbg/thread-action-state-to-codeql * [`b4d8a54`](github/codeql-action@b4d8a54) Rebuild * [`ab5db25`](github/codeql-action@ab5db25) Bump the npm-minor group across 1 directory with 8 updates * [`38055a3`](github/codeql-action@38055a3) Drop `logger` from `databaseInitCluster` in interface * [`1f87aed`](github/codeql-action@1f87aed) Merge pull request [#4085](https://redirect.github.com/github/codeql-action/issues/4085) from github/update-bundle/codeql-bundle-v2.26.3 * [`dc1b98a`](github/codeql-action@dc1b98a) Make `logger` available to `getCodeQLForCmd` * [`6f0220e`](github/codeql-action@6f0220e) Merge pull request [#4084](https://redirect.github.com/github/codeql-action/issues/4084) from github/navntoft/bump-undici * Additional commits viewable in [compare view](github/codeql-action@5595cca...ff2f1c6) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Summary
Eliminates the Codacy/Bandit findings in
bindings/python/and adds a CI gate to prevent regression. Plan documented atdocs/superpowers/plans/2026-05-05-python-bindings-codacy-fixes.md.Bandit posture before vs. after:
src/tests/examples/What changed
src/): New_logginghelper module replaces silenttry/except/passswallowing with debug-level traceback logging acrossasync_executor,graph_batch,core(__del__),jvm(shutdown_jvm),schema, andserver. Finalizers narrowed from bareexcept Exceptionto(AttributeError, RuntimeError).ArcadeDBServerdefault host changed from0.0.0.0tolocalhost(callers must opt in to bind on all interfaces). One annotated false-positive invector.pywhere the SQL identifiers are quoted via_quote_identifier()and the user key is passed as a?parameter.tests/):TEST_PASSWORDconstant centralised inconftest.py. Vector INSERT/DELETE intest_vector_sql.pynow parameterized with?. Bench-loop SQL intest_server_patterns.pyannotated (parameterizing would change the workload being measured). Idiomaticassertstatements skipped via[tool.bandit] skips = ["B101"].examples/): SHA1 short-digests now useusedforsecurity=False. URL fetches indownload_data.pyand21_server_mode_http_access.pyare HTTPS-validated via a_require_https()guard. SQL string-builds in numbered demos either parameterized (17_timeseries_end_to_end.py) or annotated where interpolated values are script constants.banditjob in.github/workflows/test-python-bindings.ymlruns in parallel with the existing test matrix. Two gates:src+tests: must be clean at low-severity / low-confidence.examples: must be clean at medium-severity / high-confidence.In-flight discoveries
exclude_dirs = ["build", ...]in bandit's pyproject config was substring-matchingexamples/11_vector_index_build.py. Fixed by anchoring patterns with/.[tool.bandit.assert_used] skipsfrom pyproject.toml; switched to globalskips = ["B101"]. Safe becausesrc/has noassertstatements.Test plan
banditjob passes on Linux runnertestmatrix continues to pass on linux/amd64, linux/arm64, darwin/arm64, windows/amd64 across Python 3.10-3.14Server.__del__still tears down cleanly when JVM is already detached (covered by existing teardown tests)ArcadeDBServer(root_password=...)defaults to localhost; explicithost="0.0.0.0"still works for opt-in (covered by newtest_default_host_is_localhost)python3 -m bandit -c bindings/python/pyproject.toml -r bindings/python/src bindings/python/tests --severity-level low --confidence-level lowexits 0python3 -m bandit -c bindings/python/pyproject.toml -r bindings/python/examples --severity-level medium --confidence-level highexits 0Reviewing
The 21 commits map 1:1 to plan tasks and group naturally into 3 logical phases at boundaries
27da10759(end of src+CI),c8121a024(end of tests), andfdfda61cd(end of examples). Reviewers can read the commits in order and stop at any boundary.