Settings

Theme

Ask HN: Why do tests run in production repos?

2 points by boldi 2 years ago · 2 comments · 1 min read


In light of the recent xz backdoor, I was wondering what the potential use, if any, there is in shipping test folders in release/production branches? Wouldn't it seem more reasonable to have a separate "dev" branch to have the tests of folders?

austin-cheney 2 years ago

Unrelated. Test automation is not an indicator of insecurity. If the mere presence of tests expose security vulnerabilities your product is insecure irrespective of the tests. In these cases fix the security problems.

I have always shipped test automation in production with my personal software. It allows users to independently validate the health of the product in their own operating conditions and write better more precise defects.

  • TacticalCoder 2 years ago

    > If the mere presence of tests expose security vulnerabilities your product is insecure irrespective of the tests.

    Wait... I may be misunderstanding but in the xz backdoor we just had, had the tests not be ran in prod, the attacker would have had no way to ever ship its mandatory evil binary payload and the attack would have been stopped dead in its track.

    I'm very surprised to see this dismissed as "unrelated" when not including the test files in the prod environment would have prevented that exploit.

    At least as I understand it.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection