logoalt Hacker News

evgpbfhnrtoday at 4:35 AM1 replyview on HN

> I’m also intrigued by the potential that type systems have for “tagging” secrets and preventing their propagation beyond where they’re needed

facet (rust) allows tagging fields as sensitive so they won't show up in logs: https://facet.rs/guide/attributes/#sensitive

I'm sure other languages have equivalents but I rarely see this.. for example I was about to say serde doesn't do it, but it looks like it's possible with a wrapper type? https://docs.rs/redactrs/latest/redactrs/

Anyway, this kind of tagging is good, I want more!


Replies

Y-bartoday at 6:22 AM

PHP has the SensitiveParameter attribute for treating fields/variables as sensitive.

https://www.php.net/manual/en/class.sensitiveparameter.php