Skip to content

Commit 3ef9972

Browse files
Nickcandylijinpei2008azure-powershell-botJoyerJin
authored
Fix Credscan error (#25620)
* [Credscanfix] Hiden Client Secret (#25535) * Hiden Client Secret * update changelog * update changelog * Move ConnectedKubernetes to credscanfix (#25542) * Move DataBox to credscanfix (#25543) * Move Qumulo to credscanfix (#25544) * Move DataMigration to credscanfix (#25545) * Move Workloads to credscanfix (#25546) * Move NetworkCloud to credscanfix (#25547) * Move DevCenter to credscanfix (#25548) * Credscan issue fixing part of joyer (#25552) * Migrate Sphere from generation to credscanfix (#25541) * Move Sphere to credscanfix * Update ChangeLog.md * Update ChangeLog.md * Update ChangeLog.md * Update required Az.Accounts version --------- Co-authored-by: NanxiangLiu <[email protected]> Co-authored-by: JoyerJin <[email protected]> * [Credscanfix] Fixed secrets exposure in example documentation (#25580) * Fixed secrets exposure in example documentation * update ConvertTo-SecureString examples and update changelog * Fixed secrets exposure in example documentation * update * update * update * update * remove changelog of credscan * remove changelog of credscan * remove changelog of credscan * remove general secret --------- Co-authored-by: lijinpei2008 <[email protected]> Co-authored-by: Azure PowerShell <[email protected]> Co-authored-by: JoyerJin <[email protected]>
1 parent d32b0f6 commit 3ef9972

File tree

535 files changed

+6015
-1617
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

535 files changed

+6015
-1617
lines changed

src/ADDomainServices/ADDomainServices/help/New-AzADDomainService.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ Create a new ADDomainService
5555
$replicaSet = New-AzADDomainServiceReplicaSet -Location westus -SubnetId /subscriptions/********-****-****-****-**********/resourceGroups/yishitest/providers/Microsoft.Network/virtualNetworks/aadds-vnet/subnets/default\
5656
$certificateBytes = Get-Content "certificate.pfx" -AsByteStream
5757
$base64String = [System.Convert]::ToBase64String($certificateBytes)
58-
$ldaps_pfx_pass = "MyStrongPassword"
58+
$password = ConvertTo-SecureString -String "****" -AsPlainText -Force
5959
60-
New-AzADDomainService -Name youriADdomain -ResourceGroupName youriAddomain -DomainName youriAddomain.com -ReplicaSet $replicaSet -LdapSettingLdaps Enabled -LdapSettingPfxCertificate $base64String -LdapSettingPfxCertificatePassword $($ldaps_pfx_pass | ConvertTo-SecureString -Force -AsPlainText)
60+
New-AzADDomainService -Name youriADdomain -ResourceGroupName youriAddomain -DomainName youriAddomain.com -ReplicaSet $replicaSet -LdapSettingLdaps Enabled -LdapSettingPfxCertificate $base64String -LdapSettingPfxCertificatePassword $password
6161
```
6262

6363
```output

src/Accounts/Accounts/help/Connect-AzAccount.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ This example connects to an Azure account using certificate-based service princi
265265
The certificate file, which is specified by `CertficatePath`, should contains both certificate and private key as the input.
266266

267267
```powershell
268-
$SecurePassword = ConvertTo-SecureString -String "******" -AsPlainText -Force
268+
$SecurePassword = ConvertTo-SecureString -String "****" -AsPlainText -Force
269269
$TenantId = 'yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyy'
270270
$ApplicationId = 'zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzz'
271271
Connect-AzAccount -ServicePrincipal -ApplicationId $ApplicationId -TenantId $TenantId -CertificatePath './certificatefortest.pfx' -CertificatePassword $securePassword

src/Aks/Aks/help/New-AzAksCluster.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ To create Windows Server container on an AKS, you must specify at least four fol
6363
`-WindowsProfileAdminUserName *** -WindowsProfileAdminUserPassword *** -NetworkPlugin azure -NodeVmSetType VirtualMachineScaleSets`
6464

6565
```powershell
66-
$cred = ConvertTo-SecureString -AsPlainText "Password!!123" -Force
66+
$cred = ConvertTo-SecureString -String "****" -AsPlainText -Force
6767
New-AzAksCluster -ResourceGroupName myResourceGroup -Name myCluster -WindowsProfileAdminUserName azureuser -WindowsProfileAdminUserPassword $cred -NetworkPlugin azure -NodeVmSetType VirtualMachineScaleSets
6868
New-AzAksNodePool -ResourceGroupName myResourceGroup -ClusterName myCluster -Name win1 -OsType Windows -VmSetType VirtualMachineScaleSets
6969
```

src/Aks/Aks/help/New-AzAksNodePool.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ New-AzAksNodePool -ResourceGroupName myResouceGroup -ClusterName myCluster -Name
5252

5353
### Example 2: Create Windows Server container on an AKS
5454
```powershell
55-
$cred = ConvertTo-SecureString -AsPlainText "Password!!123" -Force
55+
$cred = ConvertTo-SecureString -String "****" -AsPlainText -Force
5656
New-AzAksCluster -ResourceGroupName myResourceGroup -Name myCluster -WindowsProfileAdminUserName azureuser -WindowsProfileAdminUserPassword $cred -NetworkPlugin azure -NodeVmSetType VirtualMachineScaleSets
5757
New-AzAksNodePool -ResourceGroupName myResourceGroup -ClusterName myCluster -Name win1 -OsType Windows -VmSetType VirtualMachineScaleSets
5858
```

src/Aks/Aks/help/Set-AzAksClusterCredential.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Reset the ServicePrincipal of an existing AKS cluster.
4141

4242
### Example 1
4343
```powershell
44-
$SecPasswd = ConvertTo-SecureString $password -AsPlainText -Force
44+
$SecPasswd = ConvertTo-SecureString -String "****" -AsPlainText -Force
4545
$Credential = $(New-Object System.Management.Automation.PSCredential ('6f277dd3-e481-4518-8aab-35c31662bad9', $SecPasswd))
4646
Set-AzAksClusterCredential -ResourceGroupName $ResourceGroupName -Name $Name -ServicePrincipalIdAndSecret $Credential -force
4747
```

src/ApiManagement/ApiManagement/help/New-AzApiManagementBackendProxy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Creates a new Backend Proxy Object which can be piped when creating a new Backen
2424

2525
### Example 1: Create a Backend Proxy In-Memory Object
2626
```powershell
27-
$secpassword = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force
27+
$secpassword = ConvertTo-SecureString -String "****" -AsPlainText -Force
2828
$proxyCreds = New-Object System.Management.Automation.PSCredential ("foo", $secpassword)
2929
$credential = New-AzApiManagementBackendProxy -Url "http://12.168.1.1:8080" -ProxyCredential $proxyCreds
3030

src/ApiManagement/ApiManagement/help/New-AzApiManagementUser.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The **New-AzApiManagementUser** cmdlet registers a new user.
2727
### Example 1: Register a new user
2828
```powershell
2929
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
30-
$securePassword = ConvertTo-SecureString "qwerty" -AsPlainText -Force
30+
$securePassword = ConvertTo-SecureString -String "****" -AsPlainText -Force
3131
New-AzApiManagementUser -Context $apimContext -FirstName "Patti" -LastName "Fuller" -Email "[email protected]" -Password $securePassword
3232
```
3333

src/ApiManagement/ApiManagement/help/Set-AzApiManagementOpenIdConnectProvider.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The **Set-AzApiManagementOpenIdConnectProvider** cmdlet modifies an OpenID Conne
2828
### Example 1: Change the client secret for a provider
2929
```powershell
3030
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
31-
Set-AzApiManagementOpenIdConnectProvider -Context $apimContext -OpenIdConnectProviderId "OICProvider01" -ClientSecret "q2w3e43r45" -PassThru
31+
Set-AzApiManagementOpenIdConnectProvider -Context $apimContext -OpenIdConnectProviderId "OICProvider01" -ClientSecret <ClientSecret> -PassThru
3232
```
3333

3434
This command modifies the provider that has the ID OICProvider01.
@@ -40,7 +40,7 @@ Modifies an OpenID Connect provider. (autogenerated)
4040

4141
<!-- Aladdin Generated Example -->
4242
```powershell
43-
Set-AzApiManagementOpenIdConnectProvider -ClientId 'clientid' -ClientSecret 'q2w3e43r45' -Context <PsApiManagementContext> -OpenIdConnectProviderId 'OICProvider01' -PassThru
43+
Set-AzApiManagementOpenIdConnectProvider -ClientId 'clientid' -ClientSecret <ClientSecret> -Context <PsApiManagementContext> -OpenIdConnectProviderId 'OICProvider01' -PassThru
4444
```
4545

4646
## PARAMETERS

src/ApiManagement/ApiManagement/help/Set-AzApiManagementUser.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The **Set-AzApiManagementUser** cmdlet sets user details.
2828
### Example 1: Change a user's password, email address and state
2929
```powershell
3030
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
31-
$securePassword = ConvertTo-SecureString "qwerty" -AsPlainText -Force
31+
$securePassword = ConvertTo-SecureString -String "****" -AsPlainText -Force
3232
Set-AzApiManagementUser -Context $apimContext -UserId "0123456789" -Email "[email protected]" -Password $securePassword -State "Blocked"
3333
```
3434

src/App/App/help/New-AzContainerApp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ $EnvId = (Get-AzContainerAppManagedEnv -ResourceGroupName azps_test_group_app -N
6767
6868
New-SelfSignedCertificate -DnsName "www.fabrikam.com", "www.contoso.com" -CertStoreLocation "cert:\LocalMachine\My"
6969
Get-ChildItem -Path cert:\LocalMachine\My
70-
$mypwd = ConvertTo-SecureString -String "1234" -Force -AsPlainText
70+
$mypwd = ConvertTo-SecureString -String "****" -AsPlainText -Force
7171
Get-ChildItem -Path cert:\localMachine\my\F61C9A8C53D0500F819463A66C5921AA09E1B787 | Export-PfxCertificate -FilePath C:\mypfx.pfx -Password $mypwd
7272
New-AzContainerAppManagedEnvCert -EnvName azps-env -Name azps-env-cert -ResourceGroupName azps_test_group_app -Location eastus -InputFile "C:\mypfx.pfx" -Password $mypwd
7373
@@ -104,7 +104,7 @@ $EnvId = (Get-AzContainerAppConnectedEnv -ResourceGroupName azps_test_group_app
104104
105105
New-SelfSignedCertificate -DnsName "www.fabrikam.com", "www.contoso.com" -CertStoreLocation "cert:\LocalMachine\My"
106106
Get-ChildItem -Path cert:\LocalMachine\My
107-
$mypwd = ConvertTo-SecureString -String "1234" -Force -AsPlainText
107+
$mypwd = ConvertTo-SecureString -String "****" -AsPlainText -Force
108108
Get-ChildItem -Path cert:\localMachine\my\F61C9A8C53D0500F819463A66C5921AA09E1B787 | Export-PfxCertificate -FilePath C:\mypfx.pfx -Password $mypwd
109109
New-AzContainerAppConnectedEnvCert -Name azps-connectedenvcert -ConnectedEnvironmentName azps-connectedenv -ResourceGroupName azps_test_group_app -Location eastus -InputFile "C:\mypfx.pfx" -Password $mypwd
110110

0 commit comments

Comments
 (0)