(blog) HTTPS Blog Post#398
Conversation
|
@gep13, |
Merge pull request #398 from gep13/feature/https-blog-post (blog) HTTPS Blog Post
|
@gep13 you say:
That's contradictory to what I see. Looking at the search results I've seen at least 5 repositories within the first 20, that don't have a packages.config file committed. About the minimal risk situation, I'm not sure, so please take this as a question: Looking at how ToolResolutionStrategy is implemented, every call to a tool that should be contained in |
|
Looking in path is how any OS works to find binaries. |
|
@devlead I'm not following? |
|
Agree |
The guidance on the cakebuild.net website is clear, that these files should be checked into your source control repository: https://www.cakebuild.net/docs/tutorials/getting-started What you have us do differently?
Can you elaborate on what you mean here? |
|
Chiming in on the "insecure executable search" part: There is no way for us (a developer-focussed build tool) to pre-empt the possibility of a malicious executable already locally installed on a machine. If we take the hypothetical scenario of a backdoored Compromised local workstations are well and truly outside the scope of a tool like Cake. We've (now) partially pre-empted the risk of a backdoored There's no practical change we could make to cover that sort of a case, and we should be relying on the tools provided by more fully-fledged systems (in this case the OS) then trying to half-bake our own solution and potentially introducing more risk (for an example of this, see any home-grown crypto algorithm). Happy to discuss this as security is really my thing :) |
|
It's also worth noting on the Given we have no evidence of in-the-wild vectors, vulns, payloads or end-to-end attacks focussed on our tool (or any other .NET build tool outside of VS), there's no impetus at this stage for making the sort of drastic changes that would require. Also, to be fair, for developer tool guidance, 75%+ takeup of checking in the If there is/was an actionable, practical solution to this that wouldn't be either a) over-extending our guidance and approach or b) impractical for new and existing users, we're all for it; at this time, there simply isn't much more we can do that would present a meaningful improvement. |
Great, here too :) So first, I'm not talking about compromised executables in the PATH directory. That's of course users fault. What I'm talking about is the previous situation, where it was possible (via man-in-the-middle) to download malicious executables into the The second thing: I've linked the code from ToolResolutionStrategy where file paths are resolved. Like I said, it was rather a question, but from what I see, it resolves paths like this:
So given the fact, that packages could be downloaded without the user being aware, any call to a executable the user expects to be in PATH, could potentially be loaded from |
|
At least there is one thing I can think of. You could modify |
|
@gep13 about this:
I can't agree. The guidance was mostly about having reproducible builds, not having security. And security is not a feature. It should be ensured in whatever way the users is using a tool. |
|
I did the following:
This will fall back to the newly created |
|
@matkoch just so I am 100% clear on this situation, the compromised exe is coming from where? As a malicious package that has been pushed to, say, nuget.org? |
|
@gep13 yes. |
|
@matkoch Okay there's a few things going here, so going to address individually, and in detail:
|
|
I will also add the final note that it's 3am here, so I won't be responding to anything more tonight. See my last paragraph above: happy to discuss further, but maybe in another context and (preferably) another time 😄 |
ToolResolutionStrategyIt's not about an existing local compromise or anything you've mentioned about having to know where an executable is located or not. The attack vector is
That's the only issue that remains after bootstrappers and NuGet.exe have been made to be downloaded via HTTPS. The part about manifest and stuff doesn't seem relevant to me.
Like I said, until recently, the default bootstrappers downloaded packages.config check-inLike I said it's not about downloading a compromised Cake.exe. Failing the build on http detection / CommunicationWell, You've asked what to do except blogging/tweeting, so I've given you a suggestion :) I might be putting more value into security to justify breaking it like that, but of course, a warning will do too. The actual advantage is, that 100% of the affected users will immediately get this warning (if not compromised already :D). Since they didn't commit a packages.config. Good thing I guess. And you could even make it explicit to the full URI, if required. An aside on build tool compromiseI guess there's always a first time for an attack vector. You surely know :) But when it gets public, it should be communicated in a timely manner, don't you agree? It's not my intention to get too academic in this matter. After all, I created the issue as a simple one-liner with the intention to close a little security gap. But well, first you closed it as a duplicate - which it was not, but okay. Then closed the so-called original issue, but didn't fix the actual issue I was talking about. Then you claimed that redirection from HTTP to HTTPS is enough - which is not. And then didn't make a tweet or anything as you promised to do. To be absolutely clear: if you don't want any more input on that, just say so. Some replies made the impression that you don't. Otherwise, given the mentioned on-topic responses, I feel obliged to give further feedback, as it seemed you've overlooked/misunderstood something. Now there is this wrong statement in the blog post about:
|
@cake-build/cake-team can you all have a look at this, and let me know if you have any comments?