From fc9487d74d6a6e88fa527c3e94f6fe3239cc75b8 Mon Sep 17 00:00:00 2001 From: Stephan Brandauer Date: Thu, 14 Apr 2022 15:03:21 +0200 Subject: [PATCH] documentation for new feature --- .../adaptivethreatmodeling/EndpointFeatures.qll | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/EndpointFeatures.qll b/javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/EndpointFeatures.qll index fb978544eb3..58e0335be72 100644 --- a/javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/EndpointFeatures.qll +++ b/javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/EndpointFeatures.qll @@ -411,7 +411,22 @@ class EnclosingFunctionBody extends EndpointFeature, TEnclosingFunctionBody { } } -/** The feature for the imports defined in the file containing an endpoint. */ +/** + * The feature for the imports defined in the file containing an endpoint. + * + * ### Example + * + * ```javascript + * import { findOne } from 'mongoose'; + * import * as _ from 'lodash'; + * const pg = require('pg'); + * + * // ... + * ``` + * + * In this file, all endpoints will have the value `lodash mongoose pg` for the feature `fileImports`. + * + * */ class FileImports extends EndpointFeature, TFileImports { override string getName() { result = "fileImports" }