Avoiding Sensitive Data Leakage
As a systems administrator, there’s a very good chance that you’ll eventually have to deal with some sort of sensitive data, such as passwords, financial information, or customer information. You’ll always want to ensure that your scripts don’t inadvertently cause any sensitive data to leak out to any unauthorized people. Let’s look at some ways that that could happen, and how to prevent it.
Securing Temporary Files
At some point, you might need to create scripts that store some sort of ephemeral data in a temporary file. Reasons that you might need to do this include:
- Processing a large amount of data without using excessive system memory.
- Storing the intermediate results of some sort of complex operation.
- Storing temporary data for logging debugging information.
- Allowing different processes or scripts to communicate with each other.
Since the /tmp/
directory is the most...