allowlists.go 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. // Copyright 2023 Google Inc. All rights reserved.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package genrule
  15. import (
  16. "android/soong/android"
  17. )
  18. var (
  19. DepfileAllowList = []string{
  20. "depfile_allowed_for_test",
  21. "tflite_support_spm_config",
  22. "tflite_support_spm_encoder_config",
  23. "gen_uwb_core_proto",
  24. "libtextclassifier_fbgen_utils_flatbuffers_flatbuffers_test",
  25. "libtextclassifier_fbgen_utils_lua_utils_tests",
  26. "libtextclassifier_fbgen_lang_id_common_flatbuffers_model",
  27. "libtextclassifier_fbgen_lang_id_common_flatbuffers_embedding-network",
  28. "libtextclassifier_fbgen_annotator_datetime_datetime",
  29. "libtextclassifier_fbgen_annotator_model",
  30. "libtextclassifier_fbgen_annotator_experimental_experimental",
  31. "libtextclassifier_fbgen_annotator_entity-data",
  32. "libtextclassifier_fbgen_annotator_person_name_person_name_model",
  33. "libtextclassifier_fbgen_utils_tflite_text_encoder_config",
  34. "libtextclassifier_fbgen_utils_codepoint-range",
  35. "libtextclassifier_fbgen_utils_intents_intent-config",
  36. "libtextclassifier_fbgen_utils_flatbuffers_flatbuffers",
  37. "libtextclassifier_fbgen_utils_zlib_buffer",
  38. "libtextclassifier_fbgen_utils_tokenizer",
  39. "libtextclassifier_fbgen_utils_grammar_rules",
  40. "libtextclassifier_fbgen_utils_grammar_semantics_expression",
  41. "libtextclassifier_fbgen_utils_resources",
  42. "libtextclassifier_fbgen_utils_i18n_language-tag",
  43. "libtextclassifier_fbgen_utils_normalization",
  44. "libtextclassifier_fbgen_utils_container_bit-vector",
  45. "libtextclassifier_fbgen_actions_actions-entity-data",
  46. "libtextclassifier_fbgen_actions_actions_model",
  47. "libtextclassifier_fbgen_utils_grammar_testing_value",
  48. }
  49. SandboxingDenyModuleList = []string{
  50. "framework-javastream-protos",
  51. "RsBalls-rscript",
  52. "CtsRsBlasTestCases-rscript",
  53. "pvmfw_fdt_template_rs",
  54. "RSTest_v14-rscript",
  55. "com.android.apex.test.bar_stripped",
  56. "com.android.apex.test.sharedlibs_secondary_generated",
  57. "ImageProcessingJB-rscript",
  58. "RSTest-rscript",
  59. "BluetoothGeneratedDumpsysBinarySchema_bfbs",
  60. "WmediumdServerProto_h",
  61. "TracingVMProtoStub_h",
  62. "FrontendStub_h",
  63. "VehicleServerProtoStub_cc",
  64. "AudioFocusControlProtoStub_cc",
  65. "AudioFocusControlProtoStub_h",
  66. "TracingVMProtoStub_cc",
  67. "VehicleServerProtoStub_h",
  68. "hidl2aidl_translate_cpp_test_gen_headers",
  69. "hidl2aidl_translate_cpp_test_gen_src",
  70. "hidl2aidl_translate_java_test_gen_src",
  71. "hidl2aidl_translate_ndk_test_gen_headers",
  72. "hidl2aidl_translate_ndk_test_gen_src",
  73. "hidl_hash_test_gen",
  74. "nos_app_avb_service_genc++",
  75. "nos_app_avb_service_genc++_headers",
  76. "nos_app_avb_service_genc++_mock",
  77. "nos_app_identity_service_genc++",
  78. "nos_app_keymaster_service_genc++",
  79. "nos_generator_test_service_genc++_headers",
  80. "nos_generator_test_service_genc++_mock",
  81. "r8retrace-run-retrace",
  82. "ltp_config_arm",
  83. "ltp_config_arm_64_hwasan",
  84. "ltp_config_arm_lowmem",
  85. "ltp_config_arm_64",
  86. "ltp_config_riscv_64",
  87. "ltp_config_x86_64",
  88. "vm-tests-tf-lib",
  89. "hidl_cpp_impl_test_gen-headers",
  90. "pandora_experimental-python-gen-src",
  91. "framework-cppstream-protos",
  92. "Refocus-rscript",
  93. "RSTest_v11-rscript",
  94. "RSTest_v16-rscript",
  95. "ScriptGroupTest-rscript",
  96. "ImageProcessing2-rscript",
  97. "ImageProcessing-rscript",
  98. "com.android.apex.test.pony_stripped",
  99. "com.android.apex.test.baz_stripped",
  100. "com.android.apex.test.foo_stripped",
  101. "com.android.apex.test.sharedlibs_generated",
  102. "CtsRenderscriptTestCases-rscript",
  103. "BlueberryFacadeAndCertGeneratedStub_py",
  104. "BlueberryFacadeGeneratedStub_cc",
  105. "BlueberryFacadeGeneratedStub_h",
  106. "BluetoothGeneratedDumpsysDataSchema_h",
  107. "FrontendStub_cc",
  108. "OpenwrtControlServerProto_cc",
  109. "OpenwrtControlServerProto_h",
  110. "WmediumdServerProto_cc",
  111. "c2hal_test_genc++",
  112. "c2hal_test_genc++_headers",
  113. "hidl2aidl_test_gen_aidl",
  114. "hidl_error_test_gen",
  115. "hidl_export_test_gen-headers",
  116. "hidl_format_test_diff",
  117. "hidl_hash_version_gen",
  118. "libbt_topshim_facade_py_proto",
  119. "nos_app_identity_service_genc++_headers",
  120. "nos_app_identity_service_genc++_mock",
  121. "nos_app_keymaster_service_genc++_headers",
  122. "nos_app_keymaster_service_genc++_mock",
  123. "nos_app_weaver_service_genc++",
  124. "nos_app_weaver_service_genc++_headers",
  125. "nos_app_weaver_service_genc++_mock",
  126. "nos_generator_test_service_genc++",
  127. "pandora-python-gen-src",
  128. }
  129. SandboxingDenyPathList = []string{
  130. "art/test",
  131. "external/perfetto",
  132. }
  133. )
  134. var DepfileAllowSet = map[string]bool{}
  135. var SandboxingDenyModuleSet = map[string]bool{}
  136. var SandboxingDenyPathSet = map[string]bool{}
  137. func init() {
  138. android.AddToStringSet(DepfileAllowSet, DepfileAllowList)
  139. android.AddToStringSet(SandboxingDenyModuleSet, append(DepfileAllowList, SandboxingDenyModuleList...))
  140. android.AddToStringSet(SandboxingDenyPathSet, SandboxingDenyPathList)
  141. }