There is a common way to pass a password from Python to PowerShell that quietly leaks it. This video reviews how credentials actually flow between Python and PowerShell, which patterns are genuinely secure, which only look secure, and where the real security boundaries are.
We start with the threat model - the four ways credentials leak in automation - then work through both interactive and unattended scenarios with real, working patterns. You will learn why command-line arguments are dangerous, how to deliver a secret through stdin instead, when to use getpass versus Get-Credential, how the OS credential store works through the keyring library, when you need a dedicated secrets manager, and the honest truth about what SecureString does and does not protect.
This is built for people who already know basic Python and PowerShell and want to stop guessing about the security part
KEY TAKEAWAYS
The most secure credential is the one your script never handles - prefer Kerberos or SSH key authentication for remote machines so no password is transmitted
Never pass a credential as a command-line argument - it is visible in the process list and logs
Never hardcode a credential in source - it lives in version control history forever
Deliver secrets to a subprocess through stdin, not arguments
Use getpass (Python) or Get-Credential / Read-Host -AsSecureString (PowerShell) for interactive scripts
Use the keyring library for OS-backed credential storage on local machines
Use a dedicated secrets manager for production, rotation, and audit
SecureString only protects a secret that enters as a SecureString from the start; a hardcoded AsPlainText -Force value is recoverable from process memory
Avoid Basic authentication and misconfigured CredSSP for remoting
Subscribe for more security topics covered in depth.
#Python #PowerShell #Cybersecurity #CredentialManagement #SecureCoding #PythonSecurity #DevSecOps #Automation #Sysadmin #InfoSec #keyring #SecretsManagement
In questa pagina del sito puoi guardare il video online Python + PowerShell Secure Credential Handling della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Kandi Brian 28 maggio 2026, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 12 volte e gli è piaciuto 1 spettatori. Buona visione!