-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Programmatic usage can't use internal package internal/providers #117
Comments
Thanks for reporting! I'll look into this. What version of Go are you using? |
Thanks! I'm using Go 1.18.1 now but have also seen this on 1.17.8 and 1.18. I'm about 70% sure the example just can't work as an external package with the providers being in an internal path but it's very possible I'm doing something wrong. |
It works for me on go1.17.3, it's probably a bad practice that doesn't work in more recent Go versions. Just to make sure, could you try on go1.17.3? I'll look into how to fix it |
I got the same error on 1.17.3. It works fine if I run it from a copy of the stratus-red-team repo though (on any of those versions). I think this is just the internal package rule kicking in:
So it's OK for It looks like any custom detonation function needs to do something like |
Thanks for hanging tight! See #120 for a fix. Could you give it a try? The best way is to download the branch locally (
As soon as you confirm it fixes the issue I'll merge it and release v1.7.2 with the fix. |
That's perfect, the example works for me now. Thanks for the fix! |
Great! Thanks for confirming. |
Released as part of v1.7.2, being built as we speak (it should take around 30 minutes for the Github release to show up). |
I'm trying to use stratus-red-team as a library from a custom orchestrator. Basic usage works fine but when trying to replicate the custom technique example, it doesn't seem to be usable outside of the stratus-red-team repo:
detonate_custom_technique.go:9:2: use of internal package github.com/datadog/stratus-red-team/internal/providers not allowed
It seems like the AWS provider is critical here and there isn't another way to access it, so to allow for use as a library it shouldn't be marked internal?
Full example of what I was trying in an empty directory:
The text was updated successfully, but these errors were encountered: