1.7 Verify That the 'PGPASSWORD' Environment Variable is Not in Use

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version

Information

PostgreSQL can read a default database password from an environment variable called PGPASSWORD.

Rationale:

Using the PGPASSWORD environment variable implies PostgreSQL credentials are stored as clear text. Avoiding use of this environment variable can better safeguard the confidentiality of PostgreSQL credentials.

Solution

Check which users and/or scripts are setting PGPASSWORD and change them
to use a more secure method.

See Also

https://workbench.cisecurity.org/benchmarks/17004