security: consolidate v3.1.0 hygiene and dependency remediation#301
Merged
Conversation
Updates the requirements on [cryptography](https://github.com/pyca/cryptography) to permit the latest version. - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](pyca/cryptography@46.0.6...46.0.7) --- updated-dependencies: - dependency-name: cryptography dependency-version: 46.0.7 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.35.2 to 4.35.4. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@95e58e9...68bde55) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.35.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [tomlkit](https://github.com/python-poetry/tomlkit) from 0.14.0 to 0.15.0. - [Release notes](https://github.com/python-poetry/tomlkit/releases) - [Changelog](https://github.com/python-poetry/tomlkit/blob/master/CHANGELOG.md) - [Commits](python-poetry/tomlkit@0.14.0...0.15.0) --- updated-dependencies: - dependency-name: tomlkit dependency-version: 0.15.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [pydantic-core](https://github.com/pydantic/pydantic) from 2.46.3 to 2.46.4. - [Release notes](https://github.com/pydantic/pydantic/releases) - [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md) - [Commits](pydantic/pydantic@core-v2.46.3...core-v2.46.4) --- updated-dependencies: - dependency-name: pydantic-core dependency-version: 2.46.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.13.3 to 2.13.4. - [Release notes](https://github.com/pydantic/pydantic/releases) - [Changelog](https://github.com/pydantic/pydantic/blob/v2.13.4/HISTORY.md) - [Commits](pydantic/pydantic@v2.13.3...v2.13.4) --- updated-dependencies: - dependency-name: pydantic dependency-version: 2.13.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Co-Authored-By: Andrew E. A. <steel.sa.llc@gmail.com>
…-check' into HEAD
…46.0.7' into devin/1778770295-v31-hygiene-rollup
…/codeql-action-4.35.4' into devin/1778770295-v31-hygiene-rollup
…nto devin/1778770295-v31-hygiene-rollup
…into devin/1778770295-v31-hygiene-rollup
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Andrew E. A. <steel.sa.llc@gmail.com>
Co-Authored-By: Andrew E. A. <steel.sa.llc@gmail.com>
Steel-SecAdv-LLC
approved these changes
May 14, 2026
Co-Authored-By: Andrew E. A. <steel.sa.llc@gmail.com>
This was referenced May 14, 2026
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.
Pull Request Description
Summary
Consolidates the green v3.1.0 hygiene stack (#297-#300) with the actionable Dependabot queue (#292-#296), resolves the pydantic/pydantic-core lockstep conflict, remediates the two reviewed non-justified
# nosecfindings, and clarifies documentation language so current consumers are stated as Mercury Agent and FINDΩYOU™ (private repo). This preserves version 3.1.0, keeps public API signatures intact, preserves theama_cryptography_monitorcompatibility shim, and leaves C source / constant-time code / KAT vectors untouched.Type of Change
Related Issues
Fixes #
Relates to #292, #293, #294, #295, #296, #297, #298, #299, #300
Motivation and Context
Why is this change required?
The original hygiene stack was green, but closeout review identified two pre-existing
# nosecfindings that needed corrective engineering rather than documentation-only disposition: a demo hardcoded password and legacy RFC 3161 timestamp URL handling that claimed HTTPS enforcement while accepting HTTP. The Dependabot pydantic and pydantic-core PRs also could not pass independently because their lockfile pins are interdependent. Final documentation review also required exact current-consumer wording rather than downstream/later phrasing.What problem does it solve?
This creates a single mergeable closeout branch that resolves the remaining non-justified suppressions, preserves the documentation/tooling cleanup, consolidates the dependency queue into a compatible lock state, states the current AMA consumers accurately, and keeps all reviewed AI/bot feedback resolved.
Cryptographic Impact
Security Impact Assessment
This is a security-hardening hygiene change to the legacy RFC 3161 timestamp transport path only. It does not modify C cryptographic primitives, constant-time code, KAT vectors, key formats, or public function signatures.
Standards Compliance
Academic References
N/A — no primitive or protocol construction changes.
Security Analysis
Classical Security: Strengthens legacy timestamp transport by rejecting non-HTTPS TSA URLs before subprocess/network work and by failing loud when
create_crypto_package(..., use_rfc3161=True)cannot obtain a timestamp token. Removes a demo-only hardcoded password literal.Quantum Security: No impact. PQC code and KAT vectors are unchanged.
Security Impact: Improves posture by reducing suppressions from 9 to 7 and making the remaining suppressions justified-only.
Implementation Details
Changes Made
urllib.request.urlopenpath with an HTTPS-onlyhttp.client.HTTPSConnectionpath, rejects HTTP TSA URLs before subprocess/network work, and fails loud when package creation requests RFC 3161 but receives no token.Technical Approach
The branch intentionally stacks the existing reviewed PRs first, then merges the dependency PRs and resolves only the pydantic/pydantic-core lock conflict manually. The legacy timestamp function still preserves its
Optional[bytes]signature, while package creation now treats a requested-but-missing RFC 3161 token as a hard failure so security layers are not silently skipped. Documentation edits are wording-only and do not alter runtime behavior.Breaking Changes
Breaking Changes:
Migration Path:
N/A.
Testing
Test Coverage
Testing Performed
Environment:
Test Cases:
PYTHONPATH=/home/ubuntu/ama-merge-check python -m pytest tests/test_comprehensive_system.py::TestCryptoPackageWithRFC3161::test_package_with_rfc3161_failure_raises tests/test_crypto_import_paths.py::TestRFC3161SuccessPath -q— 4 passed.PYTHONPATH=/home/ubuntu/ama-merge-check python -m ruff check ama_cryptography/legacy_compat.py tests/test_comprehensive_system.py tests/test_crypto_import_paths.py— passed.PYTHONPATH=/home/ubuntu/ama-merge-check python -m black --check --diff ama_cryptography/legacy_compat.py tests/test_comprehensive_system.py tests/test_crypto_import_paths.py— passed.PYTHONPATH=/home/ubuntu/ama-merge-check python -m bandit -r ama_cryptography/ -l— no issues identified.PYTHONPATH=/home/ubuntu/ama-merge-check python -m mypy --strict ama_cryptography/— passed.PYTHONPATH=/home/ubuntu/ama-merge-check python -m ama_cryptography.integrity --verify— OK.git diff --checkand grep verification for consumer wording — passed.Known Test Vectors
Code Quality
Code Quality Checks
black .)ruff check .)mypy ama_cryptography/)Documentation Updates
Backwards Compatibility
Compatibility Assessment
Deprecation Notices
Deprecated Features:
Deprecation Timeline:
Performance Impact
Performance Analysis
Benchmarks:
Not performance-related.
Impact:
Security Checklist
# nosecannotations# nosecsuppressions are justified innosec_disposition.mdLink to Devin session: https://app.devin.ai/sessions/380c3bcb95034d1f83fb66062f20e8cf
Requested by: @Steel-SecAdv-LLC