Re:GitHub: Widespread Injection Vulnerabilities in Actions
by __david__ on Tuesday November 03, 2020 @01:23PM
(#24982395)
I disagree. This bug is about trying to embed control commands into an arbitrary non-structured data stream. This is a bad idea, no matter if it's text or binary. The proper way to do this would be like the report says: open a separate channel from control commands. This is just like any other injection attack and not related to the unix philosophy.
Re:GitHub: Widespread Injection Vulnerabilities in Actions
by naikrovek on Tuesday November 03, 2020 @01:45PM
(#24982622)
It's the "non-structured" part of what you said that I tried, and failed, to point out with my comment.
Re:GitHub: Widespread Injection Vulnerabilities in Actions
by pushrax on Tuesday November 03, 2020 @05:45PM
(#24984903)
You don't need structure for secure control though, as long as the control channel is isolated. It's easier to make an insecure program when dealing with loosely described text streams, but it's by no means inevitable.
Re:GitHub: Widespread Injection Vulnerabilities in Actions
by saagarjha on Wednesday November 04, 2020 @06:33AM
(#24988142)
Doesn't have to be text.
Re:GitHub: Widespread Injection Vulnerabilities in Actions
by hn_throwaway_99 on Tuesday November 03, 2020 @02:20PM
(#24982956)
That's absolutely not what leads to exploits like these. What leads to exploits like these is "Interpreting output from untrusted code (i.e. output from arbitrary commands) in a manner which allows execution of protected commands (i.e. setting env vars)". Which is like the primary reason for most security vulnerabilities.
Re:GitHub: Widespread Injection Vulnerabilities in Actions
by jradd on Wednesday November 04, 2020 @04:50PM
(#24993391)
good point.
i think 'getting env vars' is the bigger issue here.
Re:GitHub: Widespread Injection Vulnerabilities in Actions
by CodesInChaos on Thursday November 05, 2020 @11:04AM
(#24999349)
I think switching text for a structured format is the solution. I'd go for some encoding of s-expressions, since it's the simplest format that supports reliable splitting into atoms and nesting.
"Text as a cross-application data transfer format" and the Unix Philosophy of "chains of small programs that each do a single thing well" are what lead to exploits like these.
I don't know what the proper system design is, but it isn't these two things. Disagree all you like.