fix(ci): batch A - scan/sonarcloud/docker-mcp pre-existing failures - #366
Open
frankiehot-tech wants to merge 4 commits into
Open
fix(ci): batch A - scan/sonarcloud/docker-mcp pre-existing failures#366frankiehot-tech wants to merge 4 commits into
frankiehot-tech wants to merge 4 commits into
Conversation
- dual-repo-watch.yml: drop frankiehot-tech literals (leak-detection scan) - pyproject.toml: cryptography>=50.0 for CVE-2026-69247/69249 (Docker vuln scan) - tests/maref/integration/conftest.py: remove sys.modules MagicMock stubs that polluted global state and caused sonarcloud's 74 failures - tests/sidecar/test_mcp_bridge.py: mock lazy backends in test_list_tools to fix ci.yml test job timeout
|
Athena seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
1 similar comment
|
Athena seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
added 3 commits
August 14, 2026 08:39
cryptography>=50.0 (for CVE-2026-69247/69249) conflicts with mitmproxy's cryptography<=48.1 upper bound, breaking sonarcloud and Docker dependency resolution. Downgrade to cryptography>=48.0.1 (fixes GHSA-537c-gmf6-5ccf) and exempt the two blocked CVEs via .trivyignore until mitmproxy relaxes its constraint. User approved the .trivyignore exemption.
mitmproxy 12.x requires python>=3.12; on sonarcloud's 3.11 pip falls back to 11.0.2 which pins cryptography<44.1, conflicting with identity's cryptography>=48.0.1. Marker-scope mitmproxy to python>=3.12 so 3.11 CI resolves cleanly; Docker (3.12) still installs it.
_SCOPE_MAP is populated by create_app() -> _register_route_scope(). The test read this global without initializing it, so it was order-dependent: when tests/security/test_api_security.py's autouse fixture cleared the map earlier in the same process, the assertion failed (None != scope). Call create_app() inside the test so it no longer depends on the execution order of other tests in the suite.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixing 4 pre-existing CI failures flagged by the "全部处理" pass:
dual-repo-watch.ymlembeddedfrankiehot-techliterals that tripped the private-account leak grep. Replaced with
descriptive text (no personal-account identifiers).
cryptography>=42.0ships CVE-2026-69247 /CVE-2026-69249. Bumped to
cryptography>=50.0(CVE fixes in 49.0.0/50.0.0).tests/maref/integration/conftest.pyinjectedMagicMockstubs into the globalsys.modulesat collection time, so anyunit test importing the real modules (
test_aip_adapter,test_mcp_hitl_bridge,test_a2a_bridge, ...) received a MagicMock andfailed. Verified
import maref.integrationno longer has the circularimport chain the stubs were guarding against, so the stubs were removed.
Local run: 350 passed / 236 passed across the affected suites.
test_list_toolsblocked on claude-mem /codedepth lazy backend init in CI. Mocked the two lazy accessors so the test
only asserts the sidecar tool set itself.
Pre-existing failures (NOT in this PR's scope)
serialize-javascript, fast-uri, colors) — separate task
Verification
pytest tests/maref/integration tests/unit/test_aip_adapter.py ...→ 350 passedpytest tests/sidecar/test_mcp_bridge.py tests/maref/integration ...→ 236 passedCloses the leak-detection / docker-vuln / sonarcloud-stub / test-timeout legs.