From adcf4a3dc2c0e08f6e93e137a87ab605db13b66f Mon Sep 17 00:00:00 2001 From: Stephan Brandauer Date: Thu, 27 Apr 2023 14:41:43 +0200 Subject: [PATCH] documentation clean-up --- java/ql/src/Telemetry/AutomodelExtractCandidates.ql | 4 ++-- .../ql/src/Telemetry/AutomodelExtractNegativeExamples.ql | 2 +- .../ql/src/Telemetry/AutomodelExtractPositiveExamples.ql | 9 +-------- java/ql/src/Telemetry/AutomodelSharedCharacteristics.qll | 4 ++-- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/java/ql/src/Telemetry/AutomodelExtractCandidates.ql b/java/ql/src/Telemetry/AutomodelExtractCandidates.ql index 13a2988d505..0bf1c7e4c6c 100644 --- a/java/ql/src/Telemetry/AutomodelExtractCandidates.ql +++ b/java/ql/src/Telemetry/AutomodelExtractCandidates.ql @@ -1,6 +1,6 @@ /** - * Surfaces the endpoints that pass the endpoint filters and are not already known to be sinks, and are therefore used - * as candidates for classification with an ML model. + * Surfaces the endpoints that are not already known to be sinks, and are therefore used as candidates for + * classification with an ML model. * * Note: This query does not actually classify the endpoints using the model. * diff --git a/java/ql/src/Telemetry/AutomodelExtractNegativeExamples.ql b/java/ql/src/Telemetry/AutomodelExtractNegativeExamples.ql index de07f29f1e8..08328e9e767 100644 --- a/java/ql/src/Telemetry/AutomodelExtractNegativeExamples.ql +++ b/java/ql/src/Telemetry/AutomodelExtractNegativeExamples.ql @@ -1,5 +1,5 @@ /** - * Surfaces endpoints are non-sinks with high confidence, for use as negative examples in the prompt. + * Surfaces endpoints that are non-sinks with high confidence, for use as negative examples in the prompt. * * @name Negative examples (experimental) * @kind problem diff --git a/java/ql/src/Telemetry/AutomodelExtractPositiveExamples.ql b/java/ql/src/Telemetry/AutomodelExtractPositiveExamples.ql index 7c36a7a72b5..95e9f682508 100644 --- a/java/ql/src/Telemetry/AutomodelExtractPositiveExamples.ql +++ b/java/ql/src/Telemetry/AutomodelExtractPositiveExamples.ql @@ -1,5 +1,5 @@ /** - * Surfaces endpoints are sinks with high confidence, for use as positive examples in the prompt. + * Surfaces endpoints that are sinks with high confidence, for use as positive examples in the prompt. * * @name Positive examples (experimental) * @kind problem @@ -13,13 +13,6 @@ private import semmle.code.java.security.ExternalAPIs as ExternalAPIs private import AutomodelEndpointCharacteristics private import AutomodelEndpointTypes -// private import experimental.adaptivethreatmodeling.ATMConfigs // To import the configurations of all supported Java queries -/* - * ****** WARNING: ****** - * Before calling this query, make sure there's no codex-generated data extension file in `java/ql/lib/ext`. Otherwise, - * the ML-generated, noisy sinks will end up polluting the positive examples used in the prompt! - */ - from Endpoint sink, SinkType sinkType, string message where // Exclude endpoints that have contradictory endpoint characteristics, because we only want examples we're highly diff --git a/java/ql/src/Telemetry/AutomodelSharedCharacteristics.qll b/java/ql/src/Telemetry/AutomodelSharedCharacteristics.qll index 82c0ca5de54..58c46ceabd8 100644 --- a/java/ql/src/Telemetry/AutomodelSharedCharacteristics.qll +++ b/java/ql/src/Telemetry/AutomodelSharedCharacteristics.qll @@ -16,7 +16,7 @@ signature module CandidateSig { class EndpointType; - /** The string representing the file+range of the endpoint. */ + /** Gets the string representing the file+range of the endpoint. */ string getLocationString(Endpoint e); /** @@ -64,7 +64,7 @@ signature module CandidateSig { * * This module is language-agnostic, although the `CandidateSig` module will be language-specific. * - * The language specific implementation can also further extend the behaviour of this module by adding additional + * The language specific implementation can also further extend the behavior of this module by adding additional * implementations of endpoint characteristics exported by this module. */ module SharedCharacteristics {