-
Notifications
You must be signed in to change notification settings - Fork 274
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
Vulnerability warning logged when placing proto files in default Android source set #357
Comments
Maybe protobuf-gradle-plugin/src/main/groovy/com/google/protobuf/gradle/ProtobufPlugin.groovy Line 346 in 8f78c0f
|
Bump! Any thoughts on how to address this? Happy to have a go if someone can validate the suggestion above. |
Sorry for missing track of this issue. It mainly indicates that your
for the part you omitted probably has something that effectively doing The source code line you pointed to is to add the output of proto extraction tasks to proto generation tasks with the file hierarchy preserved, while the warning is logged inside the execution of proto extraction tasks. So it should not be the cause. If you are able to turn on the debug log, you should be able to see the log message for protobuf-gradle-plugin/src/main/groovy/com/google/protobuf/gradle/ProtobufExtract.groovy Line 97 in 15607b4
which may give you more insights about what is happening. |
Now I understand what's happening for this issue. The warning does (and only) happen in Android projects for protobuf-gradle-plugin/src/main/groovy/com/google/protobuf/gradle/ProtobufPlugin.groovy Lines 408 to 423 in 7f96483
I am highly suspecting this is redundant since the change of using the intermediate Update: those hacks for including main's/variant-under-test's proto in the test variant (unitTest or androidTest) is indeed necessary. Otherwise, the test variant is not able to import protos defined in the variant under test. One approach I can think of to avoid warning for these internal things is to use a separate |
When adding protos from the tested variant in Android projects, add only top-level dirs to avoid logging the warning. Fixes google#357 Test: ProtobufAndroidPluginTest
When adding protos from the tested variant in Android projects, add only top-level dirs to avoid logging the warning. Fixes #357 Test: ProtobufAndroidPluginTest
In a minimal Android project with configuration like
when I run the
testDebug
Gradle task, I see the following warning:As you can see from the build.gradle file, I did not explicitly reference source files using
files
orfileTree
, instead relying on the default plugin behavior to locatesource.proto
. It seems likely that the default implementation is triggering the warning somehow; perhaps it needs to be updated?The text was updated successfully, but these errors were encountered: