mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
avoid reporting empty names in js/exposure-of-private-files
This commit is contained in:
@@ -19,3 +19,4 @@
|
||||
| private-file-exposure.js:42:1:42:66 | app.use ... dir())) | Serves the home folder, which can contain private information. |
|
||||
| private-file-exposure.js:43:1:43:46 | app.use ... )("/")) | Serves the root folder, which can contain private information. |
|
||||
| private-file-exposure.js:51:5:51:88 | app.use ... les'))) | Serves the folder "../node_modules", which can contain private information. |
|
||||
| subfolder/private-file-exposure-2.js:6:1:6:34 | app.use ... rname)) | Serves the folder query-tests/Security/CWE-200/subfolder, which can contain private information. |
|
||||
|
||||
@@ -59,4 +59,6 @@ function good() {
|
||||
|
||||
app.use("jquery", express.static('./node_modules/jquery/dist')); // OK
|
||||
app.use("bootstrap", express.static('./node_modules/bootstrap/dist')); // OK
|
||||
}
|
||||
}
|
||||
|
||||
app.use(express.static(__dirname)) // NOT OK
|
||||
@@ -0,0 +1 @@
|
||||
{}
|
||||
@@ -0,0 +1,6 @@
|
||||
var express = require('express');
|
||||
var http = require('http')
|
||||
var app = express()
|
||||
var server = http.createServer(app)
|
||||
// Static files:
|
||||
app.use(express.static(__dirname))
|
||||
Reference in New Issue
Block a user