News for hackers. Stuff that matters.
Re:Show HN: Ultimate Plumber – a tool for writing Linux pipe... by rcthompson on Wednesday October 24, 2018 @01:13PM (#18294357)
Consider that the filesystem isn't necessarily the only thing you can mess up by accident. It's much more unlikely, but you could accidentally trigger a bunch of unwanted network requests (e.g. piping into `xargs curl` or something), among other possible things with external effects.
Re:Show HN: Ultimate Plumber – a tool for writing Linux pipe... by akavel on Wednesday October 24, 2018 @02:01PM (#18294820)
Maybe cutting off network access could be done too? That would reduce some potentially useful features, but it could be a parameter to enable it (hey, we're talking Linux, never enough parameters! ;). That is, assuming that a syscalls/capabilities trick like that is possible at all. (Anyone can say more here? Some kernel hackers? This is HN, ain't it?)
Re:Show HN: Ultimate Plumber – a tool for writing Linux pipe... by rcthompson on Wednesday October 24, 2018 @02:15PM (#18294934)
Yeah, I think almost any ability to produce an effect other than printing to stdout and stderr should probably be restricted by default, with a flag to enable it. If people adopt this and frequently use specific capabilities, they can add a shell alias to add enable their preferred set of capabilities.
Re:Show HN: Ultimate Plumber – a tool for writing Linux pipe... by rcthompson on Wednesday October 24, 2018 @03:38PM (#18295649)
Or, one possible alternative would be to always prevent any side-effects other than printing output, and then display a warning saying something like "This command tried to access the network/modify the filesystem/be naughty in some other way. To allow this and re-run the command, press Control+Shift+Enter"
Re:Show HN: Ultimate Plumber – a tool for writing Linux pipe... by em-bee on Wednesday October 24, 2018 @07:32PM (#18297392)
capabilities should certainly work. for portability, setting a non-existant proxy should also help. most commandline tools should honor shell proxy variables and fail the request.

greetings, eMBee.