diff options
author | Christopher Dombroski <cdombroski@google.com> | 2021-07-16 22:45:27 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-07-16 22:45:27 +0000 |
commit | 0a19afa7faf6a44590e055d06f4c5a7317b87e98 (patch) | |
tree | 9210b098117830f6e327e630a21042edc2e65741 | |
parent | 5bc8e8fb8861cd14fa8ffae7df7a30d9e4d8c5c1 (diff) | |
parent | 628e1f3115831fc145f66ef029332350ddfa6e06 (diff) | |
download | platform_testing-0a19afa7faf6a44590e055d06f4c5a7317b87e98.tar.gz |
STS add AsbSecurityTest annotation am: a84d64f639 am: d627b2e800 am: 628e1f3115
Original change: https://googleplex-android-review.googlesource.com/c/platform/platform_testing/+/15313255
Change-Id: Id96a3e488f4f1df593501baec7e899b653aa78e8
3 files changed, 46 insertions, 4 deletions
diff --git a/libraries/annotations/src/android/platform/test/annotations/AsbSecurityTest.java b/libraries/annotations/src/android/platform/test/annotations/AsbSecurityTest.java new file mode 100644 index 000000000..dd9b36aab --- /dev/null +++ b/libraries/annotations/src/android/platform/test/annotations/AsbSecurityTest.java @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.platform.test.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Marks the type of test with purpose of evaluating security vulnerabilities against the Android + * Security Bulletin (ASB). + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD, ElementType.TYPE}) +public @interface AsbSecurityTest { + /** The CVE bug id which contains the ASA hotlists. */ + long[] cveBugId(); +} + diff --git a/libraries/annotations/src/android/platform/test/annotations/RootPermissionTest.java b/libraries/annotations/src/android/platform/test/annotations/RootPermissionTest.java index f520ef62e..b0c3f33b2 100644 --- a/libraries/annotations/src/android/platform/test/annotations/RootPermissionTest.java +++ b/libraries/annotations/src/android/platform/test/annotations/RootPermissionTest.java @@ -31,13 +31,17 @@ import java.lang.annotation.Target; public @interface RootPermissionTest { // Denotes the patch level when the test was introduced - // TODO : Remove the default value. Need one in the interim whilst we undertake - // the effort to annotate the existing tests with a corresponding patch-level. + /** @deprecated @see android.platform.test.annotations.AsbSecurityTest */ + @Deprecated String minPatchLevel() default ""; // Denotes the CVE ID(s), comma-separated, to which this test applies. + /** @deprecated @see android.platform.test.annotations.AsbSecurityTest */ + @Deprecated String cve() default ""; // Denotes the scope (platform/kernel/vendor) to which this test applies. + /** @deprecated @see android.platform.test.annotations.AsbSecurityTest */ + @Deprecated String scope() default ""; } diff --git a/libraries/annotations/src/android/platform/test/annotations/SecurityTest.java b/libraries/annotations/src/android/platform/test/annotations/SecurityTest.java index 1154c6fc5..a8ee222aa 100644 --- a/libraries/annotations/src/android/platform/test/annotations/SecurityTest.java +++ b/libraries/annotations/src/android/platform/test/annotations/SecurityTest.java @@ -30,13 +30,17 @@ import java.lang.annotation.Target; public @interface SecurityTest { // Denotes the patch level when the test was introduced - // TODO : Remove the default value. Need one in the interim whilst we undertake - // the effort to annotate the existing tests with a corresponding patch-level. + /** @deprecated @see android.platform.test.annotations.AsbSecurityTest */ + @Deprecated String minPatchLevel() default ""; // Denotes the CVE ID(s), comma-separated, to which this test applies. + /** @deprecated @see android.platform.test.annotations.AsbSecurityTest */ + @Deprecated String cve() default ""; // Denotes the scope (platform/kernel/vendor) to which this test applies. + /** @deprecated @see android.platform.test.annotations.AsbSecurityTest */ + @Deprecated String scope() default ""; } |