Skip to content

LangId oneAPI sample: use random.sample() to avoid Bandit scan issues #1254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 6, 2022

Conversation

alexsin368
Copy link
Contributor

Existing Sample Changes

Description

Replacing random.randint() function calls with random.sample() due to errors in the Bandit scan.

Fixes Issue# N/A

External Dependencies

None

Type of change

Please delete options that are not relevant. Add a 'X' to the one that is applicable.

  • [X ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Implement fixes for ONSAM Jiras

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [X ] Command Line
  • oneapi-cli
  • Visual Studio
  • Eclipse IDE
  • VSCode
  • When compiling the compliler flag "-Wall -Wformat-security -Werror=format-security" was used

@alexsin368 alexsin368 changed the title Using random.sample() instead of random.randint() to avoid Bandit scan issues LangId oneAPI sample: use random.sample() to avoid Bandit scan issues Dec 6, 2022
@jimmytwei jimmytwei merged commit 108b59d into oneapi-src:master Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants