Skip to content

fix(deps): enforce pyasn1 security floor for SDK and CI installs - #303

Open
dinakarjs wants to merge 2 commits into
agentrust-io:mainfrom
dinakarjs:fix/pyasn1-audit-20261031
Open

dinakarjs wants to merge 2 commits into
agentrust-io:mainfrom
dinakarjs:fix/pyasn1-audit-20261031

Conversation

@dinakarjs

@dinakarjs dinakarjs commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Problem and change

The CI lock already pinned pyasn1 0.6.5, but a supported ca2a-runtime[a2a-sdk] installation could still resolve affected 0.6.4 through google-auth/pyasn1-modules. Both the a2a-sdk and dev extras now declare pyasn1>=0.6.5. Base dependencies and runtime source are unchanged; the changelog records the install-surface repair.

The existing dev input retains the same floor. Regenerating its hash lock with the documented universal Python 3.11 command produces identical bytes, so no further lock changes are needed. This raises an intentional minimum dependency version; it is not a demonstrated cA2A exploit or a dependency-audit exemption.

Validation — 1 November 2026

Head: 729db756111b5c4563b08c8b3b3f188422a166fb; tree: 05e0463d1383002263c27e08175cd1a7d4968bb7.

  • Fresh hash-locked Linux/Python 3.12 development environment: 849 unit/conformance tests passed / 2 skipped; 90.24% coverage.
  • Ruff, formatting (108 files), mypy (47 source files), configured Bandit, dependency consistency and whitespace checks pass. Full installed-environment pip-audit reports no known vulnerabilities.
  • Built-wheel metadata contains the floor for both extras. In a separate empty environment, resolver dry runs for each extra reject an explicit 0.6.4 pin and accept 0.6.5.
  • Removing only the two extra floors and rebuilding permits 0.6.4 for both extras, demonstrating sensitivity to this repair. The original patched source and wheel are retained. Resolver checks are not installed-extra or Windows execution certification.

Independent review and hosted validation of this head remain required. After acceptance, the dependency repair can be incorporated into draft #294 and its resulting CI rechecked; the WCM source-adoption gate remains separate. No merge, release or weakening of audit checks performed. Prepared with OpenAI Codex; DCO-signed.

Upgrade only pyasn1 to 0.6.5 in the hash-locked development environment and retain the floor in dev.in. Other pins, extras and markers are unchanged.

Prepared with OpenAI Codex.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>
@dinakarjs
dinakarjs requested review from a team, carloshvp and zohebk8s as code owners October 31, 2026 09:26
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Contributor Check: MEDIUM

Check Result
Profile MEDIUM
Credential LOW
Overall MEDIUM

Automated check by AgenTrust Contributor Check.

@github-actions github-actions Bot added the needs-review:MEDIUM Contributor check flagged MEDIUM risk label Oct 31, 2026
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor Author

@carloshvp @zohebk8s requesting independent review of c7c8835; both formal review requests are already populated. All six Python 3.11/3.12/3.13 Linux/Windows matrix jobs now pass, as do CodeQL, vouch-gate and contributor check. The CI workflow was finalizing when checked. The approval gate remains outstanding.

Only pyasn1 changes in the development lock, from 0.6.4 to 0.6.5, with a retained input floor and hashes verified against PyPI. The old-version audit reproduces all four findings; the patched environment and hosted Linux audit report no known vulnerabilities. The description records 849 local tests, lint/format/type/Bandit checks and Linux/Windows resolver dry runs, with the exact published tree. Please disposition this focused audit repair or identify any remaining changes. #294's checker/source-acceptance hold remains separate. Prepared with OpenAI Codex.

Copy link
Copy Markdown
Contributor Author

@carloshvp @zohebk8s requesting review/disposition of c7c8835e72bebcfb9f17f3ed656f98f25b96e137 so the dependent #294 CI can be completed after the repair is accepted and incorporated. Your formal review requests are already pending.

The current-head CI run has now completed successfully: all six Python 3.11–3.13 Linux/Windows matrix jobs and governance pass; CodeQL, vouch and contributor checks pass. The maintainer approval gate remains the returned failure. This corrects the earlier status snapshot in which CI was still finalizing.

The separate #294 head still installs pyasn1 0.6.4 and fails pip-audit before tests, with four reported advisories and 0.6.5 identified as fixed. This PR's focused 0.6.5 repair has passing hosted evidence, but it is not yet accepted or present on #294. Please approve this head or identify remaining corrections through normal review. Once accepted/incorporated, I will verify #294's full matrix on its resulting head; its independent WCM source-adoption hold remains separate. Prior local measurements are in the description; no fresh local suite run is claimed. Prepared with OpenAI Codex.

@rajnisht7 rajnisht7 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pyasn1>=0.6.5 is only set in requirements/dev.in.The same dependency is reachable via the supported ca2a-runtime[a2a-sdk] extra:

a2a-sdk -> google-api-core -> google-auth -> pyasn1-modules -> pyasn1.This repo already puts security floors like aiohttp>=3.14.3 directly in the a2a-sdk extra.

