Skip to content

Conversation

@ankur-anand
Copy link

Description

Replace the use of math/rand with cyrpto/rand for generating X.509 certificate serial Numbers in the session certificate.

Generating math/rand.Int63() has several potential issues, probably not directly evident due to the worker and target residing in the private subnet, but still not an ideal way to generate it.

  1. math/rand has a predictable Output and not suitable for security-sensitive contexts.
  2. Only produces 63 bits of randomness.

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.
  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
  • If applicable, I've documented the impact of any changes to security controls.
    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

@hashicorp-cla-app
Copy link

hashicorp-cla-app bot commented Feb 9, 2026

CLA assistant check
All committers have signed the CLA.

@hashicorp-cla-app
Copy link

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant