You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The database_dsn rule recognises the tcp(...) protocol in Go MySQL DSN format but fails closed on other valid protocols including tcp6(...), tcp4(...), unix(...), and udp(...).
admin:secret@tcp6([2001:db8::88]:3306)/users fully redacts to asterisks instead of redacting only the userinfo. IPv6 MySQL deployments and unix-socket connections are common; fail-closed leaves users with garbage output.
Surfaced during the post-#54 corpus audit (dozens of IPv6/unix-socket fixtures pinned fail-closed).
Requirements
The DSN protocol-pattern matcher must accept tcp, tcp4, tcp6, unix, udp followed by (addr).
Each protocol behaves the same way: userinfo redacted to ****:****@, protocol+addr+database preserved.
Add table-driven unit cases for each protocol.
Update or add BDD scenarios for tcp6 and unix (name: Scenario: database_dsn redacts userinfo across Go MySQL protocols).
Summary
The
database_dsnrule recognises thetcp(...)protocol in Go MySQL DSN format but fails closed on other valid protocols includingtcp6(...),tcp4(...),unix(...), andudp(...).admin:secret@tcp6([2001:db8::88]:3306)/usersfully redacts to asterisks instead of redacting only the userinfo. IPv6 MySQL deployments and unix-socket connections are common; fail-closed leaves users with garbage output.Surfaced during the post-#54 corpus audit (dozens of IPv6/unix-socket fixtures pinned fail-closed).
Requirements
tcp,tcp4,tcp6,unix,udpfollowed by(addr).****:****@, protocol+addr+database preserved.tcp6andunix(name:Scenario: database_dsn redacts userinfo across Go MySQL protocols).Acceptance criteria
admin:secret@tcp6([2001:db8::88]:3306)/users->****:****@tcp6([2001:db8::88]:3306)/usersadmin:secret@tcp4(127.0.0.1:3306)/db->****:****@tcp4(127.0.0.1:3306)/dbadmin:secret@unix(/var/run/mysqld/mysqld.sock)/db->****:****@unix(/var/run/mysqld/mysqld.sock)/dbadmin:secret@udp(host:3306)/db->****:****@udp(host:3306)/dbtcp6(...)/db?password=otherredacts both userinfo and password paramtcp(...)behaviour unchanged (regression-free)TestApply_DatabaseDSN_GoMySQLProtocolsnamedmake checkgreenTesting requirements
TestApply_DatabaseDSN_GoMySQLProtocols(table-driven; one case per protocol + query-string-secret integration)Scenario: database_dsn redacts userinfo across Go MySQL protocolstcp6(...)/unix(...)fail-closed pinsDocumentation requirements
docs/rules.mdfordatabase_dsnto list every supported Go MySQL protocol token.Dependencies
None. (Builds on #72 query-string secret redaction, already merged.)