[
https://issues.apache.org/jira/browse/TINKERPOP-3260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18118605#comment-18118605
]
ASF GitHub Bot commented on TINKERPOP-3260:
-------------------------------------------
github-advanced-security[bot] commented on code in PR #3674:
URL: https://github.com/apache/tinkerpop/pull/3674#discussion_r4087341163
##########
gremlin-js/gremlin-javascript/test/browser/serve.mjs:
##########
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+// Static server for .generated/ bundle and fixture (Playwright webServer)
+import http from 'node:http';
+import fs from 'node:fs';
+import path from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+const generatedDir = path.join(path.dirname(fileURLToPath(import.meta.url)),
'.generated');
+const port = Number(process.env.PORT ?? 4173);
+
+const contentTypes = { '.html': 'text/html', '.js': 'text/javascript' };
+
+const server = http.createServer((req, res) => {
+ const urlPath = req.url === '/' ? '/fixture.html' : req.url;
+ const filePath = path.join(generatedDir, urlPath);
+
+ fs.readFile(filePath, (err, data) => {
Review Comment:
## CodeQL / Uncontrolled data used in path expression
This path depends on a [user-provided value](1).
[Show more
details](https://github.com/apache/tinkerpop/security/code-scanning/20)
> Browser testing for gremlin-javascript
> --------------------------------------
>
> Key: TINKERPOP-3260
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3260
> Project: TinkerPop
> Issue Type: Improvement
> Components: driver
> Affects Versions: 4.0.0
> Reporter: Guian Gumpac
> Priority: Major
> Fix For: 4.0.0
>
>
> It would be nice to have some sort of smoke test to verify changes in
> gremlin-javascript still allows for the driver to work for browsers. Close
> https://issues.apache.org/jira/browse/TINKERPOP-2143 once this is properly
> tested.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)