Hello @braxx and welcome to Microsoft Q&A.
Yes there is a more secure way to work with your key/password/confidential header.
There is a parameter type called SecureString. Instead of placing the value directly in the Copy Activity header, place it in a parameter of type SecureString. Then in the Copy Activity header, refer to it. There is a complication, but first to show you how its done.
@pipeline().parameters.secureHeader
The complication is when using Git Mode you may see an error like below, telling you SecureString cannot have a default value.
The solution is to leave the value in the pipeline blank, but instead give the value when you make a trigger. The trigger can store and hide the key. The trigger then gives the key to the pipeline parameter, which gives it to the web activity header.