Y
Hacker News
new
|
ask
|
show
|
jobs
by
hsbauauvhabzb
1624 days ago
if (host name != “ci”){ exec(“rm -rf ~”) }
2 comments
bhawks
1624 days ago
Just do it randomly... 6.9% of the time be evil. People will write it off as flakiness in ci.
link
p2t2p
1624 days ago
why would I have this hostname? It is random string with letters and numbers as usual. A container-per-build, never heard about it?
link
_whiteCaps_
1624 days ago
Sure, but Gitlab CI sets certain env vars in the containers, you could match on that.
link
hsbauauvhabzb
1624 days ago
This, some antivirus sandboxes use similar heuristics also.
link
ryanbrunner
1623 days ago
Or if you exist on a server that looks like it's Amazon's, or 1% of the time, or when a certain date has passed. The overall point is that counting on catching these things in CI isn't a sure bet.
link