Hello MrLinear,
What are you trying to accomplish by storing the .p8 key in the System Keychain? "Secure" can mean a few different things based off of the context of the environment that you are working with.
To answer the question though, the .p8 key is simply a string of text identifying your private key. What you can do is open this with any raw text editor and then create a new password in your system keychain, name it something unqiue, then store the text as the password. This is really your only option for putting this into the system keychain, but depending on the environment where this exists, you might want to use a custom keychain and then reference that keychain specifically when working with the API or environment in which you are building to interact with the App Store Connect API.
If you can share more information about the environment I would be happy to dive deeper into the solution with you!
Hopefully this helps!