Skip to content

Potential fix for code scanning alert no. 115: Insecure randomness - #1921

Merged
robfrank merged 2 commits into
mainfrom
alert-autofix-115
Jan 16, 2025
Merged

robfrank merged 2 commits into
mainfrom
alert-autofix-115

Conversation

@robfrank

Copy link
Copy Markdown
Collaborator

Potential fix for https://github.com/ArcadeData/arcadedb/security/code-scanning/115

To fix the problem, we need to replace the use of java.util.Random with java.security.SecureRandom in the code. This change ensures that the random values generated are cryptographically secure and not easily predictable.

  1. Identify the lines where java.util.Random is used.
  2. Replace the instantiation of java.util.Random with java.security.SecureRandom.
  3. Ensure that the rest of the code remains functionally the same, only changing the source of randomness.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@robfrank
robfrank marked this pull request as ready for review January 16, 2025 13:05
@codacy-production

codacy-production Bot commented Jan 16, 2025

Copy link
Copy Markdown

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.26% 0.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (b0c6d2b) 68199 43954 64.45%
Head commit (e7a66d0) 68200 (+1) 43775 (-179) 64.19% (-0.26%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1921) 1 0 0.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@lvca lvca added this to the 25.1.1 milestone Jan 16, 2025
@lvca lvca added the security label Jan 16, 2025
@robfrank
robfrank merged commit 63a46b9 into main Jan 16, 2025
@robfrank
robfrank deleted the alert-autofix-115 branch June 20, 2025 07:41
tae898 pushed a commit to humemai/arcadedb-embedded-python that referenced this pull request Jun 28, 2026
…rcadeData#1921)

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants