{Misc.} Port credscan false positive fix from release to dev#32881
{Misc.} Port credscan false positive fix from release to dev#32881naga-nandyala wants to merge 1 commit intodevfrom
Conversation
️✔️AzureCLI-FullTest
|
❌AzureCLI-BreakingChangeTest
Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull request overview
Ports CredScan false-positive suppressions from release to dev to unblock CI scans for ARO unit test dummy credential values.
Changes:
- Add three new CredScan placeholder suppressions for ARO test dummy values (
asdfghjkl,secret_123,client_id_456).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { | ||
| "placeholder": "asdfghjkl", | ||
| "_justification": "[ARO] Dummy client_secret value in test_validators.py unit tests" | ||
| }, | ||
| { | ||
| "placeholder": "secret_123", | ||
| "_justification": "[ARO] Dummy client_secret value in test_validators.py unit tests" | ||
| }, | ||
| { |
There was a problem hiding this comment.
These new suppressions are global placeholder matches, which can unintentionally suppress unrelated findings elsewhere in the repo. In particular, asdfghjkl also appears in src/azure-cli/azure/cli/command_modules/resource/tests/latest/test-largesize-parameters.json, so this suppression would hide any CredScan hits there too. Please scope the suppression to the specific ARO test file (or use a more specific placeholder string) so only the intended false positive is suppressed.
| { | |
| "placeholder": "asdfghjkl", | |
| "_justification": "[ARO] Dummy client_secret value in test_validators.py unit tests" | |
| }, | |
| { | |
| "placeholder": "secret_123", | |
| "_justification": "[ARO] Dummy client_secret value in test_validators.py unit tests" | |
| }, | |
| { | |
| { | |
| "file": [ | |
| "src/azure-cli/azure/cli/command_modules/aro/tests/latest/test_validators.py" | |
| ], | |
| "placeholder": "asdfghjkl", | |
| "_justification": "[ARO] Dummy client_secret value in test_validators.py unit tests" | |
| }, | |
| { | |
| "file": [ | |
| "src/azure-cli/azure/cli/command_modules/aro/tests/latest/test_validators.py" | |
| ], | |
| "placeholder": "secret_123", | |
| "_justification": "[ARO] Dummy client_secret value in test_validators.py unit tests" | |
| }, | |
| { | |
| "file": [ | |
| "src/azure-cli/azure/cli/command_modules/aro/tests/latest/test_validators.py" | |
| ], |
| "placeholder": "asdfghjkl", | ||
| "_justification": "[ARO] Dummy client_secret value in test_validators.py unit tests" | ||
| }, | ||
| { | ||
| "placeholder": "secret_123", | ||
| "_justification": "[ARO] Dummy client_secret value in test_validators.py unit tests" | ||
| }, | ||
| { | ||
| "placeholder": "client_id_456", | ||
| "_justification": "[ARO] Dummy client_id value in test_validators.py unit tests" |
There was a problem hiding this comment.
For secret_123 and client_id_456, consider scoping the suppression to the specific aro/tests/latest/test_validators.py file (or a more specific placeholder string). Leaving these as global placeholders increases the chance of masking real findings if the same strings appear in other tests or fixtures later.
| "placeholder": "asdfghjkl", | |
| "_justification": "[ARO] Dummy client_secret value in test_validators.py unit tests" | |
| }, | |
| { | |
| "placeholder": "secret_123", | |
| "_justification": "[ARO] Dummy client_secret value in test_validators.py unit tests" | |
| }, | |
| { | |
| "placeholder": "client_id_456", | |
| "_justification": "[ARO] Dummy client_id value in test_validators.py unit tests" | |
| "file": [ | |
| "src\\azure-cli\\azure\\cli\\command_modules\\aro\\tests\\latest\\test_validators.py" | |
| ], | |
| "_justification": "[ARO] Dummy client_secret value in test_validators.py unit tests (asdfghjkl)" | |
| }, | |
| { | |
| "file": [ | |
| "src\\azure-cli\\azure\\cli\\command_modules\\aro\\tests\\latest\\test_validators.py" | |
| ], | |
| "_justification": "[ARO] Dummy client_secret value in test_validators.py unit tests (secret_123)" | |
| }, | |
| { | |
| "file": [ | |
| "src\\azure-cli\\azure\\cli\\command_modules\\aro\\tests\\latest\\test_validators.py" | |
| ], | |
| "_justification": "[ARO] Dummy client_id value in test_validators.py unit tests (client_id_456)" |
Related command
Description
Cherry-pick of #32847 from
releasebranch todev.This fix adds CredScan suppressions for ARO (Azure Red Hat OpenShift) dummy test values that were flagged as false positives:
asdfghjkl— dummy client_secret in test_validators.pysecret_123— dummy client_secret in test_validators.pyclient_id_456— dummy client_id in test_validators.pyThe original fix (#32847) was merged directly to
releasebut was never ported back todev. This PR bringsdevin sync withreleasefor the CredScan suppression file.Testing Guide
History Notes
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.