diff --git a/infer/annotations/com/facebook/infer/annotation/PrivacySink.java b/infer/annotations/com/facebook/infer/annotation/PrivacySink.java new file mode 100644 index 000000000..2be3ffcf9 --- /dev/null +++ b/infer/annotations/com/facebook/infer/annotation/PrivacySink.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2004 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +package com.facebook.infer.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.CLASS) +@Target( + ElementType.PARAMETER // a privacy source should not flow to this parameter + ) + +public @interface PrivacySink { +} diff --git a/infer/annotations/com/facebook/infer/annotation/PrivacySource.java b/infer/annotations/com/facebook/infer/annotation/PrivacySource.java new file mode 100644 index 000000000..57b7fe507 --- /dev/null +++ b/infer/annotations/com/facebook/infer/annotation/PrivacySource.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2004 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +package com.facebook.infer.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.CLASS) +@Target(value={ + ElementType.METHOD, // method returns something private + ElementType.PARAMETER, // parameter is private + ElementType.FIELD, // field is private + }) + +public @interface PrivacySource { +}