kindly add pyasn1>=0.6.5 there too (and regenerate any affected locks)
.As written, the change clears the CI audit but does not prevent supported A2A SDK installs from resolving a vulnerable pyasn1.

Raise the pyasn1 floor for both optional SDK and development installs while keeping existing lock bytes unchanged. Built-wheel resolver controls reject 0.6.4 and accept 0.6.5 for each extra.

Prepared with OpenAI Codex.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>
@dinakarjs dinakarjs changed the title fix(deps): clear pyasn1 findings from the CI dependency audit fix(deps): enforce pyasn1 security floor for SDK and CI installs Nov 1, 2026
dinakarjs added a commit to dinakarjs/ca2a that referenced this pull request Nov 1, 2026
Preserve both existing branch histories and the accepted upstream history already in agentrust-io#303. Combine its tested dependency floors and lock with the unchanged source-checker port for CI validation. Draft status, independent review and source-adoption gates remain required.

Prepared with OpenAI Codex.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>

Copy link
Copy Markdown
Contributor Author

@rajnisht7 @carloshvp @zohebk8s requesting current-head re-review at 729db756111b5c4563b08c8b3b3f188422a166fb.

Both supported a2a-sdk and dev extras now declare pyasn1>=0.6.5. Built-wheel resolver controls refuse an explicit 0.6.4 pin and accept 0.6.5 for each extra; removing just those floors permits 0.6.4 again. Regenerating the existing universal dev lock produces identical bytes. Local evidence: 849 tests, clean pip-audit and pip check. The same history is now incorporated into draft #294 for combined validation, whose hosted technical workflows also pass; this supersedes the earlier note that #294 still had the old dependency. Please re-review this dependency floor repair.

All returned current-head technical workflows pass. Validation details and limitations are in the PR description; this follow-up does not claim another local suite run or independent approval. Prepared with OpenAI Codex.

dinakarjs added a commit to dinakarjs/ca2a that referenced this pull request Nov 2, 2026
Carry the exact reviewed agentrust-io#303 dependency input, lock and SDK/dev-extra floors into this branch to clear the current hosted security audit failure. Preserve this PR's own runtime/tests and changelog entry. No security gate is bypassed.

Prepared with OpenAI Codex.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>
dinakarjs added a commit to dinakarjs/ca2a that referenced this pull request Nov 2, 2026
Carry the exact reviewed agentrust-io#303 dependency input, lock and SDK/dev-extra floors into this branch to clear the current hosted security audit failure. Preserve this PR's own runtime/tests and changelog entry. No security gate is bypassed.

Prepared with OpenAI Codex.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>

@drk-ram drk-ram left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed head 729db756111b5c4563b08c8b3b3f188422a166fb.

Approving. The floor now sits on both install surfaces that can still resolve pyasn1 through a2a-sdk / google-auth / pyasn1-modules, not only on the hash-locked CI environment.

pyproject.toml declares pyasn1>=0.6.5 in the a2a-sdk extra and again in dev. requirements/dev.in carries the same floor, and requirements/dev.txt pins pyasn1==0.6.5 with the two published hashes. I checked those hashes against the PyPI 0.6.5 release: wheel 4017b0fce125096b8573b39c989fdb1a4b19cf761e683398184550fea0e66587 and sdist 6b11616a6bcf3a40e635f082bb232fa57b5e0dd7f517bd7ddd69ec3794508a47. They match. Base runtime dependencies are unchanged, which is the right scope: this is an install-surface repair, not a protocol change.

That floor is the one that clears the four findings still open against 0.6.4: GHSA-9m75-vc3g-4x39 (CVE-2026-119195), GHSA-2qm8-x737-gmw5 (CVE-2026-119196), GHSA-mm57-4v3p-rchx (CVE-2026-119197), and GHSA-fm9c-5rcf-2q5p (CVE-2026-119194). All four are quadratic decode DoS in constructed or schemaless ASN.1, fixed in 0.6.5. The earlier 0.6.3 findings are already behind 0.6.4; they are not what this pin is for. The changelog states that boundary honestly.

Hosted CI on this head is green for the Python 3.11/3.12/3.13 matrix on Ubuntu and Windows, CodeQL, and governance. The failed gate job is the maintainer-approval workflow, not a test or audit failure. I did not reinstall the full hash-locked suite locally; the applicable local check was the lock hashes and the extra metadata. The earlier gap, a floor only in dev.in, is closed on this head.

One coordination note, not a hold on this PR: experiments/a2a-tck/environment.txt on #266 still pins pyasn1==0.6.4 and the new TCK job installs that file. That is #266's install surface, not a hole in this change.

@carloshvp carloshvp left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed commit 729db756111b5c4563b08c8b3b3f188422a166fb.

The pyasn1 0.6.5 floor now covers both the published a2a-sdk/dev extras and the development lock input. The two replacement hashes match the official PyPI 0.6.5 wheel and sdist, and the lock retains its other pins. I installed the hash-locked development environment and ran 55 SDK/adapter tests, Ruff/format, mypy and configured Bandit successfully. The current-head hosted technical checks also pass. This addresses the pyasn1 audit failure that is holding other PRs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review:MEDIUM Contributor check flagged MEDIUM risk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants