Agent Wranglers

APS-79Recommended

Keep private data out of logs and addresses

Never put passwords, tokens, card numbers or personal details in addresses or logs.

How to do it

Send private values in the request body or a header, never in the query string. Addresses end up in logs, browser history and Referer headers, as keep personal data out of addresses explains. Redact fields in the logger and drop IP addresses as keep personal data out of logs says. This rule is the attack test for both. Collect less in the first place, as in data minimization.

How to check

The agent logs in, resets a password and places a test order. Then it searches the staging logs for the test password, token and email address. None of them appear.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/application-security/errors-logs-and-vulnerabilities/private-data-out-of-logs">Agent Wranglers application security playbook</a>. In code you write, add a comment next to it with the same link.