TMAegis
Thêm quy tắc cho postgres

PostgreSQL

TMA-POSTGRES-5.1

Do Not Specify Passwords in the Command Line

Trung bìnhCấp 1Xem xét thủ côngpostgres

Mô tả

When a command is executed on the command line, for example ; psql postgresql://postgres:PASSWORD@host the password may be visible in the user's shell/command history or in the process list, thus exposing the password to other entities on the server.

Cách kiểm tra

Phương pháp kiểm tra: Xem xét thủ công

Khuyến nghị này không thể kiểm tra tự động. Lần quét sẽ liệt kê mục này kèm hướng dẫn khi bạn truyền cờ --include-manual.

Check the process list (sudo ps -few) and shell histories (history, ~/.bash_history) for psql/pg_dump invocations that contain a password, e.g. in a connection string (password=...). Any visible password is a fail.

Cách khắc phục

Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng

Do not pass passwords on the command line; use ~/.pgpass (mode 0600), a service file without passwords, or certificate authentication, and clear exposed history entries.

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
postgresdatabasecredentialsmanual
Tham chiếu
CIS PostgreSQL 18 Benchmark v1.0.0 - 5.1 Do Not Specify Passwords in the Command Line