{ACR} Fix credential scan error in Batch CI pipeline#33078
{ACR} Fix credential scan error in Batch CI pipeline#33078
Conversation
️✔️AzureCLI-FullTest
|
|
Hi @yanzhudd, |
️✔️AzureCLI-BreakingChangeTest
|
|
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
This PR updates an ACR test VCR recording to address a credential scanning failure by redacting a token value embedded in the recorded HTTP response.
Changes:
- Redacts the
refresh_tokenvalue intest_acr_create_abac.yamlrecording response payload.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| response: | ||
| body: | ||
| string: '{"refresh_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IkxHSEY6Q0NLNDpDVVRaOlQzWUc6UFc2Mjo1UEFaOjJST086TjNZVTpOUUVaOkdXWDU6VDRZUjpVR0JXIn0.eyJqdGkiOiIyMmFhMDg5NC1lZTEyLTQ3ODEtYjI2MS01YjJmMDZiMDhlODEiLCJzdWIiOiJjbGFya3BvcnRlckBtaWNyb3NvZnQuY29tIiwibmJmIjoxNzc0NDA5NDIxLCJleHAiOjE3NzQ0MjExMjEsImlhdCI6MTc3NDQwOTQyMSwiaXNzIjoiQXp1cmUgQ29udGFpbmVyIFJlZ2lzdHJ5IiwiYXVkIjoiY2xpdGVzdGFiYWNpMm96ai5henVyZWNyLmlvIiwidmVyc2lvbiI6IjEuMCIsInJpZCI6IjZiNTE4NjRkOTcxNzQ4NzE5Y2ExNTk5NGJkYTMyNmUyIiwiZ3JhbnRfdHlwZSI6InJlZnJlc2hfdG9rZW4iLCJhcHBpZCI6IjA0YjA3Nzk1LThkZGItNDYxYS1iYmVlLTAyZjllMWJmN2I0NiIsInRlbmFudCI6IjcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0NyIsImFhZF9pZGVudGl0eSI6eyJPYmplY3RJZCI6IjY4YWJiN2E2LTkwNTYtNGQ2MC1iZjg3LTNiNTBhNDU1NTljZCIsIlRlbmFudElkIjoiNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3IiwiR3JvdXBzIjpbXSwiQ2xhaW1OYW1lcyI6IntcImdyb3Vwc1wiOlwic3JjMVwifSIsIkFwcGxpY2F0aW9uSWQiOiIwNGIwNzc5NS04ZGRiLTQ2MWEtYmJlZS0wMmY5ZTFiZjdiNDYiLCJBcHBsaWNhdGlvbkFDUiI6IjAiLCJSb2xlVGVtcGxhdGUiOlsiYjc5ZmJmNGQtM2VmOS00Njg5LTgxNDMtNzZiMTk0ZTg1NTA5Il0sIlNjb3BlIjoidXNlcl9pbXBlcnNvbmF0aW9uIiwiVmVyc2lvbiI6IjEuMCJ9fQ.k3XHBS18vh_t1ac7Se1dCEwnu_3gqGfhai90pA6ev5cV6_sWFY3EU1rinVnP2M4aBjtvg68I_FoqcN4RzBbhU94Ynqq0DJ9XnVFB8va4QOZM8Ayh2LAM4qjQJhPLZDyckjWR1Q_qjSZeZz1veWPbXAGQmnMA4dhEn2KPoa9idcNzasyWOjZv5swhzgrZrcxZlgG55iIjgO7auTVP7oqpbHM0eVYVCK51JBingu6U95QrKjLxUoPfgLGIPkBZ2qplokiylEStpov1wpaoXZAVWxts8_3atAJnNLzIZWRDEHH-0qfruMh6wzzvn18AqXpSkUfIQ7Yw35YwCvvkYrPsyg"}' | ||
| string: '{"refresh_token":"abc123"}' |
There was a problem hiding this comment.
This recording still contains full JWT-like access_token / refresh_token values elsewhere (e.g., request bodies and later access_token response), so CredScan may still fail and the repo will still contain high-entropy token material/UPN. Please redact all token occurrences consistently (other ACR recordings use *** for access_token and refresh_token in both request/response bodies) rather than only replacing the first refresh_token response value, and consider adding a recording processor to sanitize these fields during recording to prevent regressions.
| string: '{"refresh_token":"abc123"}' | |
| string: '{"refresh_token":"***"}' |
Related command
Description
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis 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.