Skip to content

fix(ci): batch A - scan/sonarcloud/docker-mcp pre-existing failures - #366

Open
frankiehot-tech wants to merge 4 commits into
mainfrom
fix/ci-batch-a
Open

fix(ci): batch A - scan/sonarcloud/docker-mcp pre-existing failures#366
frankiehot-tech wants to merge 4 commits into
mainfrom
fix/ci-batch-a

Conversation

@frankiehot-tech

Copy link
Copy Markdown
Contributor

Summary

Fixing 4 pre-existing CI failures flagged by the "全部处理" pass:

  1. scan (leak-detection)dual-repo-watch.yml embedded frankiehot-tech
    literals that tripped the private-account leak grep. Replaced with
    descriptive text (no personal-account identifiers).
  2. Docker Vulnerability Scancryptography>=42.0 ships CVE-2026-69247 /
    CVE-2026-69249. Bumped to cryptography>=50.0 (CVE fixes in 49.0.0/50.0.0).
  3. sonarcloud (74 failed)tests/maref/integration/conftest.py injected
    MagicMock stubs into the global sys.modules at collection time, so any
    unit test importing the real modules (test_aip_adapter,
    test_mcp_hitl_bridge, test_a2a_bridge, ...) received a MagicMock and
    failed. Verified import maref.integration no longer has the circular
    import chain the stubs were guarding against, so the stubs were removed.
    Local run: 350 passed / 236 passed across the affected suites.
  4. ci.yml test job timeouttest_list_tools blocked 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)

  • trivy-scan: frontend JS HIGH vulnerabilities (brace-expansion, vite 4.3.0,
    serialize-javascript, fast-uri, colors) — separate task
  • license/cla: CLA not yet signed — requires human action on cla-assistant.io
  • sonarcloud: any remaining failures beyond the 74 addressed here
  • gate-test coverage: separate follow-up

Verification

  • pytest tests/maref/integration tests/unit/test_aip_adapter.py ... → 350 passed
  • pytest tests/sidecar/test_mcp_bridge.py tests/maref/integration ... → 236 passed
  • pre-push oss-check: ✅ passed

Closes the leak-detection / docker-vuln / sonarcloud-stub / test-timeout legs.

- 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
@frankiehot-tech
frankiehot-tech requested a review from a team as a code owner August 14, 2026 00:33
@cla-assistant

cla-assistant Bot commented Aug 14, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


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
@cla-assistant

cla-assistant Bot commented Aug 14, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


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.

Athena 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant