Skip to content

[REVIEW] secure-code-review: add cryptographic agility migration gates #1675

@yanziwei

Description

@yanziwei

Problem

secure-code-review covers weak algorithms, CSPRNG use, key management, and TLS bypasses, but it does not ask reviewers to verify whether cryptographic code can be safely migrated when algorithms, key sizes, libraries, or compliance requirements change.

This leaves a practical review gap: applications may use acceptable algorithms today while still being brittle because ciphertexts, hashes, signatures, and tokens do not carry algorithm or key-version metadata, legacy fallback code is not time-bound, or migration jobs are untested.

Proposed improvement

Add a focused cryptographic agility section to Step 5 that requires reviewers to check:

  • Algorithm IDs, key IDs, and version metadata on cryptographic artifacts.
  • Centralized crypto policy instead of scattered hard-coded constants.
  • Tested re-encryption, re-signing, password-hash upgrade, or token reissue paths.
  • Time-bound legacy decrypt/verify compatibility windows.
  • Fail-closed behavior for unknown algorithms, retired keys, malformed envelopes, and downgrade attempts.
  • Test fixtures for old-format reads, new-format writes, mixed-version data, and migration idempotency.
  • Telemetry proving how much legacy data remains before fallback code is removed.

This should be a documentation-only skill enhancement with no new tool permissions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions